POV-Ray : Newsgroups : povray.advanced-users : How to do a fill in : Re: How to do a fill in Server Time
26 Sep 2024 17:45:01 EDT (-0400)
  Re: How to do a fill in  
From: Josh English
Date: 17 Jan 2001 16:44:47
Message: <3A6612A3.AE801980@spiritone.com>
Choose a point in the center of the object and create a mesh of triangles,
taking two points and connecting them with the center.
You may create internal "rings" depeding on how your xy points are set up, then
you can add the height.

So if your points are in an array of position vectors

#decalre points = array[5]
 { <1,0,0> <1,0,1> <0,0,1> <-1,0,0> <0,0,-1> }
mesh{
#declare cnt = 1;
#while ( cnt < dimension_size(points,1) )
  triangle { <0,0,0> points[cnt] points [cnt-1] }
  #declare cnt = cnt + 1;
#end
texture definition
} // end mesh

That should get you started, then you can start to play with height values. If
you want to smooth them out, take a look at
http://www.spiritone.com/~english/cyclopedia/smooth2.html

Josh

Geoff Wedig wrote:

> I have a set of points on the XY plane which have a clockwise order to form
> a shape.  I want to fill this shape with something.  I can't use a prism
> object for this purpose as it will eventually add a height element.  Does
> anyone know how to generate a mesh to do this?
>
> Geoff

--
Josh English -- Lexiphanic Lethomaniac
eng### [at] spiritonecom
The POV-Ray Cyclopedia http://www.spiritone.com/~english/cyclopedia/


Post a reply to this message

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