Welcome, Unregistered.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Prev Previous Post   Next Post Next
Old 25-May-2004, 14:24   #1
Nappe1
lp0 On Fire!
 
Join Date: Feb 2002
Location: South east finland
Posts: 1,527
Send a message via ICQ to Nappe1
Default conversion between polar cordinate and normal 3D cordinate?

I have 3D space with following cordinate system:

unit up vector: 0.0, 0.0, 1.0
unit right vector: 1.0, 0.0, 0.0
unit depth vector: 0.0, 1.0, 0.0

cordinates are floats.

I also have a definition for Light (sun in this case.) as in polar cordinates:
Yaw Angle in radian system
Pitch Angle in radian system

How do I convert Light direction to unit vector in the mentioned 3D cordinate system? I know it is just all about Pythagora's triangle geometry, but while I did a one, I got very badly mixed up because I usually use 3D space where Y -axle points up, not Z.

what for I am doing this? well, I have done a tracer for recalculating vertex shadow information in NFS4 tracks... and it is a bit pointless even test run it if you can't figure out where the light should be.

all help is greatly appriciated.
__________________
Nappe1 of Division & Future Vision
Founder of AF3DE
Nappe1 is offline   Reply With Quote

 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 16:27.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.