POV-Ray : Newsgroups : povray.general : help with rotation, gimbal lock? quaternions? : Re: help with rotation, gimbal lock? quaternions? Server Time
6 Aug 2024 14:23:04 EDT (-0400)
  Re: help with rotation, gimbal lock? quaternions?  
From: Peter Popov
Date: 9 Mar 2002 09:56:07
Message: <6slj8u4c7c2sjefvbsajhvhkga0889vv54@4ax.com>
On Fri, 8 Mar 2002 14:25:40 -0800, "=Bob=" <bob### [at] threestrandscom>
wrote:

>I'm afraid I just don't have the background to
>understand this yet. But I have need to know
>the angles for x,y and z of a tangent to a sphere
>that has been rotated on all axes. From what I
>have read, quaternions are the answer to this.
>Could someone point me to a way to implement
>this in Pov? Maybe someone has already made
>a set of macros?

Do it the POV way. Compute the transformation that would transform a
unit sphere into your sphere, then take the point you want to find the
tangent at, inverse-transform it to the unit sphere, find the normal
at that point (for a sphere it's easy -- vnormalize(point) :)) and
transform that normal back to your sphere. And the tangent is easy
when you have the normal.

Hope I didn't mess this up.


Peter Popov ICQ : 15002700
Personal e-mail : pet### [at] vipbg
TAG      e-mail : pet### [at] tagpovrayorg


Post a reply to this message

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