POV-Ray : Newsgroups : povray.general : Position after rotation : Re: Position after rotation Server Time
6 Oct 2024 09:06:20 EDT (-0400)
  Re: Position after rotation  
From: Samuel Benge
Date: 12 Apr 2014 13:00:00
Message: <web.53496ffe263e54cc2953d4f90@news.povray.org>
"pbrants" <pbr### [at] telenetbe> wrote:
> Where can I retrieve the new position after a rotation (or transformation in
> general) of a point (let's say a center of a sphere or box) when I need that for
> future references or calculations?

Hi Paul,

min_extent() & max_extent() will give you the bounding box of an object, and
with that info you can find its center.

You can also use vrotate() to rotate a vector. For every transformation you give
your object, transform a vector. This is useful whenever min_extent() &
max_extent() won't give you accurate results (which can happen if you've used a
lot of CSG), or if you want to keep track of say, a specific corner of a box.

Sam


Post a reply to this message

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