Re: transformations to MatrixTransform?

Adrian Scott ([email protected])
Thu, 19 Oct 95 14:07:41 PDT


>
> I am envisioning a tool that turns Rotation, Translation, Scale, and
> Transform nodes into MatrixTransform nodes, i.e. adjacent tranformation
> nodes are multiplied into a single MatrixTransform. Really, this only needs
> to be a text processor that can recognize scope and do matrix
> multiplication. (I forgot to mention it above, but it is trivial to
> multiply in a MatrixTransform node as well.)
>
> If such a thing exists, I would like to know about it. If not, I am
> considering writing it myself. Having no desire to learn perl (which is to
> say putting it off as long as possible, expecting it to be inevitable), I
> would write it in C. Anyone have any suggestions?
>
> --Greg
>
>

hi Greg and co.

you could do this pretty easily (especially in Perl!! if you know c
you can learn it very quickly).

just implement it as doing matrix multiplications

s1 0 0 0 0 0 0 t1
0 s2 0 0 0 0 0 t2
0 0 s3 0 0 0 0 t3
0 0 0 1 for scale 0 0 0 1 for translations , little bit

harder for rotations, hope i got all these right from my hsad...


the nice thing about doing it in perl is that you would use
the grsat pattern matching capabilities of Perl to make it easy
to transform an existing VRML file this way.

just make sure you get the order of the matrices correct when you're
multiplying them!!!

---

Adrian Scott, Ph.D. [email protected] the mutaT1n9 .s1g


  • Next message: Keith D Rule: "A couple of DEF questions."
  • Previous message: Linas Vepstas: "Re: Locking (Was Re: Behaviours (Was: Re: ADMIN: VRML + JAVA - A Wedding))"
  • In reply to: Anthropohedron: "transformations to MatrixTransform?"
  • Next in thesad: Bernie Roehl: "Re: transformations to MatrixTransform?"