|
![](/i/fill.gif) |
In article <web.450150251e67056d800aa0230@news.povray.org>,
"Nostromo" <nomail@nomail> wrote:
> Thanks for your help, but it still won't rotate around the middle of thebig
> cube. Maybe someone can have a look at my code and tell me what's wrong?
>
> ...
>
> When I animate this I want the cube to rotate around it's center, but it's
> rotating around some point near one of the corners.
>
> Thanks a lot in advance.
well, well...
from your source whe can find that :
RMax = max_extent(Rubics) => <5.4, 5.4, 5.4>
RMin = min_extent(Rubics) => <-1, -1, -1>
translate the object with : translate -0.5*(RMax+RMin) give :
RMax = <3.2, 3.2, 3.2>
RMin = <-3.2, -3.2, -3.2>
Rubics is now perfectly center at the origin and rotations are ok. if
not, there are somes others problems :
- your are not looking at the origin.
- in "rotation <clock, clock*2, clock*4>" don't forget that clock varie
from 0 to 1 degrees
--
klp
Post a reply to this message
|
![](/i/fill.gif) |