Shop OBEX P1 Docs P2 Docs Learn Events
An interesting illusion: I think this would make an awesome Propeller Project — Parallax Forums

An interesting illusion: I think this would make an awesome Propeller Project

ElectricAyeElectricAye Posts: 4,561
edited 2011-05-16 06:27 in Propeller 1
The winner of this year's optical illusion contest is pretty cool. I think this would make an excellent demo for the Propeller because it could rotate a disk populated with LEDs and blink the LEDs at the same time. So if anyone is looking for a science fair project or just some odd neurofreaky thing to put on their mantle, check it out.

I wonder why our brains work this way?

http://www.msnbc.msn.com/id/42982961/ns/technology_and_science-science/

Comments

  • RaymanRayman Posts: 14,877
    edited 2011-05-12 15:58
    It is an interesting effect... I bet you could do it with Graphics.spin on TV, although there'd only be a few colors...
  • TubularTubular Posts: 4,717
    edited 2011-05-12 16:17
    Interesting stuff.

    Perhaps drac could convert it to play on 160*120 like he did previously with the Taz video, and see if the effect still works
  • RossHRossH Posts: 5,519
    edited 2011-05-12 16:29
    The winner of this year's optical illusion contest is pretty cool. I think this would make an excellent demo for the Propeller because it could rotate a disk populated with LEDs and blink the LEDs at the same time. So if anyone is looking for a science fair project or just some odd neurofreaky thing to put on their mantle, check it out.

    I wonder why our brains work this way?

    http://www.msnbc.msn.com/id/42982961/ns/technology_and_science-science/

    Cool - makes you realize how much of our perception is actually "reconstructed" in the brain itself, rather than being directly observed.

    In this case, it probably indicates that our visual cortex is built to "expect" moving objects to be continually changing in hue, size and shape. So Instead of wasting brainpower on trying to keep track of all these changes - which are actually of secondary importance when someone has just thrown a rock at you - evolution has resulted in a visual perception system that simply ignores them altogether - allowing you instead to concentrate on calculating the trajectory of the moving object, and ducking at the appropriate time!

    Ross.
  • RaymanRayman Posts: 14,877
    edited 2011-05-12 16:32
    Tubular wrote: »
    Interesting stuff.

    Perhaps drac could convert it to play on 160*120 like he did previously with the Taz video, and see if the effect still works

    Yes, I think that's the Kye VGA driver. That should do it.

    I've also got something similar for TV...
  • ElectricAyeElectricAye Posts: 4,561
    edited 2011-05-12 18:26
    RossH wrote: »
    Cool - makes you realize how much of our perception is actually "reconstructed" in the brain itself, rather than being directly observed....

    How true!

    Excellent idea about using video. It never occurred to me that this could be done with the video system. I didn't know the Propeller could work it that quickly. With a little tinkering and experimentation, maybe somebody here can discover some other freakish thing about the way our minds work. :-)
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2011-05-12 19:46
    Yes the video should work - I'll take a look when I get home. I automated the process so it is a lot easier.
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2011-05-13 07:08
    Video now on Youtube http://www.youtube.com/watch?v=7y57kxb1MUw

    The movie file is about 8mb so I'm not sure how best to distribute this. ?? email or some internet file repository.

    There are quite a few steps along the way to getting this working
    1) The Catalina/Movie IDE with source code (needs vb.net) to take .bmp files and convert to a movie.
    2) The Spin source code
    3) SaveTube to save to a disk file
    4) avs4you to convert to 4:3 format and convert to individual .bmp files
    5) Put the movie on an sd card on an appropriate board (sd pins 12-15 and VGA 16-23) and play.

    My apologies for the artifact in the video with the white line moving up the screen - this is my camera and the VGA screen not liking each others frequency. It looks better in real life.

    Regarding what is going on in the brain, RossH's explanation in post #4 makes perfect sense. It makes you think - is everything just an illusion created by the brain? Vision, sound, taste, touch, pleasure, pain? My dad went to the dentist once and the dentist asked if he wanted an anaesthetic, and my dad replied "no, pain is just an illusion created by the brain" and the dentist responded with "I wish everyone thought that way."

    Sometimes my brain hurts considering the "hard" questions in philosophy. eg, how do we see the color "yellow" when a) the brain is gray in color, b) there is no yellow colored neuron, c) it is dark inside the skull and d) there isn't even a yellow receptor in the eye.

    And then there is the practical. I just sutured someones finger tonight, and I remember having my own finger sutured a few years back. Regardless of all the philosophy and all the illusions, why does it *hurt* so much?

    But back to answerable questions, I'd love to be able to distribute the file motion.pmv somehow. Any thoughts?

    The movie player program is below. It is using an older version of Kye's sd code. And a little plug here for Kye who I gather has secured a job with Parallax. Well done Kye!
    {
    Propeller Movie player by James Moxham, November, 2010
    See also the vb.net program to create the movie files
    }
    CON
    
      _clkfreq = 80_000_000
      _clkmode = xtal1 + pll16x
    
      _clockDataPin = 29
      _clockClockPin = 28
    
      _cardDataOutPin = 12
      _cardClockPin = 13
      _cardDataInPin = 14
      _cardChipSelectPin = 15
    
      _pinGroup = 2
      _switchRate = 5
    
      ' Keyboard
      NUM        = %100
      CAPS       = %010
      SCROLL     = %001
      RepeatRate = 40
    
      MaxIcons = 15
    
    OBJ
    
      pix: "VGA64_PIXEngine.spin"            ' thanks to Kye 160x120
      fat: "SD2.0_FATEngine.spin"            ' thanks to Kye
      kb : "keyboard"                 ' keyboard
    
    VAR
      Word Key
      long i
    
    PUB Main 
    
      ifnot(pix.PIXEngineStart(_pinGroup))
        reboot
    
      ifnot(fat.FATEngineStart(_cardDataOutPin, _cardClockPin, _cardDataInPin, _cardChipSelectPin, _clockDataPin, _clockClockPin))
        reboot
      fat.mountPartition(0,0)     ' mount the sd card
    
      kb.startx(26, 27, NUM, RepeatRate)                  'Start Keyboard Driver if required
    
      Wallpaper                     ' startup splash screen
      repeat i from 1 to 600000     ' delay for vga screen to warm up
      Movie(837)                    ' play n frames in the movie
    
    
    
    PUB Wallpaper
        fat.openfile(string("prop160.vga"),"R")      ' 160x120
        fat.readdata(pix.displaypointer,19200)
        fat.closefile
    
    
      
    PUB Movie(n) 
        fat.openfile(string("motion.pmv"),"R")                 ' 160x120 per frame, saved as a binary file
        repeat i from 1 to n                                ' number of frames
          fat.readdata(pix.displaypointer,19200)            ' 19200 bytes per frame
        fat.closefile                                       ' close the file
    
    1024 x 768 - 105K
  • ctwardellctwardell Posts: 1,716
    edited 2011-05-13 07:14
    Dr_Acula,

    That is sweet. The effect is evident even with the white line, I'd almost even say there is some effect there, if Ipay attention to the colors, I tend to not notice the line.

    C.W.
  • ElectricAyeElectricAye Posts: 4,561
    edited 2011-05-13 07:15
    Dr_Acula wrote: »

    That's really cool. I'm very impressed you could whip this up so fast!
    This is what I like about the Propeller chip for designing science experiments - when it comes to whipping up real experiments, you can really do things!
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2011-05-13 07:48
    It looks better on a real screen. On the original video there is a white spot in the center you are supposed to stare at. This brings up another aspect of the 'illusion' the brain creates - there is the fovea with a central area with very good vision and then everything around that is blurry. But the brain recreates the world as being all at high resolution.

    If you stare at the center the visual cortex is going to be processing the colors at much lower resolution. However, the brain is also wired to focus in on changes. There is some good evidence that cats do this even more, with their brains wired to focus on movement. Watch the original video and before the screen starts moving the eye tends to wander to one dot in particular.

    But once it starts moving the eye tends to look at the entire thing as a circle that is moving.

    However, force yourself to stare at the center and the illusion is still there.

    I suspect the explanation is that the brain is doing what RossH says, ie who cares if the stripes on the sabre tooth tiger are changing in color when it is lunging at you?

    When leads to the conclusion that the brain really is perfectly designed to do what it is supposed to do, which is to enable the organism to survive and reproduce.
  • RaymanRayman Posts: 14,877
    edited 2011-05-13 08:38
    That was fast!

    I was thinking about trying it on my 8x8 RGB matrix... Maybe glueing it and a battery to some kind of top...

    Or, maybe the continous rot servo would be better...
  • HumanoidoHumanoido Posts: 5,770
    edited 2011-05-15 03:04
    What would be more useful is to reverse the effect and generate color using black and white moving images.
  • Heater.Heater. Posts: 21,230
    edited 2011-05-15 03:17
    Humanoido,

    Back in 1970's the British "Tomorrows World" program showed a demo of producing colour on black and white TVs. It sort of worked. Everyone saw different colours though if any at all.
  • HumanoidoHumanoido Posts: 5,770
    edited 2011-05-16 04:05
    Heater. wrote: »
    Humanoido, Back in 1970's the British "Tomorrows World" program showed a demo of producing colour on black and white TVs. It sort of worked. Everyone saw different colours though if any at all.
    Heater, do you remember the relationship of flashing black and white images with certain frequencies to generate color in some people's eyes? There was a third party kit for the Timex TS-1000 back in the early 80's that claimed to create colors on a B&W screen.
  • Heater.Heater. Posts: 21,230
    edited 2011-05-16 04:22
    No. That was a long time ago. In fact I did not even see the particular show where they demonstrated it. It was a topic of conversation at school the next day. I have however noticed colors turning up in some particularly flickery shots on black and white TV since then.

    Seems to me that as the frame rate on British TVs is 50Hz whatever is going on had to be in multiples of that.

    Have a google around for "Benham's disk"
  • TubularTubular Posts: 4,717
    edited 2011-05-16 06:27
    Drac, awesome work. That effect still works very nicely.

    Rayman, I think the RGB matrix would be interesting but the square edges might draw our eye/brain's attention. Might need to make it look more like a donut than square somehow
Sign In or Register to comment.