POV-Ray : Newsgroups : povray.general : Like flower turn to the sun : Re: Like flower turn to the sun Server Time
29 Jul 2024 06:23:01 EDT (-0400)
  Re: Like flower turn to the sun  
From: Christian Froeschlin
Date: 30 Nov 2012 22:24:23
Message: <50b97867@news.povray.org>
Albun wrote:

> Well, it's mathematical problem about orientation of box, in this exemple.
> The box are positionned along an array-point,
> but they are all in one orientation.

if your positions are random or follow some regular formula you
may be able to reverse the problem: Do not calculate the positions
of your boxes in x/y/z and then figure out how they should be oriented.
Instead, describe the desired position by their distance from the point
of interest and the angle how it should be rotated. Assume the point of
interest is at the origin, which is also the initial location of each
box object. Move each objects to its desired distance (e.g. translate
D*y), then rotate them to the desired position. They will keep their
orientation facing the origin no matter where you move them.

Otherwise, you need to calculate spherical coordinates of the box
positions with respect to the sphere around the point of interest.


Post a reply to this message

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