POV-Ray : Newsgroups : povray.general : Is there an "inside"-function? : Re: Is there an "inside"-function? Server Time
16 Apr 2024 07:28:13 EDT (-0400)
  Re: Is there an "inside"-function?  
From: jr
Date: 24 Feb 2021 18:40:01
Message: <web.6036e32bf7e8942179819d980@news.povray.org>
hi,

"Juergen" <nomail@nomail> wrote:
> Hello,
>
> Is there a function or macro to check, if a given point is inside an object ?

yes.


> .....
> #declare Obj =
> object {
>   some_complex_object
>   translate ...
>   rotate ...
>   scale ....
>   ....
> }
>
> #declare Point = <1,2,3>;
>
> #if (inside(Point,Obj)) // ?????
> .....
> #end

quite literally that, except it's 'inside(obj,point)'.  :-)

<http://wiki.povray.org/content/Reference:Numeric_Expressions#Functions>


regards, jr.


Post a reply to this message

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