LDraw to Web


LDraw to Web
#1
Hi- I've been working on a converter to take ldraw dat files and parse them so they can be displayed in 3d in a canvas element on any web page. So far, I've had no problem doing this with any single parts (it works great), but I'm having trouble with assemblies (single dat files, with other referenced dat files). What's tripping me up is the 3d transformations.

I'm trying to understand the calculations that are at: http://www.ldraw.org/Article218.html#lt1


In the calculation:
u' = (a * u) + (b * v) + (c * w) + x;
v' = (d * u) + (e * v) + (f * w) +y;
w' = (g *u) + (h * v) + (i * w) + z;

Is u, v, and w the X, Y, Z coords of the vertices that we're transforming under the part itself, and the x, y, z come from the line type 1, where it gives the origin of the entire part?

My results that I seem to be getting are somewhat of a smeared part in one direction. This tells me that some of the vertices are transforming, but not all. I just need to double check that I'm doing this in the correct order.
Reply
« Next Oldest | Next Newest »



Messages In This Thread
LDraw to Web - by Nick McBride - 2011-09-09, 19:32
Re: LDraw to Web - by Roland Melkert - 2011-09-09, 21:32
Re: LDraw to Web - by Nick McBride - 2011-09-11, 15:22
Re: LDraw to Web - by Roland Melkert - 2011-09-11, 17:21
Re: LDraw to Web - by Nick McBride - 2011-09-11, 20:11
Re: LDraw to Web - by Nick McBride - 2011-09-13, 15:58
Re: LDraw to Web - by Jim DeVona - 2011-09-17, 14:37
why not use JavaScript ? - by Steffen - 2011-09-27, 17:44

Forum Jump:


Users browsing this thread: 1 Guest(s)