|
|
hi,
happy to announce "hilbert2d".
hilbert2d generates Hilbert curve data, formatted as POV sphere_sweeps,
and stored in "regular" include files.
the usage of the program is fully documented in its man page, a PDF
version is included also.
a couple of demo images, hacked scenes from the distribution, have been
posted in p.b.images.
the command-line options allow customising all aspects of the
sphere_sweep, executing "hilbert2d -h" displays:
hilbert2d - Hilbert curve POV include file generator.
usage: hilbert2d [options]
the available options are:
-a filename with [object modifiers] to insert in data.
-D output a demo scene for the generated curve.
-d N.N diameter of the curve's spheres.
-h display this message.
-N x | y | z axis perpendicular to curve.
-n N curve's length, two to the power of: 2,..,24.
-o filename[.inc] name of the include file to write.
-P N.N required POV-Ray version.
-p name common prefix for declared identifiers.
-r N RNG sequence seed.
-S linear | b | cubic type of spline to use.
-s <x,y,z> | N.N factor(s) by which to scale curve.
-T N.N tolerance value for spline.
-t <x,y,z> | N.N offset by which to translate curve.
-V display the program version.
-v feedback the generator settings.
-w N % limit of (random) coordinate warping.
see "man 1 hilbert2d" for details.
to build extract the archive in an empty directory and "make". there is
no "make install", simply move the executable and the documentation to
suitable places (mine are under /usr/local/).
if you have POV-Ray 3.7 in your path, you can build with "make check"
instead of "make"; the "check" target ends verification of a successful
build by running povray with a generated demo scene file. "make
win-check" for Cygwin. "make clean" removes all generated files.
the program does not use any externals and should build cleanly on any
OS with POSIX support; tested on 64-bit Linux and Windows 7 with Cygwin.
comments and criticisms welcome. :-)
enjoy, jr.
Post a reply to this message
Attachments:
Download 'hilbert2d-0.4.0.tar.gz' (32 KB)
|
|
|
|
hi,
attached is a small script which converts a Hilbert curve from the
sphere_sweep to a union of boxes.
no help or anything. to use either give it the name of an include file
generated by 'hilbert2d' or pipe the data in, eg:
$ hcs2b.tcl mycurve.inc
or
$ hilbert2d | hcs2b.tcl
the output is to stdout, and formatted like:
object {
union {
box {}
:
}
}
enjoy, jr.
Post a reply to this message
Attachments:
Download 'hcs2b.tcl.txt' (3 KB)
|
|
|
|
forgot to mention restrictions. </sigh>
On 10/05/2018 02:08, jr wrote:
> attached is a small script which converts a Hilbert curve from the
> sphere_sweep to a union of boxes.
the curve must be in its default orientation, ie normal axis "y".
don't use warp, other than for "artistic effect".
the script is very basic, there's no documentation, and minimal error
detection.
Post a reply to this message
|
|