3D Mathematics
|
|||
|
Rank: ? (1)
Member #: 24714 |
Hi everyone,
I am working on a 3D application where I have to draw lines and arcs on a plane. This plane can be any plane in the space but we always see it on the computer screen. When we select any point on this plane, this point has only two coordinates (x',y') on this plane but in actual 3D space this point must have all the three coordiantes(x,y,z). If we start from XY plane and rotate it along X axis by some angle 'theta'. Now we come to a different plane where we will be having all the three coordinates of a point. Now this plane will be our computer screen plane. Now we rotate this plane along this plane's Y axis by some angle 'phi'. Now, knowing only the above specified parameters, if I select a point on this plane, how can I find out the actual coordinates(x,y,z) of this point. I hope I have made my doubt understandable to everyone although its difficult. All the responses in this regard are welcome. --Dushyant |
||
|
|||
|
|||
|
Rank: ? (767)
Member #: 11085 |
hrm, i know you can plot a 3D point on a 2D simulation of 3D space, but I dont know the math nor if its possible to take that point and turn it back to 3D coordinantes, though, im not much with 3D math just yet, as i have to self teach myself on my own free time, so if the answer is found, id like to see it.
- relpats_eht
|
||
|
|||
|
|||
|
Rank: ? (767)
Member #: 11085 |
if your using openGL, look up gluUnproject.
- relpats_eht
|
||
|
|||
|
|||
|
Rank: ? (856)
Member #: 2 |
Yea with OpenGL that's the way, specifically http://nehe.gamedev.net/data/articles/article.asp?article=13 is a good page about using gluUnproject..
-Terminal
|
||
|
|||
|
|||
|
Rank: ? (171)
Member #: 11947 |
Brian (Half-Baked) writes...
I think it's more complex then that
You can say that your initial point is vector from (0,0,0) to (X,Y,0) (call this v). you're going to want to build a rotation matrix and apply it to that vector. Explaination is at the following: http://mathworld.wolfram.com/RotationMatrix.html |
||
|
Please login or register to post a reply.