|
![](/i/fill.gif) |
Le 07/12/2013 18:24, Juergen nous fit lire :
> 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.
Do you need to know the t* & r*, or just to have them available as a
transform for your macro ?
Look around
http://wiki.povray.org/content/Documentation:Tutorial_Section_2.2#Matrix
If you really need t* & r*, then you need to learn how to transform each
operation as a weighted 4D matrix, multiply them in order and interpret
it (if possible) to extract r* & t*.
But I doubt it would be possible.
(The single transform with a single 4D matrix is no problem, but it
seldom turn to be only a translate+rotate )
Post a reply to this message
|
![](/i/fill.gif) |