[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: pcb GL can't render stretched arcs



2011/7/15 Andrew Poelstra <asp11@xxxxxx>:
> On Thu, Jul 14, 2011 at 03:48:24PM +0200, Igor Lopez wrote:
>> I had a quick look at the routine and must say that I did not grasp
>> the code. It is probably due to some heavy optimizations.
>>
>
> Heavy optimizations, perhap, but also because it is wrong.
>
>
> If you have a full ellipse, then Width and Height are exactly
> what they sound like -- the full length from one side of the
> ellipse to the other.
>
> There is no way right now to rotate the ellipse, so alpha
> from the site you cited is always 0.
>
>
> However, an arc is only a SEGMENT of the ellipse. The segment
> starts at startAngle degrees and continuse for deltaAngle
> degrees counterclockwise. Your code assumes we have a full
> ellipse to intersect with.
>

Ok now I understand.
This means that the requirement for intersecting needs to be expanded
to check that the angle from arc centerpoint to the point is within the arc
segment as well.
The end edges is a little bit tricky due to the rounded corner from the
point radius but a simplification can be made by reducing the startAngle
and increasing the deltaAngle as function of point radius and arc height, width.
The equations must still hold independent if it is just a section of
the ellipse.
No need for an iterative or aproximate solution when point is a circle.
It becomes very easy if the point has no extension, e.g radius = 0.

In my equations I do have taken into account rotated arcs.

> --
> Andrew Poelstra
> Email: asp11 at sfu.ca OR apoelstra at wpsoftware.net
> Web:   http://www.wpsoftware.net/andrew/
>
>
>
> _______________________________________________
> geda-user mailing list
> geda-user@xxxxxxxxxxxxxx
> http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
>


_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user