POV-Ray : Newsgroups : povray.advanced-users : Trying to write new HF_ macros, how to cut the mesh? : Re: Trying to write new HF_ macros, how to cut the mesh? Server Time
29 Jul 2024 06:28:38 EDT (-0400)
  Re: Trying to write new HF_ macros, how to cut the mesh?  
From: Christopher James Huff
Date: 10 Nov 2002 12:55:22
Message: <chrishuff-07B2B1.12550310112002@netplex.aussie.org>
In article <web.3dcdf5256f496618178f7f9c0@news.povray.org>,
 "normdoering" <nor### [at] yahoocom> wrote:

> That'a okay. Outputting different formats isn't that big a deal. You just
> need a understanding of the format.

Well, it just calculated the undisplaced positions of each point, 
calculated the displacement for those points, and then wrote a triangle 
with those points. Not well optimized at all, but not limited to a 
rectangular sheet.
BTW, just leaving out triangles will produce ragged edges, you will 
probably need to smooth that out somehow, which would probably be 
easiest if you had an array of vertices and another of validity flags.


> The what? I never saw any early versions (yet) so I don't know what you're
> talking about. I only found out the HF_ macros existed a day or so ago when
> you guys told me they were there.

It was a version of the spherical height field that didn't use a 
rectangular sheet wrapped around the sphere. When you do that, the top 
and bottom get pinched together at the poles, wasting triangles and 
potentially causing visible artifacts. An alternative method is to 
repeatedly subdivide a polyhedron, usually a tetrahedron or octahedron. 
Each level of subdivision increases the number of triangles by 4, so you 
don't get as tight control of the resolution, but the triangles are all 
more or less of equal size and equally spread out, and without the 
obvious patterns leadinging towards the poles. Looks like it disappeared 
when the macros were updated for mesh2.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

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