To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cad.dat.partsOpen lugnet.cad.dat.parts in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / LDraw Files / Parts / 1690
1689  |  1691
Subject: 
Re: rotation matrices
Newsgroups: 
lugnet.cad.dat.parts
Date: 
Tue, 17 Oct 2000 21:07:14 GMT
Viewed: 
999 times
  
Hello,
Does anyone have more information about those 9 numbers that make up the
rotation matrix for a part in the dat file?

Could you be more specific?

Well, I copied the coordinates of one side of the axlehol8 dat. This gives
me a plane that is perpendicular to the Y-axis. I then had to position this
plane on points of the curves and perpendicular to that curve. To get the
direction I substracted the coordinates of 2 following points wich gives me
a [a b c] vector to which the plane should be parallel.  The rotation matrix
I created was then A=[b/l -a/l 0; a/L b/L c/L; -a/l*c/L -b/l*c/L l/L] where
l=square root(a^2+b^2) , L=square root(a^2+b^2+c^2) and ;means next row. I
don't really know if this is correct but the results seem to be right.
Now, can I use these same numbers given by this matrix to position a part
the correct way?

(I kind of derived my matrix from the top half of
http://mathworld.wolfram.com/EulerAngles.html , so is this the correct way
to do it in Ldraw . Or is there an other kind used since the axes are
rotated ?)

In the Ldraw faq it also says something about scaling. How is put in to the
matrix?


Have you checked your file for duplicate or extraneous codes?  That can
happen with big files.

I think the code is correct, one line gives me one triangle and all the
triangles are different.


A couple of things you might be able to do to control filesize:

0. Make each segment *really* short, and just use axlehol8.dat for each
segment.

I don't really like this solution since it will create an awfull lot of
triangles wich would take it a larger time to render.
And I like spinning things 'round and 'round in Ldview a lot, so I can't do
this.

1. Put repeated segments into a subfile.  If you got a section of the part
that's got a fixed angle, each segment should be the same shape.  If you
turn this segment into a subfile, you can reuse the subfile as much as you
want, while only adding one line to the main file.

There are no repeated parts since I don't actually use axlehol8.dat , I just
use its dimensions and then draw triangles along the outside of the figure
between two following figures. This gives me a nice and smooth axle wich
keeps on looking good even when zoomed in .
I could of course use subparts for the begin and end piece and for those 6
cilinders that are located at the beginning and end.
Can I put these in the same file some way? If yes: how?
I guess putting a cilinder on top of the axle wouldn't cause any problems.

2. One thing I've done with bent cylinders is to build each straight
segment out of two sloped cylinders with a regular cylinder in the middle.
Each segment ends up looking something like this:
_________
\ |   | /
\|___|/

Except the sloped parts aren't usually that extreme.  After each segment • is
constructed, it's a simple matter of arranging the segments so the angled
ends meet cleanly.

This approach could work on a crossaxle, except that you would need to
construct the 'sloped crossaxle' subpart.  And as long as you are either
bending in 2 dimensions, or you have a very regular curve.

Steve

I can't figure the drawing out, it must be deformed by my newsreader.
but are you perhaps meaning to make subparts like those used in the
hose2.dat
on http://www.math.uio.no/~fredrigl/technic/ldraw-mode/ .
here every piece fits the next as long as the curve isn't too bend.
I could see the same thing for the ribbed things, where a large and a small
cilinder could be used , with the small cilinder continueing into the large
one so it also becomes a closed shape.

I think that for this curved axle (and sortlike airtubes and flexcables) I
will stick to the large files, since the difference when zoomed into is
pretty large with the one on Fredrik Glockner 's page.

thx
Koen



Message has 1 Reply:
  Re: rotation matrices
 
(...) I briefly scanned the page you mentioned, it looks like it should be OK for LDraw. Paul Gyugyi uses a general rotation method for LDLite's ROTATE meta-statement, and I've implemented an equivalent in LDAO's LDL2DAT translator. But I don't know (...) (24 years ago, 18-Oct-00, to lugnet.cad.dat.parts)

Message is in Reply To:
  Re: rotation matrices
 
(...) Could you be more specific? (...) Like what? Again, could you be more specific. (...) There's no general limit. (...) That looks very nice. It's not too surprising you're getting a big file. Have you checked your file for duplicate or (...) (24 years ago, 17-Oct-00, to lugnet.cad.dat.parts)

11 Messages in This Thread:



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

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

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