POV-Ray : Newsgroups : povray.advanced-users : Math help needed please. : Re: Math help needed please. Server Time
30 Jul 2024 14:24:01 EDT (-0400)
  Re: Math help needed please.  
From: Ken
Date: 18 Apr 1999 19:49:48
Message: <371A602B.49520542@pacbell.net>
Andrew Cocker wrote:
> 
> Hi,
> 
> Starting with the following code:
> 
> sphere {
>     <0,0,0>,1
>     scale <0.25,1,0.25>
>     translate <-0.5,0,0>
>     texture { MyTexture }
> }
> 
> plane
> 
>     y, -1
>     texture { MyTexture }
> }
> 
> I wish to rotate the sphere clockwise on the z axis by 180 degrees, at the same time
> translating it along the x axis by 1 unit, so that it ends up at <0.5,0,0>.
> The question is, how do I mathematically model the vertical motion so that the shape
> appears to be rolling along the plane?NOTE: I may wish to alter the scale of the
shape
> *during* the anim, so this must be taken into account in the equation.
> 
> Any help appreciated.
> 
> --
> ----------------------
> Andy

Hi Andy,

  While not a definitve answer to your question one of the first examples
given in the animation tutorial section of the Pov-Ray docs provides scripts
showing how to roll a sphere along a floor, have it turn and then come back
halfway. Scaling the object as it rolls would involve subtacting the
difference in size and using it as a function to specify the y translation
component of the objects translate action. While not a super easy thing to
figure out it should not take advanced math functions to get the job done.

-- 
Ken Tyler

mailto://tylereng@pacbell.net


Post a reply to this message

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