So, I got bored... (MIT fun)

<p>And wrote a program that draws SIRDS (Single Image Random Dot Stereograms). Basically, those things that when you 'cross' your eyes, a picture shows up. Since I failed to think of anything more interesting to make after doing a smiley face, a room sign, and a logo for a group I work with, I put 'MIT' into it. I'm aware that it's very gimpy, if you succeed at all in seeing it, but I thought I'd share it. Feel free to do what you will with this should you so wish, I have no rights reserved. ;)</p>

<p>By the way, if anyone has something (SIMPLE, my program isn't good enough to handle anything remotely complicated yet) they want put into it, let me know. It's the first day of class 3rd term, and I'm a bit bored. Ideally, you go ahead and put it in greyscale format (white is furthest away, black is closest, greys for inbetween).</p>

<p>For those of you that might be able to see it...
<a href="http://img440.imageshack.us/img440/3137/mitstereo6wk.jpg%5B/url%5D"&gt;http://img440.imageshack.us/img440/3137/mitstereo6wk.jpg&lt;/a&gt;&lt;/p>

<p>benjones, new office poster? ;)</p>

<p>WOW....I love the Dragon...its kick @$$!</p>

<p>?MIT?</p>

<p>o_o</p>

<p>I could see it almost right away! Yay, it looks lovely! :D</p>

<p>i see a fish</p>

<p>I see the inside of an airplane.</p>

<p>yea. and that kinda looks like a fish.</p>

<p>neat....MIT in 3D</p>

<p>how does your program work?</p>

<p>Nope. I see oval windows and seats and nothing like a fish.</p>

<p>I cant do it :(</p>

<p>could you please tell me what program you used?</p>

<p>For those who can't see it, don't feel bad -- lack of stereoscopic vision is actually pretty common, as these things go. (We learned exactly how many people are affected in [url=<a href="http://web.mit.edu/mollieb/Public/PDFs/Schoolwork/9.04-midterm.pdf%5D9.04%5B/url"&gt;http://web.mit.edu/mollieb/Public/PDFs/Schoolwork/9.04-midterm.pdf]9.04[/url&lt;/a&gt;], but that information has gone in one hippocampus and out the other, unfortunately.) It doesn't affect your ability to see normally or perceive depth normally (there are other pathways in the brain which can compensate), but it does mean you can't see me?'s image. :(</p>

<p>i can't do it either...
My eyes are hurting now..</p>

<p>Glad you like it mollieb. :)</p>

<p>CowsGoMu: It works off the idea that when your eyes diverge, if they hit the same color on the screen, then your brain will process the image as if it were further away, thus giving it the 3d effect. My program loads the grayscale base image that it's based off of, and takes the values from that as the depth. By similar triangles it can be easily shown that the seperation that the pixels have to be apart are = (seperation<em>between</em>both<em>eyes * desired</em>apparent<em>depth)/(desired</em>apparent<em>depth + observer</em>distance). The program then links the locations of the pixels based on the depths, randomizes the pixels that don't matter, then copy that color into the linked pixel. The core of the code I'll put below. (Visual C++ 6.0, the rest of the window drawing program I won't include, this is just the most base code).</p>

<p>for (y=0; y<768; y++)
{
for (x=0; x<1024; x++)
lookL[x]=x;</p>

<pre><code>for (x=0; x<1024; x++)
{
depth= 8*int(pow(int(GetPixel(MemDC, x,y)),(0.4333333333333333333333))); //These are just conversions to make it a good visible depth//
seperation=(double)(((long)eyeSep*depth)/(depth+obsDist));

left=x-seperation/2; right=left+seperation;

if ((left>=0) && (right<1024))
lookL[right]=left;
}

for (x=0; x<1024; x++)
{
if (lookL[x]==x)
SetPixel(hDC, x,y, RGB((rand()%256),(rand()%256),(rand()%256)));
else
SetPixel(hDC, x,y, GetPixel(hDC, lookL[x], y));
}
</code></pre>

<p>}</p>

<p>kdd: I mentioned in the first post that I wrote it myself.</p>

<p>For those who don't care about all of the previous, sorry, no one else has been interested yet and I enjoy explaining these things. :)</p>

<p>Those who can't see it, keep trying, I assure you it's there.</p>

<p>mollie- that's interesting but the chances that everyone complaining about "not being able to see it" is affected by that condition is unlikely.</p>

<p>something that works to start:
cross your eyes. eventually you'll want to get into the habit of looking beyond the screen but it's easiest to start by focusing at a closer radius. Ok with your eyes crossed vary the distance of your face from the screen. you'll reach a point (hopefully), where some of the patterns come in phase where they didn't before. look around, and you should see something etched into the screen.</p>

<p>once you get OK at that, try to do the same thing only focusing your eyes behind the screen- like you're looking at something 4 or 5 feet away- as you vary your distance from the screen you should see a hint of something fitting together. Use sheer will to keep your eyes focused the same distance away yet pay attention to the screen. you shouldbe able to see the same image- only this time it pops out.</p>

<p>Huh...I've never been able to do these things and always felt kinda lame because of it. But now I know why. Haha, thanks Mollie.</p>

<p>Kinda like that guy in Mallrats. Who's a Kevin Smith fan? =)</p>

<p>EDIT: Actually, I'm going to hold my comment until I find the picture to prove it... give me a bit...</p>

<p>i meant what did you write in? java or what app.?</p>

<p>oh my goodness.<br>
You made a program to make that!
Call me easily impressed ,but WOW. </p>

<p>taking this to my AP Comp Sci class tomorrow</p>

<p>holy crap it's 3d.</p>