POV-Ray : Newsgroups : povray.general : Objects on a slope : Re: Objects on a slope Server Time
31 Jul 2024 12:25:21 EDT (-0400)
  Re: Objects on a slope  
From: Jim Holsenback
Date: 13 Mar 2007 09:43:40
Message: <45f6b89c@news.povray.org>
"Warp" <war### [at] tagpovrayorg> 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


 

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