Mail Archives: geda-user/2015/09/13/17:00:44
On Sep 13, 2015, at 2:31 PM, DJ Delorie <dj AT delorie DOT com> wrote:
>
>> What I meant to say is that the rational number solution is
>> gridless. It has a base unit, but you can have coordinates like
>> 45634/1299709.
>
> Understood, but even a common angle like 60 degrees can't be
> represented exact ly as a rational fraction.
Yes. But that’s more of a problem with floating point. What you really want in the Cartesian representation is sines and cosines, but sin( 60 degrees ) is irrational, not representable in floating point.
If you represented geometry as expressions in sympy, you could could have a closed, error free system for any displacement or rotation you can practically describe. But that might be a bit much.
>
> I agree that storing angles as vectors makes sense, but I'm thinking
> of accumulated error and undo; storing the original angle as an angle
> might be useful too.
>
Perfect undo is easy. Angles are represented by pairs of integers, with no roundoff error within that closed system. You only accumulate error with respect to your external expectations going forward. But how many layers of rotation do you typically have in a practical design? Maybe three, four? Within the system, all calculations are exact.
John Doty Noqsi Aerospace, Ltd.
http://www.noqsi.com/
jpd AT noqsi DOT com
- Raw text -