POV-Ray : Newsgroups : povray.bugreports : sphere slicing problem : Re: sphere slicing problem Server Time
28 Sep 2021 16:37:21 EDT (-0400)
  Re: sphere slicing problem  
From: William F Pokorny
Date: 14 Oct 2019 09:22:01
Message: <5da47679$1@news.povray.org>
On 10/14/19 7:09 AM, jr wrote:
> hi,
> 
> I'm working on a macro which, given an object positioned at origin, a vertical
> resolution, and a frame_number N, returns the Nth "slice", ie the intersection
> of object and a (transparent) box.
> 
> when I scan a simple (red) sphere[*], the first few frames, and the last few
> look exactly as expected, however, on the frames between more and more
> information is missing, up to 100% in the middle.
> 
> puzzled, and no idea what the problem might be.
> 
> I've posted a zip with a set of example frames in povray.binaries.misc.
> 
> [*] lit by eight light at corners of imaginary cube, recorded with orthographic
> camera positioned above.
> 
> regards, jr.
> 

I'm mostly otherwise busy today, but a scene file would help. I don't 
understand how you are getting rings from the box and sphere 
intersection. ...Unless this why you made the box is transparent?

Supposing so. Guess you see one opaque sphere surface cleanly top and 
bottom except at the very edges. Where both box transparent surfaces 
well inside the sphere you'd use those transparent intersections.

At the edges - even where it looks like things are working - you'd get, 
not coincident surfaces, but coincident intersections for at least one 
surface of the transparent box. Perhaps that's the problem?

If ring slices the aim, perhaps something like:

intersection {
   difference { 'sphOuter' 'sphInner' }
   box {... translate <0,frameOffset,0> }
   texture { }
}

Or given the orthographic camera a torus changed frame by frame might be 
better - rings could be of constant width except at the very top and 
bottom.

Bill P.


Post a reply to this message

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