Find 3D Direction with 2D Coordinates
Hi All,
i have this doubt like given two points (x1,y1) & (x2,y2) ,i draw a line,but i want to know to which axis does this line belong to (iam looking @ 3D XYZ)
Ex:
1. (x1,y1)__________(x2,y2) ,now i can say it is in XAxis
2.
(x1,y1)


 now we can say that it is YAxis

(x2,y2)
3.Now how can we find ZAxis
for better understanding take a look @ the below link
http://allyoucanupload.webshots.com/v/20...5920073075
i have this doubt like given two points (x1,y1) & (x2,y2) ,i draw a line,but i want to know to which axis does this line belong to (iam looking @ 3D XYZ)
Ex:
1. (x1,y1)__________(x2,y2) ,now i can say it is in XAxis
2.
(x1,y1)


 now we can say that it is YAxis

(x2,y2)
3.Now how can we find ZAxis
for better understanding take a look @ the below link
http://allyoucanupload.webshots.com/v/20...5920073075
I'm going to guess that you are (A): trying to relate screen coordinates (suchj as mouse position) to 3D coordinates, and (B): using OpenGL.
If that is true then you should look up the gluUnProject() function. Otherwise, look up that function anyway and see if you can understand what it does, as that may still help you.
If that is true then you should look up the gluUnProject() function. Otherwise, look up that function anyway and see if you can understand what it does, as that may still help you.
Possibly Related Threads...
Thread:  Author  Replies:  Views:  Last Post  
Local (X, Y) Coordinates from 3D plane coordinates  merrill541  5  8,189 
Jun 29, 2009 01:32 AM Last Post: RhinosoRoss 

Translate mouse coordinates to world coordinates  nalenb  4  8,461 
Mar 21, 2006 11:59 PM Last Post: glMatt 