POV-Ray : Newsgroups : povray.general : Transformation problems with stellations : Transformation problems with stellations Server Time
7 Aug 2024 19:20:07 EDT (-0400)
  Transformation problems with stellations  
From: Paul Brants
Date: 25 Jun 2001 07:00:34
Message: <3b3719d2$1@news.povray.org>
Hello all over there
It took a little bit of time to figure out how to post a massage to this
newsgroup but here it is :)
I'm new in this group but I would like to post a problem that I have been
struggling with for some weeks now.
I'm adapting the POV-output of Bulatov's Java stellation applet for
polyhedra and it all boils down to the following:
I have a camera (and a lightbattery associated with it) and an object (let
say a stellation, any other thing with as less symmetry as possible in it
should work)

Mat is a transformation matrix (rotation matrix) and MatInv is the transpose
= inverse of Mat (since it is an orthogonal matrix)



#declare Mat = transform {
matrix <  0.78165571362106,   0.53708769568145,   0.31709801719835,
            -0.61788324155864,   0.59747663990276,   0.51111834693297,
             0.08505671733924,  -0.59544812697505,   0.79887851574402,
            0.00000000000000,   0.00000000000000,   0.00000000000000 >
}

#declare MatInv = transform {
matrix <  0.78165571362106,  -0.61788324155864,   0.08505671733924,
            0.53708769568145,   0.59747663990276,  -0.59544812697505,
          0.31709801719835,   0.51111834693297,   0.79887851574402,
          0.00000000000000,   0.00000000000000,   0.00000000000000 >
}


camera
{
  location  <0.0, 0.0, 3.0>
//   transform MatInv
  direction 1.5*z
  right     4/3*x
  look_at   <0.0, 0.0,  0.0>
}

declare Stellation  =
{
// description of Stellation or any other object centered around origin
follows here....
}

object { Stellation
transform Mat
}

Problem :  if  I  comment out the transform Mat line and uncomment the
transform MatInv line,
this is applying the inverse transformation to the camera (and light
battery) location instead of applying the direct transformation to the
object,
it should give (in my humble opinion) the object in the same position, and I
should have the same image, but this is not the case!
What am I doing wrong??

Paul Brants


Post a reply to this message

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