Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Get Normals for Matrix Vertex

Author
Message
Firesea
23
Years of Service
User Offline
Joined: 7th Apr 2003
Location:
Posted: 30th Apr 2003 05:00
Is there a simple way to get the normal for a matrix vertex? I see commands for setting the normal, but not getting. Short of a cross product of the two edges, I can't think of another way.

I need the normal to find the cos angle with a light source (dot product of the two) to apply gradient shading to my height mapped matrix.

Thanks

P.S. thanks Ian for the assistance the other day with the trapozoid problem!

Firesea
Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 30th Apr 2003 06:36 Edited at: 30th Apr 2003 06:37
hope this helps



Tsu'va Oni Ni Jyuuko Fiori Sei Tau!
One block follows the suit ... the whole suit of blocks is the path ... what have you found?
Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 30th Apr 2003 07:01
i think thats what your after isn't it?



Tsu'va Oni Ni Jyuuko Fiori Sei Tau!
One block follows the suit ... the whole suit of blocks is the path ... what have you found?
Shadow Robert
23
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 30th Apr 2003 07:31
i think i'm loosing my mind i swear... thats the right calc for the light vector



Tsu'va Oni Ni Jyuuko Fiori Sei Tau!
One block follows the suit ... the whole suit of blocks is the path ... what have you found?

Login to post a reply

Server time is: 2026-07-11 02:35:43
Your offset time is: 2026-07-11 02:35:43