Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

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


Math Forum » Discussions » Software » comp.soft-sys.matlab

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

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View  
Steven Lord

Posts: 17,944
Registered: 12/7/04
Re: triangle color knowing the color of vertices
Posted: Mar 25, 2013 10:48 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply



"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
some criterion of your choice), black (subtractive mixing), white (additive
mixing), or a different color?

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

Without knowing anything about your desired mapping properties about the
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
To contact Technical Support use the Contact Us link on
http://www.mathworks.com




Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.