POV-Ray : Newsgroups : povray.general : Outlines of triangles Server Time
29 Nov 2024 17:56:46 EST (-0500)
  Outlines of triangles (Message 1 to 8 of 8)  
From: B
Subject: Outlines of triangles
Date: 12 Jul 2005 07:00:01
Message: <web.42d3a1a4b8be99848e260050@news.povray.org>
Hi,

how can I draw the outlines of triangles in a mesh? Is there for example a
function which computes the distance of any point to the nearest triangle
boundary, for use in a color/pigment map?

Thanks.


Post a reply to this message

From: PM 2Ring
Subject: Re: Outlines of triangles
Date: 12 Jul 2005 07:45:00
Message: <web.42d3acf58612cf391917bb8b0@news.povray.org>
"B" <nomail@nomail> wrote:
> Hi,
>
> how can I draw the outlines of triangles in a mesh?

I don't think there's an easy way to do this, but I'd love someone to show
me that I'm wrong. :)

> Is there for example a
> function which computes the distance of any point to the nearest triangle
> boundary, for use in a color/pigment map?

Not really. Do you have to do this with a mesh? I normally make such grids
in POV using cylinders & spheres.

It hurts me to say this, but maybe you should consider using a mesh-based
renderer with built-in wireframe capabilities for this job...


Post a reply to this message

From: Mike Williams
Subject: Re: Outlines of triangles
Date: 12 Jul 2005 07:54:09
Message: <BsaM1AAF960CFwQ7@econym.demon.co.uk>
Wasn't it B who wrote:
>Hi,
>
>how can I draw the outlines of triangles in a mesh? Is there for example a
>function which computes the distance of any point to the nearest triangle
>boundary, for use in a color/pigment map?

You can't do it directly in POV from the mesh/mesh2 object.

If you're generating the mesh in POV code, then you can generate a set
of thin cylinders instead of the mesh, which is what I do for the third
image in this page:
<http://www.econym.demon.co.uk/isotut/param.htm>

I'm pretty sure that it's not possible to use POV to #read a file that
contains a mesh and extract the information required to generate a set
of thin cylinders, because POV can only #read things that are simple
sets of comma separated values.

You could read through a file that contains a mesh with an external
program and extract the information required to generate a set of thin
cylinders. Perl and Python would be good easy scripting languages for
this sort of task, but any other computer language that you're familiar
with would probably work too.

Hint: it's not worth the bother of eliminating duplicate cylinders, so
just collect data for all the edges of all the polygons. It doesn't
matter that every line is two identical coincident cylinders as long as
they don't have different textures. Some pixels will come from one
cylinder of the pair and some from the other but you don't observe a
coincident surface problem because the pixels from each pair are
identical.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: Warp
Subject: Re: Outlines of triangles
Date: 12 Jul 2005 08:48:15
Message: <42d3bc0f@news.povray.org>
Mike Williams <nos### [at] econymdemoncouk> wrote:
> You could read through a file that contains a mesh with an external
> program and extract the information required to generate a set of thin
> cylinders.

  You mean like this?
http://geocities.com/ccolefax/pcm.html

-- 

                                                          - Warp


Post a reply to this message

From: B
Subject: Re: Outlines of triangles
Date: 19 Jul 2005 07:40:00
Message: <web.42dce6358612cf3948e260050@news.povray.org>
> > You could read through a file that contains a mesh with an external
> > program and extract the information required to generate a set of thin
> > cylinders.

My mesh is actually generated with python, but I refuse the cylinder idea.
I do not want to influence the geometry, but the pigment, and a function
like the one I motivated above would do.  Thanks anyway, it does not seem
to work.


Post a reply to this message

From: PM 2Ring
Subject: Re: Outlines of triangles
Date: 19 Jul 2005 08:25:00
Message: <web.42dcef058612cf39d46eca60@news.povray.org>
"B" <nomail@nomail> wrote:
> > > You could read through a file that contains a mesh with an external
> > > program and extract the information required to generate a set of thin
> > > cylinders.
>
> My mesh is actually generated with python, but I refuse the cylinder idea.
> I do not want to influence the geometry, but the pigment, and a function
> like the one I motivated above would do.  Thanks anyway, it does not seem
> to work.

How about using the cylinders in an Object Pattern to paint your mesh? This
won't affect the mesh geometry at all, but it does mean you have to build
two (or more) objects, not just one.

I used this technique here: <web.425b6e5da45a985aad93754b0@news.povray.org>

There are two different Penrose tilings in this scene. One generates the
tile shapes, the other generates objects to paint the tiles with. In the
POV 3.6 docs see 3.5.11.23  Object Pattern.


Post a reply to this message

From: B
Subject: Re: Outlines of triangles
Date: 1 Aug 2005 09:10:01
Message: <web.42ee1f0f8612cf3948e260050@news.povray.org>
> How about using the cylinders in an Object Pattern to paint your mesh? This
> won't affect the mesh geometry at all, but it does mean you have to build
> two (or more) objects, not just one.

I may try that.  I hope it does not take ages to render.  Thanks.


Post a reply to this message

From: PM 2Ring
Subject: Re: Outlines of triangles
Date: 1 Aug 2005 10:35:01
Message: <web.42ee32198612cf391befe64a0@news.povray.org>
"B" <nomail@nomail> wrote:
> > How about using the cylinders in an Object Pattern to paint your mesh? This
> > won't affect the mesh geometry at all, but it does mean you have to build
> > two (or more) objects, not just one.
>
> I may try that.  I hope it does not take ages to render.

Well, the Object Pattern is slowish, but I've used fancy function-based
patterns that were slower.

> Thanks.

No worries. Let us know how it goes.


Post a reply to this message

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