POV-Ray : Newsgroups : povray.advanced-users : Math help needed please. : Re: Math help needed please. Server Time
30 Jul 2024 14:17:10 EDT (-0400)
  Re: Math help needed please.  
From: Ken
Date: 18 Apr 1999 23:03:10
Message: <371A8D63.50789135@pacbell.net>
Spider wrote:
> 
> Well, I haven't done animations in POV yet. (I don't need a 4th dimension, I
> have my head full with 3.)
> 
> >>>>>>>>>>>>Bob Hughes wrote:
> <snip>
> <remaking>
> 
> 
> sphere {
>   <0,0,0>,1
>   scale <0.25,H,0.25> //H increases/decreases to keep touch with floor
>   translate <-0.5,0,0>
>   translate <0,-H/2,0> /* I think this must be added,
>                     so it will keep in touch with the plane */
>   rotate -clock*180*z
>   translate clock*x
>   texture { MyTexture }
> }
> 

That was a good catch with the translate being one half of the spheres
scaled difference. If you used the total scale amount you would be
translating for the difference in size of both halfs of the radius.
and end up to 2 times farther that you need to be to stay in contact
with the surface of the plane.

To complete the above example and tie it to the clock try this:

// Assume the shere is 1 and you wand to have finish size of 0.5

  #declare Diam = 1;

 sphere {0, Diam
         scale clock*0.5
         rotate clock*180*z
         translate < -0.5*clock, -Diam*0.5/2*clock, 0 >
         texture { MyTexture }
       }
 
  I think !

-- 
Ken Tyler

mailto://tylereng@pacbell.net


Post a reply to this message

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