POV-Ray : Newsgroups : povray.general : Outlines of triangles : Re: Outlines of triangles Server Time
1 Aug 2024 16:28:42 EDT (-0400)
  Re: Outlines of triangles  
From: Mike Williams
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

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