To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cadOpen lugnet.cad in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / 7888
7887  |  7889
Subject: 
Re: LD-Lite Rotation Matrices?
Newsgroups: 
lugnet.cad
Date: 
Wed, 8 May 2002 20:12:23 GMT
Viewed: 
841 times
  
Actually I have a very similiar question.

I originally had a similiar problem in that LDraw in inherently
a Left Handed coordinate system, and my rendering engine needs
right handed coordinates.

I've figured out a solution that works for me so far, but I
a.) don't totally understand why it works.
b.) wonder if I still might have problems that I haven't found yet.

Originally to convert the coordinates, I was just multiplying
the Y coords by -1. This fixed almost everything. The model was
turned right side up, and all looked well.

Until that is I started trying parts that had some of the primitives
rotated about the Z or X axis (instead of just the Y axis) These
tended to rotate the 'wrong' way.

I solved this by multiplying some of the numbers in the transform
matrices in the type 1 lines by -1(I had already been 'fixing' the
Y translation coords here also.)

Specifically I changed a matrix like:

   1  2  3             1 -2  3
   4  5  6    into    -4  5 -6
   7  8  9             7 -8  9

(these 4 numbers are the +/-sin(a) values for rotation about X and Z)

I think I understand why it helps (flipping the sign of the sine
would tend to represent a rotation in the other direction.) but I
don't understand why I don't need to do the same to the cos(a) values
in the matrix? Not that I'd know how to if I did, because they tend
to share spaces in the matrix with other cos(a)'s and the scale values.

Is there anything else I need to change do you think?

I'm also wondering if I couldn't just leave all these alone when I
load the geometry and just stick one transform at the top like

   1  0  0             1 -1  1
   0 -1  0  or maybe  -1 -1 -1  or something like that????
   0  0  1             1 -1  1

-Kyle

--
                                    _
-------------------------------ooO( )Ooo-------------------------------
Kyle J. McDonald                 (o o)
                                  |||||

                                  \\\//
                                  (o o)            kmcdonald@BigFoot.COM
-------------------------------ooO(_)Ooo-------------------------------



Message is in Reply To:
  Re: LD-Lite Rotation Matrices?
 
(...) Maybe this is it? l3glite -v3 -a1,0,-1,0.5,-1,0.5,-1,0,-1 file.dat Don (22 years ago, 8-May-02, to lugnet.cad)

7 Messages in This Thread:



Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR