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.
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.