POV-Ray : Newsgroups : povray.animations : Storing object rotation : Re: Storing object rotation Server Time
8 Jul 2024 13:01:10 EDT (-0400)
  Re: Storing object rotation  
From: Greg Edwards
Date: 17 Mar 2003 20:30:45
Message: <1rvk5zzqq5s3f.1fr5o9d5n7rfi$.dlg@40tude.net>
On Mon, 17 Mar 2003 20:14:13 EST, Phil Brewer wrote:

> I have an animation of a ball rolling on an arbitrary surface. I'm using the
> normal force on the ball to induce an acceleration and create movement.
> That works great, the problem come when I try and make the ball "roll"
> realistically. The problem is that the axis that the ball needs to rotate
> around is constantly changing.
> 
> In effect I have a new rotation step added every frame around an arbitrary
> axis. Does anyone have an idea of how to store an rotational "state" for my
> ball that I can call during the next frame and add to?
> 
> Any help would be great.
> 
> -Phil

Keep track of how far the ball has moved and apply the rotation before the 
translation. This should work provided the ball doesn't bounce or do any 
kind of naughty mechanics.

-- 
light_source#macro G(E)sphere{z+E*y*5e-3.04rotate-z*E*6pigment{rgbt#end{
20*y-10#local n=162;1}#while(n)#local n=n-.3;G(n)x}}G(-n).7}}#end//GregE


Post a reply to this message

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