|
 |
(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)
|
 |