![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Is there a way to change the local co-ordinates of an object or grouped
objects so that when you rotate that object it moves around that point. Like
how you can do it in Moray. But when I use the pov. scene Moray emits it
hasn't converted the co-ordinates.
Thank you,
your help will be greatly appreciated.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"insomniac" <lee### [at] hotmail com> schrieb im Newsbeitrag
news:web.3d8a4bb0ae2b17b330411fcf0@news.povray.org
> Is there a way to change the local co-ordinates of an object or
> grouped objects so that when you rotate that object it moves around
> that point. Like how you can do it in Moray. But when I use the pov.
> scene Moray emits it hasn't converted the co-ordinates.
>
> Thank you,
> your help will be greatly appreciated.
You have to move your object into the origin, rotate it, and move it back.
Maybe a little macro will do:
#macro Rotate_around (RotVector, Position)
translate -Position
rotate RotVector
translate Position
#end
Maybe such a macro is already in the includes which are shipped with POV-Ray,
but I don't know.
Kalle
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
KalleK wrote:
>
>You have to move your object into the origin, rotate it, and move it back.
>
>Maybe a little macro will do:
>
>#macro Rotate_around (RotVector, Position)
> translate -Position
> rotate RotVector
> translate Position
>#end
>
>Maybe such a macro is already in the includes which are shipped with POV-Ray,
>but I don't know.
>
>Kalle
>
************************************************
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.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
What i've got is a grouped object (a Table Lamp), it rotates around the
world coordinates and I want it to rotate around the edge base of the lamp
so I can animate it falling over.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
insomniac <lee### [at] hotmail com> wrote:
> What i've got is a grouped object (a Table Lamp), it rotates around the
> world coordinates and I want it to rotate around the edge base of the lamp
> so I can animate it falling over.
translate -edge_base_of_the_lamp
rotate whatever
translate edge_base_of_the_lamp
--
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
> 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
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Fidel viegas wrote:
>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.
************************************************
Hey that worked! Thanks a lot for your help.
insomniac.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |