[gameprogrammer] Re: argh, math!

Wouldn't you test each point against each plane?

if every point is outside of any one play then its not visible 
if every point is on the "inside" (depending which way you've setup your
planes) off all the planes then its completely visible  
etc...

I managed to do this with an octree I wrote recently so if you need more
help let me know.

Cheers
Tris

-----Original Message-----
From: gameprogrammer-bounce@xxxxxxxxxxxxx
[mailto:gameprogrammer-bounce@xxxxxxxxxxxxx] On Behalf Of Alan Wolfe
Sent: Sunday, 30 May 2004 6:30 AM
To: gameprogrammer@xxxxxxxxxxxxx
Subject: [gameprogrammer] Re: argh, math!

I dont know if this helps any, but i might be going about this the wrong
way.

Im making a portal engine and what i need to be able to do is be able to
tell if a portal intersects with the frustum.

i have the 6 planes of the frustum, and i have the 8 points of the portal
(as well as the 6 planes of the portal). and need to be able to tell if the
portal and the frustum overlap.

is there a better way to do that maybe?

----- Original Message ----- 
From: "Kevin Jenkins" <gameprogrammer@xxxxxxxxxx>
To: <gameprogrammer@xxxxxxxxxxxxx>
Sent: Saturday, May 29, 2004 1:11 PM
Subject: [gameprogrammer] Re: argh, math!


> If I remember my linear algebra right, you have to put all 12 equations in
a
> matrix and do row reduction until you get a single 1 in each row.  Or
> something like that :(
>
> ----- Original Message -----
> From: "Alan Wolfe" <atrix2@xxxxxxx>
> To: <gameprogrammer@xxxxxxxxxxxxx>
> Sent: Saturday, May 29, 2004 1:14 PM
> Subject: [gameprogrammer] Re: argh, math!
>
>
> > Hey Rob,
> >
> > it sounds easy but nobody seems to be able to help :P
> >
> > lets say you have 12 of these:
> >
> > Ax+By+Cz+D > 0
> >
> > where in each of the 12 equations, there is a different value for A,B,C
> and
> > D.
> >
> > how could you be able to tell if there is some value for x,y,z that
> > satisfies all 12 equations?
> >
> > ----- Original Message -----
> > From: "Rob Quill" <rjquill@xxxxxxxxxx>
> > To: <gameprogrammer@xxxxxxxxxxxxx>
> > Sent: Saturday, May 29, 2004 1:01 PM
> > Subject: [gameprogrammer] Re: argh, math!
> >
> >
> > > OK, my maths isn't great, but they will be overlapping if the lines
> > > intersect, so by putting two of the equations equal to each other and
> > > solving you can see if there is a point of intersection.
> > >
> > > That sounds a bit too simple, so maybe I have mis-interpretted the
> > problem.
> > >
> > > Or thinking about it, could you not use vectors? If you had the vector
> > > equations you could use:
> > >
> > > a.b = |a||b|cos(x)
> > >
> > > But again, it seems too simple. Is it that hard to solve a equation 12
> > > times.
> > >
> > > Rob
> > >
> > > Rob
> > > ----- Original Message -----
> > > From: "Alan Wolfe" <atrix2@xxxxxxx>
> > > To: <gameprogrammer@xxxxxxxxxxxxx>
> > > Sent: Saturday, May 29, 2004 8:52 PM
> > > Subject: [gameprogrammer] argh, math!
> > >
> > >
> > > > hey everyone
> > > > I have a math problem im trying to solve for my game and am having
> > > difficulty :P
> > > >
> > > > i have a "box" defined by 6 planes in the form of: Ax+By+Cz+D=0,
where
> > > A,B,C and D are known constants for each equation.
> > > >
> > > > the box doesnt have to have corners at right angles, but it's
assumed
> to
> > > be concave.
> > > >
> > > > what im trying to do is take 2 of these "boxes" and see if they
> overlap
> > at
> > > all.
> > > >
> > > > so basicly from what i can tell i have 12 plane equations and what i
> am
> > > trying to do is find if there are any sets of X,Y,Z which satisfy all
12
> > > equations.
> > > >
> > > > I asked around how to solve systems of inequalities but people keep
> > saying
> > > "graph it", which doesnt help me any :P
> > > >
> > > > Does anyone know how to do this? I'm starting to think that there is
> no
> > > solution ::cry:: hehe
> > > >
> > > >
> > > >
> > > > ---------------------
> > > > To unsubscribe go to http://gameprogrammer.com/mailinglist.html
> > > >
> > > >
> > > >
> > >
> > >
> > >
> > >
> > > ---------------------
> > > To unsubscribe go to http://gameprogrammer.com/mailinglist.html
> > >
> > >
> >
> >
> >
> > ---------------------
> > To unsubscribe go to http://gameprogrammer.com/mailinglist.html
> >
> >
> >
> >
>
>
>
> ---------------------
> To unsubscribe go to http://gameprogrammer.com/mailinglist.html
>
>



---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html







---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html


Other related posts: