POV-Ray : Newsgroups : povray.general : Trace()? : Re: Trace()? Server Time
7 Aug 2024 05:22:40 EDT (-0400)
  Re: Trace()?  
From: Warp
Date: 14 Nov 2001 01:36:41
Message: <3bf210f9@news.povray.org>
Redbeard <red### [at] wvadelphianet> wrote:
: This reminds me, I just thought of something for my 4.0 wishlist.  A function
: like inside that works for objects instead of vectors, as in:

:     #declare A = sphere { 0, 1 }
:     #declare B = sphere { 0.5*x,1 }
:     #if (intersect(A,B)) #debug "A intersects B\n" #end

  As I said, that's extremely difficult to implement for any given object.
Of course it's trivial for spheres, but if you want to support any object,
you are approximating the impossible.

:     Extents(intersection { object { A } object { B } }, Min, Max)

  Note that even if the bounding boxes of the objects intersect, that doesn't
mean that the objects themselves do.

: It appears to work with primatives

  Again that word...

-- 
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}//                     - Warp -


Post a reply to this message

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