POV-Ray : Newsgroups : povray.general : "Mesh2" alternative for general polygons? : Re: "Mesh2" alternative for general polygons? Server Time
7 May 2024 14:04:55 EDT (-0400)
  Re: "Mesh2" alternative for general polygons?  
From: Le Forgeron
Date: 21 Dec 2010 09:37:35
Message: <4d10bbaf$1@news.povray.org>
Le 21/12/2010 14:20, Alex a écrit :
> Hi,
> 
> The "Mesh2" tool is great, but limited to triangles. If I want the same
> functionality (e.g., defining the vertex normals, colors, etc. per vertex) for a
> set of 'non-triangular' polygons (e.g., a mesh made up by rectangles) - which
> tool can I use then?

Let's just assume you have a polygon with a different colour for each
vertex.
If that polygon is a triangle, there is one obvious way to interpolate
the colour of any point inside that triangle (or even on the border, and
we could even get outside without problem if negative components are ok).

If that polygon has more than 3 vertexes, there is no such easy
interpolation.
Let's take a square has a first polygon. Let's say you have a satisfying
interpolation for all points inside that square.
Now, let's add a fifth point to make the square look like a house (the
fifth point is above the middle of the top segment of the square, making
a roof).
Now, should the value of the fifth point change any of the interpolated
value in the previous square ?
 - Yes and why ?
 - No and why ?
There is no universal solution.

What is true for colour's interpolation is true also for other
properties like normal and so on.

On the same way, there is no obvious decomposition of polygon into
triangle. Each way of decomposition would produce its own artefacts.
(and it will always be the one someone does not want).

Another issue with polygon: they must be planar... which can be a bit
difficult when the computational limit on numbers comes into play (not
all numbers can be stored with efficiency within computers, checking for
planarity is easy, enforcing it is not).

Oh, and there is also the issue of handling self-intersecting "polygon".

So, so much no, and no solutions ?

Well, you might keep using mesh2 and use your own decomposition in
triangles of your polygons (assuming then YOUR choices and their effects).
A classical decomposition is the Delaunay's one... but it's one amongst
many.



-- 
A good Manager will take you
through the forest, no mater what.
A Leader will take time to climb on a
Tree and say 'This is the wrong forest'.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.