# Actually...

R

>>Thanks for the help, but I'm going to try finding these laws of 3D myself

Actually, I was trying to get you to find them yourself. I can give a much more detailed explanation, if you like, but I think it's better just to give it some time and let you find things for yourself.

>>Now I see that if I have a square at (50,50,0) and another square at (50,50,20) they should be exactly on the same spot on screen.

The diagram program I gave you DOES show things in a "flattened" view. This makes it easy to find the relations you need.

But the final starfield program should NOT be "flattened"; it should show things in perspective view.

Note that two stars that differ only in their Z co-ordinates WILL appear at different locations on the screen (at the two purple circles):

SCREEN 12
LOCATE 14, 3: PRINT "Eye";
LOCATE 12, 9: PRINT "Screen";
LOCATE 10, 24: PRINT "Star 1";
LOCATE 10, 49: PRINT "Star 2";
LINE (120, 170)-(430, 170), 8
LINE (30, 240)-STEP(400, 0), 4
CIRCLE (30, 240), 3
LINE (90, 200)-STEP(0, 80)
LINE (90, 229)-(400, 170), 2
LINE (400, 240)-(400, 170), 2
LINE (30, 240)-(90, 229), 9
LINE (90, 240)-(90, 229), 9
PSET (400, 169)
PSET (401, 170)
PSET (399, 170)
PSET (400, 171)
LINE (90, 215)-(200, 170), 2
LINE (200, 240)-(200, 170), 2
LINE (30, 240)-(90, 215), 9
LINE (90, 240)-(90, 215), 9
PSET (200, 169)
PSET (201, 170)
PSET (199, 170)
PSET (200, 171)
CIRCLE (90, 229), 3, 5
CIRCLE (90, 215), 3, 5

Posted on Mar 16, 2009, 3:46 PM

 Response Title Author and Date Correct? Ben on Mar 23, 1:19 PM * RESUME WHAT? You already tried to END it. Clippy on Mar 23, 2:30 PM Wait... sorry.. Ben on Mar 23, 3:45 PM *Good job! Artelius on Mar 23, 3:56 PM * How far is the eye from the monitor? Ben on Mar 25, 1:33 PM Just pick something that looks realistic Artelius on Mar 25, 2:46 PM What do you think of parallel projection? Ben on Apr 24, 6:44 PM * Parallel to what? Try 45 degrees to throw further... Clippy on Apr 26, 10:31 AM Getting a lot better! Artelius on Mar 23, 3:51 PM