POV-Ray : Newsgroups : povray.off-topic : Math question (inside box) : Re: Math question (inside box) Server Time
28 Jul 2024 22:29:57 EDT (-0400)
  Re: Math question (inside box)  
From: Le Forgeron
Date: 6 Aug 2013 02:16:34
Message: <520094c2$1@news.povray.org>
Le 06/08/2013 06:20, Patrick Elliott a écrit :
> On 8/5/2013 4:43 AM, Le_Forgeron wrote:
>>
>> The test against 6 planes would work, and is easy if it is axis aligned.
>> ...
>> What I said was that extending the "smart" 2D triangle-based-tests to 3D
>> are to be a nightmare.
>>
> Still not seeing why two planes wouldn't, see my "is it in the aquarium"
> explanation from my reply to scott.

the "Aquarium" is using projections (2) and has hidden implication (the
projections are at 90° angle).

you could as well use only 1 projections and an additional "distance
from point to its projection".
Your main issue so far is projecting on arbitrary rotated plane/square.
and it won't be easy.

> 
> But, in any case, I think there may be a simpler solution,

Simpler than evaluating the sign of 6 first-degree equations ?
P(x,y,z) the point to test,
 Vn(An,Bn,Cn,Dn) [n:1 to 6], the 4D vector representing the planes of
the box (oriented so that inside is >0)
 are all signs of x.An+y.Bn+z.Cn+Dn positive ?

the plane XY at height z=10 is <0,0,1,-10> (or in the opposite direction
<0,0,-1,10> ), where is the difficulty ?

-- 
Just because nobody complains does not mean all parachutes are perfect.


Post a reply to this message

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