"Warp" <war### [at] tag povray org> wrote in message
news:45f551ad@news.povray.org...
> If you want the objects to be aligned to the heightfield (instead of
> all of them being purely vertical), the solution to this is to take the
> normal vector returned by trace() and then use Reorient_Trans() from
> transforms.inc to rotate the object.
Morning,
I've made some progress but have encountered a problem at arriving at the
desired solution.
object {Object rotate y*(360 * DFactor) scale (0.1 * DFactor) Reorient_Trans
(Intercept, SLoc) translate Intercept}
I'm 99% there and after some emperical testing I'm starting to think the
second parameter for the call to Reorient_Trans can't be a fixed point.
Here's what I've observed: SLoc is the location of a small sphere that I'm
using to move around the scene and indeed the objects seem to track the
sphere. What about the objects that happen to be placed on or near the top
of the ridge versus the objects that are placed farther down the slope.
Conceptually the second parameter to Reorient_Trans would need to be another
call to trace but this time the target would be scaled just slightly larger,
but that doesn't sound very elegant. Any ideas?
Jim
Post a reply to this message
Attachments:
Download 'scratch.jpg' (29 KB)
Preview of image 'scratch.jpg'
![scratch.jpg](/povray.general/attachment/%3C45f6b89c%40news.povray.org%3E/scratch.jpg?preview=1)
|