POV-Ray : Newsgroups : povray.general : How can we check if an object is within another object? : Re: How can we check if an object is within another object? Server Time
26 Apr 2024 14:24:26 EDT (-0400)
  Re: How can we check if an object is within another object?  
From: William F Pokorny
Date: 13 Jun 2020 09:57:12
Message: <5ee4db38$1@news.povray.org>
On 6/13/20 9:31 AM, Le_Forgeron wrote:
> Le 12/06/2020 à 16:38, Kima a écrit :
...
> #declare LOWEST = 10;// big enough to start
> #for(i,0,3,0.01)
> #local Pt = <Sp(i).x, 0, Sp(i).y> ;
> #local LENGTH=vlength(Pt);
> #declare LOWEST=min(LOWEST,LENGTH);
> #end
> #debug concat("\nLargest radius of fitting cylinder is ",
> str(LOWEST,3,3), "\n")
> 
> sphere { 0,LOWEST pigment { color red 1 } }
> 

Ah. Excellent idea/method!

Bill P.


Post a reply to this message

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