|
|
"Arie L. Stavchansky" wrote:
>
> Hi Everybody :)
>
> Is it possible to rotate any object around an arbitrary point, instead of
> the origin?
>
In Povray 3.5 there is a Rotate_Around_Trans() macro in 'transforms.inc'.
Christoph
--
Christoph Hormann <chr### [at] gmxde>
IsoWood include, radiosity tutorial, TransSkin and other
things on: http://www.schunter.etc.tu-bs.de/~chris/
Post a reply to this message
|
|
|
|
Christoph Hormann <chr### [at] gmxde> wrote:
: In Povray 3.5 there is a Rotate_Around_Trans() macro in 'transforms.inc'.
Perhaps it could be good to say how it works. This way he can learn
something and perhaps be able to use this knowledge for other similar
things (such as scale).
If you want to rotate the object around the point 'ObjCenter', you just
have to translate the object so that this point gets located at the origin,
then you rotate the object, and then you translate it back to its place.
This is very easy to do:
object
{ MyObject
translate -ObjCenter
rotate whatever
translate ObjCenter
}
--
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}// - Warp -
Post a reply to this message
|
|