Computer Science Canada 3-dimensional plotting : x, y, z axes |
Author: | richcash [ Fri Jul 21, 2006 4:26 pm ] |
Post subject: | 3-dimensional plotting : x, y, z axes |
Can someone tell me how to plot 3d points on a 2d screen if I have (x, y, z)? Also, I need to know how to make the screen turn. So, if the screen has turned 360 degrees, then it's back in the same spot. If I simply use sin and cos for a circle won't it make the objects on the screen look like they're travelling on a curve? My best attempt is to take x / z and y / z and plot those, and as I said use sin and cos to turn the screen, but this is not correct! Any info or ideas? Thanks in advance. |
Author: | [Gandalf] [ Fri Jul 21, 2006 4:33 pm ] |
Post subject: | |
The good-looking textured light-sourced bouncy fun smart and stretchy page is a good source for such things. The exact link which I think you would find useful is: plotting 3D points onto a 2D screen. |
Author: | Delos [ Fri Jul 21, 2006 4:35 pm ] |
Post subject: | |
I'm going to assume that you know your way around Turing and more importantly, around trig. If you have a background in 3D maths as well (3D physics is just as good), then you're set to go. This page will give you all the necassary theory behind converting a 3D object into its 2D projection. First get that working, once you've done that you can start worrying about changing camera angles and such. Shouldn't be too difficult if you're programming using Classes and start with a Camera object. That being said, use Classes! They will improve the quality of your life tremendously. This is not an easy undertaking, so best of luck with it. Bah! [Gandalf] beat me to it...well, at least having a second person posting exactly the same links (no doubt both from Cervantes' post!) should give enough credence to that particular page... |
Author: | richcash [ Fri Jul 21, 2006 4:56 pm ] |
Post subject: | |
Thanks! That's exactly what I needed. I have the first few parts working. The website is quite detailed except for panx, pany, and panz. What are these and what sort of values should they be? |
Author: | richcash [ Fri Jul 21, 2006 5:14 pm ] | ||||
Post subject: | |||||
The first part works great!
But I don't think this is correct?
This is just a quick test, I will use classes later on. |