POV-Ray : Newsgroups : povray.general : Object point_at? : Re: Object point_at? Server Time
20 Nov 2024 06:25:47 EST (-0500)
  Re: Object point_at?  
From: Tor Olav Kristensen
Date: 13 Oct 2001 14:03:36
Message: <3BC881DA.47ED53C2@hotmail.com>
Mahalis wrote:
> 
> How would I rotate a sphere so that a certain point on the sphere would
> point at location<x,y,z>?

Mahalis wrote:
> 
> How would I rotate a sphere so that a certain point on the sphere would
> point at location<x,y,z>?

You can find the code for my ReorientMatrix() macro here:

news://news.povray.org/3B8ECB7D.571A4BE2%40hotmail.com
(In my reply to Dave Dunn's "Vexing Vector Problem" 31. Aug.)

And then you may write something like this:

#declare YourSphere = ... // You specify
#declare vPointOnSphere = ... // You specify
#declare vPointAtLocation = <LocX, LocY, LocZ>;

object {
  YourSphere
  ReorientMatrix(vPointOnSphere, vPointAtLocation)
}


Hopefully this will do the trick for you.

(My ReorientMatrix() macro does the same as 
John Van Sickle's Reorient() macro, but with
a slightly different method.)


Tor Olav


Post a reply to this message

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