|
|
In article <38d90a6e$1@news.povray.org>, "Simen Kvaal"
<sim### [at] studentmatnatuiono> wrote:
> Given an object (for example an arbitrary isosurface). Is it any way
> to calculate, using for example trace, the lower y-coordinate, for
> example, so that I can place it as close as possible to the ground?
Usually, this will work:
#declare groundHeight = 0; // distance along y-axis of ground
#declare MyObj =
...object declaration...
object {MyObj
translate y*(groundHeight-min_extent(MyObj).y)
}
However, with some objects(like blobs), it is imprecise. The min_extent
function returns the lower left front(-x,-y,-z) corner of the bounding
box of the object, and the bounding box is not always exactly
calculated(it would be too difficult to calculate for some objects). It
should work fine for isosurfaces, though.
--
Christopher James Huff - Personal e-mail: chr### [at] yahoocom
TAG(Technical Assistance Group) e-mail: chr### [at] tagpovrayorg
Web page: http://chrishuff.dhs.org/
Post a reply to this message
|
|