Rounding Errors in primitives?

RE: Rounding Errors in primitives?
(2021-03-25, 18:42)Tery Hamer Wrote: I'm a newbie, so I am nervous about asking... can someone confirm that either A) I'm talking BS, or B) there are rounding errors in the Official LDraw Primitive .dat files?

These are mostly derived from PrimGen2 (- but I haven't checked all).  Some of these files are perhaps 10 years old. Has anybody noticed this before?

AKAIK the standard is for the vectors in .dat files to be shown to 4 decimal places, removing trailing zeros.

For Rings, Cones the vector points for higher values of radii are a multiple of the cos/sin values of the segment angles times the radius. However, it would appear that the rounding is carried out on the cos/sin for the base radius (1, as used for Circle, Disc, etc), and <then> multiplied. That would be a No-No.  For the base and lower radii, the error may be only 0.0001 in a few cases.  But for the higher radii, these rounding errors mount up and impact the third decimal position.

Scaling up the rounded values might be intentional. It would allow scaled primitives to perfectly align with non-scaled ones. (I'm not saying for sure that it's intentional, just that it might be.)

I took a quick look at 4-4ring3.dat, and it appears to be multiplying the 4-digit rounded numbers by the radii (3 and 4).
« Next Oldest | Next Newest »

Messages In This Thread
RE: Rounding Errors in primitives? - by Travis Cobbs - 2021-03-25, 19:43

Forum Jump:

Users browsing this thread: 1 Guest(s)