POV-Ray : Newsgroups : povray.general : translation / rotation query : Re: translation / rotation query Server Time
25 Apr 2024 18:15:00 EDT (-0400)
  Re: translation / rotation query  
From: Bald Eagle
Date: 19 Sep 2019 14:05:01
Message: <web.5d83c2894dd2969c4eec112d0@news.povray.org>
Bob Frew <bob### [at] ntlworldcom> wrote:

> Hi and thanks for those replies.

We are ever at your service   :)


> I may have tweaked this, but I did not write it (anyone know who did ?)
> It seems to work well.

Mike Williams?
http://news.povray.org/povray.newusers/message/%3C0B3%2BvIAR3W8BFwZQ%40econym.demon.co.uk%3E/#%3C0B3%2BvIAR3W8BFwZQ%40e
conym.demon.co.uk%3E


> The problem is I don't understand it so I will probably write my own as
> per Bald Eagle suggestion.

Well yeah, Mike's [IIRC] a mathematician, so he goes about things in a peculiar
way.  Highly effective, but often hard to decipher.

There's not a whole lot of mystery to the matrix transform.  You're going to
just composite the two rotations that you want and take the individual
components of that result and distribute it through the x, y, and z parts of the
matrix.   The translate part is along the bottom row.
I find that the more I play with parametrics, the easier it is to visualize how
the parts of the matrix "work".

It's the dot products and cross products and some of the other vector functions
that I usually have to work out in order to really see what's going on.

You could do it the trig way, the vector function way, and the matrix way, or
some other way, and just roll it all into 1 scene / include file with a
#switch - #case - #break - #end block to pick which method you want to use.

Then you have it all worked out and can follow the "long" trig method but see
how it gets condensed into the other shorter methods.


Post a reply to this message

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