On Thu, 13 Apr 2000, [EMAIL PROTECTED] wrote:
> On 12 Apr 2000, Lars Clausen wrote:
>
>> On Thu, 13 Apr 2000, [EMAIL PROTECTED] wrote:
>>
>> > I just checked in a few more distance algorithms to geometry.c, and
>> > made the new polyshape use the polygon distance algorithm. The
>> > polyshape is now much nicer to work with :)
>>
>> You too? I put mine in polyshape itself, though.
> The stuff in lib/polyshape.c seemed to only look at distance from the
> edges. Interior points were not returning a distance of 0. My code
> fixes this.
That's how it was, until today. I also implemented a proper interior-point
detection algorithm (both, in fact, though I haven't tested the winding
version). Check an update.
> Here are the bezier distance algorithm prototypes. You can do both open
> bezier lines and closed beziergons (or whatever you call them :)
>
> /* bezier distance calculations */
> extern real distance_bez_seg_point(Point *b1, Point *b2, Point *b3, Point *b4,
> real line_width, Point *point);
> extern real distance_bez_line_point(BezPoint *b, guint npoints,
> real line_width, Point *point);
> extern real distance_bez_shape_point(BezPoint *b, guint npoints,
> real line_width, Point *point);
>
>
> I should probably get lib/bezierconn.c to use these distance functions.
> They should be fairly easy to use for your beziergon object though.
Very nice! That means once the polygon is ready (still have problems with
the connectionpoints), it'll be trivial to do the beziergon.
One thing about bezier{line,gon}: The two control lines around a point are
currently joined together. Is anybody interested in having the ability to
break them apart so they can move independently? (Or did I ask this
already?) It's almost, but not quite, trivial.
-Lars
--
Lars Clausen (http://shasta.cs.uiuc.edu/~lrclause) | H�rdgrim of Numenor
"I do not agree with a word that you say, but I | Retainer of Sir Kegg
will defend to the death your right to say it." | of Westfield
--Evelyn Beatrice Hall paraphrasing Voltaire | Chaos Berserker of Khorne