POV-Ray : Newsgroups : povray.newusers : Local Co-ordinates : Re: Local Co-ordinates Server Time
4 Nov 2024 23:18:24 EST (-0500)
  Re: Local Co-ordinates  
From: Fidel viegas
Date: 19 Sep 2002 21:32:07
Message: <B9B03842.4D4C%fidel.viegas@artrecognition.co.uk>
> Hello Kalle,
> I've only been using povray a few weeks and don't know very
> much,
> could you please elaborate "move your object into the origin, rotate it, and
> move it back" how do you move it into the origin? I'm sorry, i'm still
> learning all the ins and outs. Thank you for your response.
> 

Suppose your object is place at <4, 5, 1>. What you do is this

object {
  yourobject
  translate -<4, 5, 1> // place the object at the origin <0, 0, 0>
  rotate <45, 0, 0> // just an example
  translate <4, 5, 1> // move the object back to where it was
}

Basicallly, you first move the object to the origin, by translating it by
the negation of its current position. You then rotate it, and after rotating
it, you just move the object to where it was before by translating the same
amount without the '-' sign.

Hope that helps.

Fidel.


Post a reply to this message

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