POV-Ray : Newsgroups : povray.pov4.discussion.general : Sphere Sweep : Re: Sphere Sweep Server Time
6 Nov 2025 04:56:50 EST (-0500)
  Re: Sphere Sweep  
From: Bald Eagle
Date: 30 Oct 2025 16:05:00
Message: <web.6903c4d0c6f8e83298de4e8625979125@news.povray.org>
(a) C++ header for integrating into POV‑Ray
Download: cr_sweep_bounds.h
What it provides (header‑only, C++11):

centripetalKnots(P0,P1,P2,P3, alpha, T)
crSegmentToBezier(P0,P1,P2,P3, T, B) and crScalarToBezier(R0,R1,R2,R3, T, BR)
segmentAABB(B,BR) → AABB for one segment, inflated by r_max
sweepAABB(pts,rad,n, alpha=0.5) → global AABB for the entire sweep path


when you wire it into POV‑Ray, swap Vec3 for Vector3d and AABB for the


per‑segment bounding becomes tight and provably safe.


issues in each segment (a source of bad bounds and artifacts with

guarantees the curve lies inside the hull of its four control points;
axis‑aligned boxing that hull, then Minkowski‑inflating by a safe
r_max, yields a conservative bound for the swept volume.
[forums.dev...nvidia.com], [news.povray.org]


Post a reply to this message


Attachments:
Download 'cr_sweep_bounds.h.txt' (5 KB)

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