|
|
I've been struggling somewhat with the density statement.
I want to specify the density in terms of arbitrary
analytic 1-d functions.
One way is via the generation of density files (df3)....
but this requires an external perl script ( use
pack "SSS" for the header and pack "C" for the data )
and is thus less flexible than in-line code.
Another may be via density maps, but density map bodies
take density bodies, and it is unclear how to specify
a constant, fixed density in a density body.
Does anyone have a simple example?
idealized example (doesn't work -- constants aren't
valid density bodies) :
#macro F(Y) {
(insert function here)
}
density {
gradient y
density_map {
#declare Y = 0;
#declare dY = 0.01;
#while (Y < 1 + dY/2)
[Y F(Y)]
#declare Y = Y + dY;
#end
}
}
thanks,
Dan
--
http://www.flash.net/~djconnel/
Post a reply to this message
|
|