POV-Ray : Newsgroups : povray.general : "Mesh2" alternative for general polygons? Server Time
26 Nov 2024 09:24:30 EST (-0500)
  "Mesh2" alternative for general polygons? (Message 1 to 4 of 4)  
From: Alex
Subject: "Mesh2" alternative for general polygons?
Date: 21 Dec 2010 08:25:00
Message: <web.4d10a9b3d820f1b865f972c60@news.povray.org>
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?

Many thanks in advance for your response (and Happy Holidays)!
Alexander


Post a reply to this message

From: clipka
Subject: Re: "Mesh2" alternative for general polygons?
Date: 21 Dec 2010 09:24:09
Message: <4d10b889$1@news.povray.org>
Am 21.12.2010 14:20, schrieb Alex:
> 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?

As POV-Ray can only handle triangular meshes, you'd need to subdivide 
the polygons into triangles first. If we're talking about externally 
generated meshes (e.g. .obj files) I think PoseRay, for instance, can do 
such a thing.


Post a reply to this message

From: Le Forgeron
Subject: Re: "Mesh2" alternative for general polygons?
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

From: Alex
Subject: Re: "Mesh2" alternative for general polygons?
Date: 21 Dec 2010 17:05:01
Message: <web.4d1123a1a7eb6d501f33d0170@news.povray.org>
Le_Forgeron <lef### [at] freefr> wrote:
> 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'.

Great - this has clarified a lot - many thanks!
Alexander


Post a reply to this message

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