POV-Ray : Newsgroups : povray.newusers : Rotating a POV object vs. rotating a prism. Server Time
28 Nov 2024 03:38:02 EST (-0500)
  Rotating a POV object vs. rotating a prism. (Message 1 to 3 of 3)  
From: Arie L  Stavchansky
Subject: Rotating a POV object vs. rotating a prism.
Date: 18 Sep 2001 17:46:11
Message: <3ba7c0a3$1@news.povray.org>
Hi!

When I rotate a pov ray object like a the box, POVRay will rotate it about
it's center point.  However, if I make a prism, it rotates the prism around
the first point created.  How can I make a prism object and if I apply the
rotate parameter have it rotate around the center of the prism object?

Anybody know a work around for this?  Thanks,
Arie


Post a reply to this message

From: Warp
Subject: Re: Rotating a POV object vs. rotating a prism.
Date: 18 Sep 2001 17:55:35
Message: <3ba7c2d7@news.povray.org>
Arie L. Stavchansky <ari### [at] bellatlanticnet> wrote:
: When I rotate a pov ray object like a the box, POVRay will rotate it about
: it's center point.

  Nope, it rotates it around <0,0,0>.

:  However, if I make a prism, it rotates the prism around
: the first point created.

  If the first point is located at <0,0,0> then that's true. If it's somewhere
else, then it isn't (is it will always rotate around <0,0,0>).

:  How can I make a prism object and if I apply the
: rotate parameter have it rotate around the center of the prism object?

  What is the center of a prism?

-- 
#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

From: Gilles Tran
Subject: Re: Rotating a POV object vs. rotating a prism.
Date: 19 Sep 2001 04:03:06
Message: <3BA851D2.649D6052@inapg.inra.fr>
"Arie L. Stavchansky" wrote:

> When I rotate a pov ray object like a the box, POVRay will rotate it about
> it's center point.  However, if I make a prism, it rotates the prism around
> the first point created.  How can I make a prism object and if I apply the
> rotate parameter have it rotate around the center of the prism object?
>
> Anybody know a work around for this?  Thanks,

If you're using 3.5, include the transforms.inc file and then use the
Center_Trans macro to center your object (actually its bounding box so it may
not look like you want it to look) around the origin.

#include "transforms.inc"
#declare MyPrism=prism{...}

object {MyPrism
    Center_Trans(MyPrism, x+y+z)
}

G.
--

**********************
http://www.oyonale.com
**********************
Graphic experiments
Pov-ray gallery


Post a reply to this message

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