> To re-create:
> 1) Set a sector to angle=90 > 2) increase angle by 90 > > When heading is not 0 the straight lines in the sector, are not straight. I played with sectors for a while and I could not reproduce this. For me, it was never more than one or two pixels from straight. Could you provide more detail please? David _______________________________________________ etoys-dev mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/etoys-dev |
My problem was it was more than 1 pixel from straight. See image below:
So I guess I don't understand why the X value for pts A and B can't be equal (same for the Y value of A and C).
Below is a 180 degree angle that is a pixel off. WARNING - I am about to make a comment on code I do NOT fully understand (let alone the vagueries of sin/cos or floating point arithmetic is Squeak, but that never stopped me before :D)
Perhaps if we started with 3 vertices instead of two and calculated only the points on the Circle. Cheers, Stephen On Sat, Dec 8, 2012 at 12:22 PM, David Corking <[hidden email]> wrote: > To re-create: _______________________________________________ etoys-dev mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/etoys-dev |
Steve Thomas wrote:
> My problem was it was more than 1 pixel from straight. .... > > Perhaps if we started with 3 vertices instead of two and calculated only the points on the > Circle. You are right: there is more than one way to calculate the vertices. However, open an inspector on a Sector and look at the vertices. It turns out that only a very small error accumulates from the step by step method Etoys uses. (For me it was only the last 2 or 3 decimal places.) That error is several decimal places too small to be visible on the screen. Set your sector's border width to zero. When I tried this, the sector looked pixel perfect. So as far as I can see, this isn't a bug in Sector, but there could be an opportunity for a small improvement in the way Etoys draw borders. Just my thoughts. David _______________________________________________ etoys-dev mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/etoys-dev |
David,
Thanks for your thoughts and your activity (here and in tracker). Good to see you back and active!!! Stephen
On Mon, Dec 10, 2012 at 12:32 PM, David Corking <[hidden email]> wrote:
_______________________________________________ etoys-dev mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/etoys-dev |
Free forum by Nabble | Edit this page |