POV-Ray : Newsgroups : povray.newusers : Centering an Object Server Time
24 Dec 2024 13:41:25 EST (-0500)
  Centering an Object (Message 1 to 2 of 2)  
From: Mike Wilson
Subject: Centering an Object
Date: 6 Nov 1998 09:32:14
Message: <364307DC.9348C8D4@iastate.edu>
Is there some easy way to find the x-y-z limits of an object placed at
an arbitrary location so that it could be translated back to the
origin?  It would be nice to have a "center" command, but I'd settle for
being able to find the limits so I could translate it myself.

I'm thinking particularly (but not exclusively) about text.  Since each
letter size is somewhat different , I'm finding it hard to do some
rotation loops that would be simple with centered objects.

If there isn't a simple way do this, is there an #include file anywhere
that will do centering?

Thanks.

Mike Wilson


Post a reply to this message

From: Jerry Anning
Subject: Re: Centering an Object
Date: 6 Nov 1998 13:04:08
Message: <36433A21.26409FA4@dhol.com>
Mike Wilson wrote:
> 
> Is there some easy way to find the x-y-z limits of an object placed at
> an arbitrary location so that it could be translated back to the
> origin?  It would be nice to have a "center" command, but I'd settle for
> being able to find the limits so I could translate it myself.
> 
> I'm thinking particularly (but not exclusively) about text.  Since each
> letter size is somewhat different , I'm finding it hard to do some
> rotation loops that would be simple with centered objects.
> 
> If there isn't a simple way do this, is there an #include file anywhere
> that will do centering?

There are two easy solutions.  Both are patched versions of POV. 
Unfortunately, both are Win95 only at the moment.  One is Tmpov, a POV
3.02 patch that has text bounds, centering and justification commands,
among other things.  The other is the Superpatch, a POV 3.1 patch that
has general object bounds commands and many other things.  You would
find the bounds, and calculate the center from that.  Both patches
contain many useful things.  On one hand, the Superpatch allows you to
use POV 3.1 items such as media and macros.  On the other, the current
version of the Superpatch is in beta, and has limited documentation. 
This should change soon, but if you have limited experience with beta
software, Tmpov may be the best choice right now.  Both are available at
http://twysted.net/PatchStation

Jerry Anning
cle### [at] dholcom


Post a reply to this message

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