RE: Rotation matrix
2020-02-23, 21:26 (This post was last modified: 2020-03-02, 1:07 by Michael Horvath.)
2020-02-23, 21:26 (This post was last modified: 2020-03-02, 1:07 by Michael Horvath.)
(2020-02-23, 19:49)Orion Pobursky Wrote: Not part of the spec but the standard is 4 decimal places for rotation matrices. To prevent rounding errors, in LDDP I use full floating point precision though all the math and then round as the final step before displaying the line.
Thanks.
If anyone is interested, I created two new tools in this folder:
https://github.com/mjhorvath/Datsville/t...mpdcalcpos
### mpd2json
Tries to convert an MPD model file to JSON format. Caveat: ignores most meta commands, strips all comments.
### mpdcalcpos
Calculates the "final" or "flattened" coordinates and rotation matrices for sub-models and parts in an MPD file. The MPD file has to be converted to JSON first using mpd2json.
For the command line syntax, refer to the Windows batch files in the same folder. I should really rewrite these tools in Python when I get a chance.