Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: triangle color knowing the color of vertices
Replies: 1   Last Post: Mar 25, 2013 10:48 AM

 Steven Lord Posts: 18,038 Registered: 12/7/04
Re: triangle color knowing the color of vertices
Posted: Mar 25, 2013 10:48 AM

"Mario Stella" <heisheis88@yahoo.com> wrote in message
news:kip6l0\$hqr\$1@newscl01ah.mathworks.com...
> Good morning everybody,
>
> I have a list of points (vertices) in a 3D space. I have also a list of
> adjacent triangles that have those points as vertices, forming a surface
> in the same space.
> Each vertex has a scalar value associated with it (color).

An index into a colormap?

> I would like to know, is there any standard, fast, reliable way to find
> the color to associate to the triangle, being know the colors of its
> vertices?

What color would be associated with a triangle whose vertices are pure red,
pure green, and pure blue? Should it be pure red, pure green, pure blue (in
these three cases, one of the vertices "win" over the other two based on
mixing), or a different color?

http://en.wikipedia.org/wiki/Color_mixing

only answers we could give would be trivial, like "All the triangles are
associated with black."

> More specifically, can the sum of the color values of the triangles equal
> the sum of the colors values of the vertices? note that Number-Of-Vertices

> > Number-Of-Triangles

Now you're starting to get into mathematical puzzle territory. You could do
this by letting each triangle's color value be the sum of (each vertex's
color value divided by the number of triangles containing that vertex.)
Whether that would satisfy your other requirements, or make sense in the
context of your problem, is unclear. There's no universal mapping from
colors to scalar values and you haven't told us anything about the mapping
YOU'RE using.

--
Steve Lord
slord@mathworks.com