Coodinates
a scale factor I believe eg:
(2,2,2,2) = (4, 4, 4) when translation is done.
I''m not sure though...
Sander Maréchal
[Lone Wolves Production][Articles][GD Emporium][E-mail]
(2,2,2,2) = (4, 4, 4) when translation is done.
I''m not sure though...
Sander Maréchal
[Lone Wolves Production][Articles][GD Emporium][E-mail]
You can treat W like a scale factor, although it works the opposite way:
[2,2,2,2] is actually [1,1,1].
The use of 4 coords rather than 3 makes a lot of the maths easier, which is the main reason for using it.
Generally it''s best to keep x,y,z,w coords in x,y,z,1 format .. i.e. divide all by ''w'' (hence 2,2,2,2 being converted to 1,1,1,1)
Usually referred to as ''homogenous'' coordinates (meaing in this case all having w=1)
I read quite a good (short) explanation of it recently, somewhere, but can''t remember where .. probably either in the Red Book or OpenGL Game Programming.
using 1x4 vectors means that you can modify them with 4x4 matrices (meaning that you can easily perform translates+scales+rotates in ways which would be far more complex if u had to only use 3x3 matrices).
TBH, you probably don''t care .. just keep w=1
note, if you store vectors as x,y,z,w, keep the w=0 so that it doesnt get translated when multiplied by a transformation matrix Which is good, as translating a vector doesnt make sense.
>>I read quite a good (short) explanation of it recently, somewhere, but can''t remember where .. probably either in the Red Book or OpenGL Game Programming.
using 1x4 vectors means that you can modify them with 4x4 matrices (meaning that you can easily perform translates+scales+rotates in ways which would be far more complex if u had to only use 3x3 matrices).<<
thats correct homogenous corridates make transformations easier, theres a good description in CGP+P (sec5.2) for those with the book
http://uk.geocities.com/sloppyturds/kea/kea.html
http://uk.geocities.com/sloppyturds/gotterdammerung.html
using 1x4 vectors means that you can modify them with 4x4 matrices (meaning that you can easily perform translates+scales+rotates in ways which would be far more complex if u had to only use 3x3 matrices).<<
thats correct homogenous corridates make transformations easier, theres a good description in CGP+P (sec5.2) for those with the book
http://uk.geocities.com/sloppyturds/kea/kea.html
http://uk.geocities.com/sloppyturds/gotterdammerung.html
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement