POV-Ray : Newsgroups : povray.general : Slice in a Sphere : Re: Slice in a Sphere Server Time
31 Jul 2024 20:15:30 EDT (-0400)
  Re: Slice in a Sphere  
From: Tim Attwood
Date: 7 Sep 2006 03:46:59
Message: <44ffce73$1@news.povray.org>
> is the resulting object finite?
> I mean, just like i did it with only simple shapes
> intersection/defference...?

It can be either depending...
Think of removing a sphere from a plane, in
that case you might get something like a crater
in a plane... that would be infinite...
difference{plane{...}sphere{...} }

But if you remove a plane from a sphere, the
shape would be a sphere with a flat spot...
which would be finite...
difference{sphere{...}plane{...}}

Sometimes people prefer to use boxes instead
of planes. This has a little better performance,
timewise, because the bounding on the boxes is
finite. In most cases though it's just a matter of
preference.

The Wedge(angle) macro is perfect for what you
want. Just use Wedge(360*clock), remember you
want a wedge that removes the part of the sphere
you don't want. Then just rotate it -90*x to face
the camera. Then after you are happy with the
placement use an animation to make your sequence
of images.

In povray animation is controlled from ini files. For
example if you add the lines...

[640x480, AA0, 360 frame anim]
Width=640
Height=480
Antialias=Off
Initial_Frame = 1
Final_Frame = 360

to the end of quickres.ini, then close and re-run
the POV editor in the windows version, then you can
choose this setting in the resolution list to run 360
frame animations. The clock is a system variable that
starts at 0 in the first frame and varies up to 1 in the
final frame. That way if you decide to have a different
number of frames the objects will still vary thru their
full range of motion.

There's a lot of detail about this in the help files.


Post a reply to this message

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