POV-Ray : Newsgroups : povray.general : Convert translate/rotate list to single translate/rotate-Statement : Re: Convert translate/rotate list to single translate/rotate-Statement Server Time
29 Jul 2024 00:31:25 EDT (-0400)
  Re: Convert translate/rotate list to single translate/rotate-Statement  
From: Ger
Date: 7 Dec 2013 14:41:36
Message: <52a379f0$1@news.povray.org>
Juergen wrote:

> Hello,
> 
> I've the following problem:
> I'am using a big smooth_triangle mesh, which I translate and rotate on
> vertics level by macros. The translate's and rotate's are needed for
> modification to the mesh for a later animation.
> 
> After the modification I want to translate/rotate the mesh in it's
> original postion. Currently I'm storing all applied translate/rotate in a
> list and do them backwards. This works but needs lot of parsing time.
> 
> My question is now, how can I convert the list of translate's/rotate's to
> a single translate/rotate statement ?
> 
> 
> translate <1,2,3>
> rotate <30,50,-20>
> translate<-2,4,-5>
> rotate<-40,130,70>
> .....// lots of more transforms
> rotate <10,0,40>
> 
>   |
>   |
>   V
> 
> translate <tx,ty,tz>
> rotate <rx,ry,rz>
> 
> I need the values t?,r? so that I can use them in macros.
> 
> Jürgen

If I understand you correctly, you have a mesh that you act upon 
(rotate/translate/whatever) and then want to go back to the original mesh 
and act again with a different set of rotations/translations.

If so, then the easiest way is to store the mesh on hard disk during the 
first frame and at every following frame load it from disk and apply 
whatever you want to apply. That way you don't have to undo anything but 
start fresh with every frame.

-- 
Ger


Post a reply to this message

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