POV-Ray : Newsgroups : povray.binaries.utilities : place objects on mesh - PERL script : place objects on mesh - PERL script Server Time: 25 Apr 2019 21:43:28 GMT
  place objects on mesh - PERL script  
From: David El Tom
Date: 22 Sep 2005 00:26:16
while trying to model something hairy, I came up with a small PERL 
script that parses an include file with mesh data in mesh2 format and 
creates an include file with arrays of evenly distributed points on the 
mesh and corresponding normals as well as uv informations (if aviable).

Why an external script, you may ask.
The answer is, that I found no way to access the internal data of a 
declared mesh. So I would had to write a parser in SDL to parse the mesh 
include file.
PERL seemed the better choice to me as it is made to analyse and process 
text files (Practical Extraction and Report Language), also I found
that there is an significant speed difference in using this script and 
parsing the result in POVRay compared with pure SDL.

One of the early versions of this script createt an include with over 
1.7 million points and normals form a mesh with roughly 68000 facettes 
in ca. 40 sec.

know issuses are high memory consumption if placing huge numbers of points.

use and / or modify at your will.

would be nice if you drop me a message if you have suggestions for 

... dave

Post a reply to this message

Download 'us-ascii' (20 KB)

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