www.delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2015/09/14/00:06:18

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
X-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20120113;
h=mime-version:in-reply-to:references:date:message-id:subject:from:to
:content-type;
bh=pQTTBsQIfG2HQ+mVGixY2vQeknZ84dG3BJnLHQn9VJ0=;
b=ic0uTv0EYgcOdy52SeRtCWRWw0Bgzcs15rE3IeFllDnimuuhzl9UOc4Lps6HysYL4I
NuhkaXWrI4IYku8GWCrVCcRbgqkPGeEyJmW12gxMyNl+ACCHreJGz8KA0C/QHkDolXyb
9gv6/sSD8oBEG0dgs1c7rATri3iYD7EtWk7AiMalkvU8ABgt+GKheu90TkbXXQ0KO2BS
3vk0Zi5CBEHrqdbVwb+WX/5hhlBRpfxZwkN/WwLXNe3+zBLKnImu2nIVaamSozdM8Vh2
V6AquC+a8PaesN1iSnHmJzg0ckAiQvucNPx7Iy/1fdwJZOvePWh76m/EZ1paHTRO61Xq
umwQ==
MIME-Version: 1.0
X-Received: by 10.194.21.199 with SMTP id x7mr24500753wje.63.1442203542380;
Sun, 13 Sep 2015 21:05:42 -0700 (PDT)
In-Reply-To: <F19A9B9C-C544-4B76-AF8B-EA981B6BA952@noqsi.com>
References: <20150913140631 DOT 1da1b78d AT jive DOT levalinux DOT org>
<201509131529 DOT t8DFTUVS022118 AT envy DOT delorie DOT com>
<B0EDB76E-F0DE-4A05-97FC-A405489ACA5A AT noqsi DOT com>
<201509131824 DOT t8DIOCBc028428 AT envy DOT delorie DOT com>
<B03281A2-123E-4F54-B3AA-CB8CCB09F1B1 AT noqsi DOT com>
<201509132031 DOT t8DKVH0P000824 AT envy DOT delorie DOT com>
<AB671235-711B-4ECD-9015-515A5BFC6955 AT noqsi DOT com>
<201509132148 DOT t8DLmxI6003481 AT envy DOT delorie DOT com>
<D8151856-4B93-4826-A80F-E00578A2E93C AT noqsi DOT com>
<201509132300 DOT t8DN0sE6006134 AT envy DOT delorie DOT com>
<7EF3E562-BC7F-4853-B90A-29726FDFEBF6 AT noqsi DOT com>
<201509132319 DOT t8DNJBjC006829 AT envy DOT delorie DOT com>
<40057B48-2FD4-4A37-A01E-9344F6C33ADF AT noqsi DOT com>
<201509140138 DOT t8E1cqY1011780 AT envy DOT delorie DOT com>
<F19A9B9C-C544-4B76-AF8B-EA981B6BA952 AT noqsi DOT com>
Date: Sun, 13 Sep 2015 20:05:42 -0800
Message-ID: <CAC4O8c_ssi8c5BWerp6RFNXsg+dbdMEh6JMcRVxkvdNkFMamaA@mail.gmail.com>
Subject: Re: [geda-user] Apollon
From: "Britton Kerin (britton DOT kerin AT gmail DOT com) [via geda-user AT delorie DOT com]" <geda-user AT delorie DOT com>
To: geda-user AT delorie DOT com
Reply-To: geda-user AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: geda-user AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

--047d7b5d95cbd66782051fad2d0d
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On Sun, Sep 13, 2015 at 6:03 PM, John Doty <jpd AT noqsi DOT com> wrote:

>
> On Sep 13, 2015, at 7:38 PM, DJ Delorie <dj AT delorie DOT com> wrote:
>
> >
> > So... internally *every* value is a fraction?
>
> Yep.
>
> >  I imagine integer
> > overflow might be a non-trivial problem to solve.
>
> Not one you need to worry about in a language that supports rationals. I
> use rationals in Mathematica all the time: floating point is poison to
> complicated algebra. The techniques are well know and efficient, although
> not as efficient as floating point hardware.
>
> >
> > But if the whole point is to defer imprecise operations, what is the
> > advantage of this over just storing the angles as degrees and doing
> > the math on the fly?
>
> The problem is that you=E2=80=99ll accumulate error when you have both ro=
tations
> and translations.
>

There's no dynamics modeling going on here, we're talking about interactive
movements of parts.  So there's no error buildup and using rationals seems
to address a non-problem.  If its disturbing to have 60 become 59.9999
after two rotations put angles in bins fine enough to represent what you
need.  If it's a problem if edges of a large part might alias under
different rotations, use angular bins small enough to discriminate between
adjacent cells at the far corner of your board.  1 1m board with um grid
needs maybe 10M angular bins to make a slam dunk, not so many really

--047d7b5d95cbd66782051fad2d0d
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><div class=3D"gmail_extra"><br><div class=3D"gmail_quo=
te">On Sun, Sep 13, 2015 at 6:03 PM, John Doty <span dir=3D"ltr">&lt;<a hre=
f=3D"mailto:jpd AT noqsi DOT com" target=3D"_blank">jpd AT noqsi DOT com</a>&gt;</span> w=
rote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;borde=
r-left:1px #ccc solid;padding-left:1ex"><span class=3D""><br>
On Sep 13, 2015, at 7:38 PM, DJ Delorie &lt;<a href=3D"mailto:dj AT delorie DOT co=
m">dj AT delorie DOT com</a>&gt; wrote:<br>
<br>
&gt;<br>
&gt; So... internally *every* value is a fraction?<br>
<br>
</span>Yep.<br>
<span class=3D""><br>
&gt;=C2=A0 I imagine integer<br>
&gt; overflow might be a non-trivial problem to solve.<br>
<br>
</span>Not one you need to worry about in a language that supports rational=
s. I use rationals in Mathematica all the time: floating point is poison to=
 complicated algebra. The techniques are well know and efficient, although =
not as efficient as floating point hardware.<br>
<span class=3D""><br>
&gt;<br>
&gt; But if the whole point is to defer imprecise operations, what is the<b=
r>
&gt; advantage of this over just storing the angles as degrees and doing<br=
>
&gt; the math on the fly?<br>
<br>
</span>The problem is that you=E2=80=99ll accumulate error when you have bo=
th rotations and translations.<br></blockquote><div><br></div><div style=3D=
"">There&#39;s no dynamics modeling going on here, we&#39;re talking about =
interactive movements of parts.=C2=A0 So there&#39;s no error buildup and u=
sing rationals seems to address a non-problem.=C2=A0 If its disturbing to h=
ave 60 become 59.9999 after two rotations put angles in bins fine enough to=
 represent what you need.=C2=A0 If it&#39;s a problem if edges of a large p=
art might alias under different rotations, use angular bins small enough to=
 discriminate between adjacent cells at the far corner of your board. =C2=
=A01 1m board with um grid needs maybe 10M angular bins to make a slam dunk=
, not so many really =C2=A0</div><div>=C2=A0</div></div></div></div>

--047d7b5d95cbd66782051fad2d0d--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019