Subject:
|
LDraw Math Question??
|
Newsgroups:
|
lugnet.cad
|
Date:
|
Thu, 26 Sep 2002 19:18:35 GMT
|
Viewed:
|
373 times
|
| |
| |
Hi.
I'm having a few problems with the LDraw coordinate/rotation system.
I understand that LDraw 'world' coordinates follow the following:
-X is on the left.
+X is on the right.
-Y is up
+Y is down
-Z is into the screen
+Z is out of the screen
To me this is a left hand coordinate system. Which is fine.
What I'm curious about is given the system above, when rotating
about the Z axis by a positive angle, does the +X axis on the
right swing up? or down?
When rotating about the X axis by a positive angle, does the +Z
that is near the user swing up? or down?
Along with this, I have questions about the Matrices in the type 1
lines. There are two conventions here; in some systems you transform
a point as a column vector on the right side of the matrix (as in
traditional matrix math and as used in the Foley & Van Dam textbook),
while in some other systems you transform a point as a row vector on the
left side of the matrix (as in the Newman & Sproull textbook). This is
usually correlated with the choice of a right-handed vs. left-handed
system, but not always.
Does anyone know which method LDraw uses?
If a type 1 line is:
1 16 X Y Z A B C D E F G H I file.dat
and a point in file.dat (x,y,z) then which of the following does LDraw use:
A B C
1) x y z * D E F
G H I
A D G
2) x y z * B E H
C F I
x A B C
3) y * D E F
z G H I
x A D G
4) y * B E H
z C F I
Note: I beleive that effectively, 2 is equivilent to 3, and 1 is equivilent
to 4.
Is there any insight into these questions out there?
|
|
Message has 1 Reply: | | Re: LDraw Math Question??
|
| (...) When rotating around X, +Y -> +Z. When rotating on Y, +Z -> +X. For Z, it's +X -> +Y. (...) It doesn't matter (I think) - you get the same results either way. Personally, I program with the vertices as a row vector on the left: [x1 y1 z1 1] (...) (22 years ago, 26-Sep-02, to lugnet.cad)
|
2 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|