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 X-Y-Z)
Ex:
1. (x1,y1)__________(x2,y2) ,now i can say it is in X-Axis
2.
(x1,y1)
|
|
| now we can say that it is Y-Axis
|
(x2,y2)
3.Now how can we find Z-Axis
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 X-Y-Z)
Ex:
1. (x1,y1)__________(x2,y2) ,now i can say it is in X-Axis
2.
(x1,y1)
|
|
| now we can say that it is Y-Axis
|
(x2,y2)
3.Now how can we find Z-Axis
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 | |
| Smooth acceleration in every direction. | Honey Sharma | 1 | 3,533 |
Aug 16, 2011 01:37 AM Last Post: PoseMotion |
|
| newbie request direction | Teehee | 3 | 5,438 |
Jul 27, 2011 09:57 AM Last Post: AndyKorth |
|
| give direction to sprite | termitis | 9 | 8,616 |
Mar 11, 2011 02:38 PM Last Post: compiler |
|
| Direction of normal | Miglu | 3 | 3,075 |
Oct 4, 2010 05:08 PM Last Post: Skorche |
|
| Direction formula? | TimMcD | 2 | 4,187 |
Nov 11, 2009 11:42 PM Last Post: TimMcD |
|

