POV-Ray : Newsgroups : povray.general : Is there an "inside"-function? Server Time
31 Oct 2024 14:08:45 EDT (-0400)
  Is there an "inside"-function? (Message 1 to 2 of 2)  
From: Juergen
Subject: Is there an "inside"-function?
Date: 24 Feb 2021 17:50:00
Message: <web.6036d679e1929f2dace3c0a80@news.povray.org>
Hello,

Is there a function or macro to check, if a given point is inside an object ?


.....
#declare Obj =
object {
  some_complex_object
  translate ...
  rotate ...
  scale ....
  ....
}

#declare Point = <1,2,3>;

#if (inside(Point,Obj)) // ?????
.....
#end




Post a reply to this message

From: jr
Subject: Re: Is there an "inside"-function?
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.