|
![](/i/fill.gif) |
Norbert Werner Kern wrote:
> If Norm is your normal vector, you have to rotate your traced object like
> this in order to orient it:
>
> rotate <degrees (atan2 (Norm.z,Norm.y)), 0, -degrees (atan2
> (Norm.x,Norm.y))>
>
>
> Norbert Kern
>
>
Personally, I'd let POV do the work.
#include "Transforms.inc"
#include "maths.inc"
#declare N = <0,0,0> // Initial Normal Vector
#declare S = some_location // The initial position of the object to drop
trace(ENV, S, -y, N)
#if(vlength(N)!= 0)
object {
YourObject
texture { whatever }
Reorient_Trans(y,N)
translate S
}
#end
Here's a good tutorial http://povray.tirnalong.com/ow.asp?DropOnSurface
And I'd be glad to post my macro, simple though it is, upon request.
Regards,
A.D.B
Post a reply to this message
|
![](/i/fill.gif) |