POV-Ray : Newsgroups : povray.general : sphere_sweep woes : Re: sphere_sweep woes Server Time
5 Aug 2024 18:25:50 EDT (-0400)
  Re: sphere_sweep woes  
From: Jochen Lippert
Date: 18 Sep 2002 14:01:53
Message: <1fiq1kw.ers1sq1sx9bvkN%jlippert@ubcom.de>
Charles Fusner <cfu### [at] enternet> wrote:

> Still, if any given sweep extends across a significant portion of
> your image, it'll be quite slow.  It's quite intensive calculating a

The problem with the current bounding of a sphere_sweep is, as you may
have guessed, that the whole sweep is put into one large bounding box.
In the worst case, if the sweep goes from say <-10, -10, -10> to <10,
10, 10>, this box will cover a unneccessary large volume. Every time the
box get hit, all segments (whose number depends roughly on the number of
spheres in the sphere_sweep description) of the sweep are tested against
the ray, which can be slow for cubic and b-spline sweeps.

> There was recently some mention of improved bounding for sphere_sweeps
> (the words "heirarchal bounding" caught my attention), but that's an
> unofficial patch that's being worked on. For the time being, just be

The idea behind this is to put each segment of the sweep into its own
bounding box. Much less space wasted, much faster calculations
hopefully. You can have the same effect with manual bounding, but it's
hard to figure out the correct boxes, as you seem to have noticed. :)

> sure your sweeps are properly bounded and take up a second hobby.
> Me, I'm teaching myself matrix math. :)

That's always good. :) A simple solution for b-splines is to put every
four consecutive spheres of the sweep description into a box. The sweep
can't be outside of this box. Same goes for linear sweep and two
consecutive spheres. Cubic (Catmull-Rom) sweeps are much harder to
track, though.

Jochen Lippert

-- 
No smilies were harmed in the making of this message ;)


Post a reply to this message

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