POV-Ray : Newsgroups : povray.newusers : Function to turn distance vector into angle vector Server Time
23 Nov 2024 12:15:20 EST (-0500)
  Function to turn distance vector into angle vector (Message 1 to 3 of 3)  
From: John Greenwood
Subject: Function to turn distance vector into angle vector
Date: 27 Jul 2014 07:55:00
Message: <web.53d4e83c27a32899a7cafab50@news.povray.org>
I want animate a move an object from <x1,y1,z1> to <x2,y2,z2> and i want the
object to face in the direction of movement.

Is there a simple function that will calculate the angles for the instruction
rotate<ax,ay,az> from the vector <x1-x2,y1-y2,z1-z2> ?

John


Post a reply to this message

From: Warp
Subject: Re: Function to turn distance vector into angle vector
Date: 28 Jul 2014 00:55:34
Message: <53d5d7c6@news.povray.org>
John Greenwood <nomail@nomail> wrote:
> I want animate a move an object from <x1,y1,z1> to <x2,y2,z2> and i want the
> object to face in the direction of movement.

> Is there a simple function that will calculate the angles for the instruction
> rotate<ax,ay,az> from the vector <x1-x2,y1-y2,z1-z2> ?

Reorient_Trans() in transforms.inc.

http://wiki.povray.org/content/Reference:Transforms.inc

-- 
                                                          - Warp


Post a reply to this message

From: John Greenwood
Subject: Re: Function to turn distance vector into angle vector
Date: 28 Jul 2014 03:50:01
Message: <web.53d5ff79ea0cdeb1a7cafab50@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:
> John Greenwood <nomail@nomail> wrote:
> > I want animate a move an object from <x1,y1,z1> to <x2,y2,z2> and i want the
> > object to face in the direction of movement.
>
> > Is there a simple function that will calculate the angles for the instruction
> > rotate<ax,ay,az> from the vector <x1-x2,y1-y2,z1-z2> ?
>
> Reorient_Trans() in transforms.inc.
>
> http://wiki.povray.org/content/Reference:Transforms.inc
>
> --
>                                                           - Warp
Thanks
John


Post a reply to this message

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