[futurebasic] Re: [FB] Re: Point to triangle vertices

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : May 2001 : Group Archive : Group : All Groups

From: Robert Covington <artlythere@...>
Date: Fri, 4 May 2001 17:54:03 -0400
>on 5/3/01 5:00 AM, futurebasic-digest-help@... at
>futurebasic-digest-help@... wrote:
>/*
>This will benefit me,  but may be of aid to others...
>
>Given any triangle, and the 3 vertices each being assigned a value of 1.0
>using  (v1,v2,v3) order, come up with a FN that gives the distance of any
>point within the triangle from the 3 vertices measured as a fraction of
>those values.
>
>Point in exact middle, (.5,.5,.5)
>
>Point more toward v1 for example, (.6,.3,.4) all depending on triangle
>shape.
>
>The "attribute" I mention could be thought of as the distance the point is
>from each vertex in a manner of speaking.
>
>Right at vertex v1, then the attribute would be (1.0,0,0)
>
>? Wish I could be more clear. It can also be thought of as the areas of the
>3 subtriangles created by connecting each vertex to that point.
>*/
>
>Robert from your example it sounds like you are talking about a triangle
>inscribed in a circle. If that is the case, do you know the x-y coordinates
>of each vertex, or do you know the radius of the inscribing circle and the
>angle formed by the line from the center to each vertex?
>
>Or did  miss our point completely?
>
>Stewart

Hi Stewart,

I was trying to come up with a U,V coordinate way to describe a point's
color within a triangle whose vertex colors were known.

That inscribing circle stuff comes in handy with delaunay triangulation
approaches though.

Fret not, for I have even missed my own original point, you doing the same
is being company. :)

See the Gouraud code I posted recently for a synopsis of the problem, and
one possible approach.

Thanks,

Robert