• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

3D inequalities

Robotoer

Member
I'm creating a computer game. For this game, I need a way to tell if a point is with in a 3D shape. How would i create something that would be able to test if the point was within the 3D figure: ex. in 2D graphs, inequalities act as the borders of a shape. so for a point to be in a 2D shape, it would have to be the solution of all the boundaries.
 
It's harder for a 3D shape. A point is a 0D shape. So, in 2D, inequalies work cause you're trying to bound a 0D shape in a 2D environment. In 3D, it's harder because you're trying to bound a 0D shape in a 3D environment. (you can use inequalities if you're trying to bound a 1D shape in a 3D environment)
 
Toss the third dimension into your equations. Replace (Formula representing bounding lines) with (Formula representing bounding planes) - and you now have three sets of upper/lower tests to do vs. two.

If you're trying to code collision detection, start with simple bounding-boxes (or cylinders, spheres, etc depending on shape) and work up. Sounds to me like you're trying to code locational impacts, and that's not easy.

Might also want to cross-post this in software. It's 90% "OMGWTFBBQHALO2" right now, but there's still a devoted team of coders that lurks. 🙂

- M4H
 
Originally posted by: MercenaryForHire
Toss the third dimension into your equations. Replace (Formula representing bounding lines) with (Formula representing bounding planes) - and you now have three sets of upper/lower tests to do vs. two.

If you're trying to code collision detection, start with simple bounding-boxes (or cylinders, spheres, etc depending on shape) and work up. Sounds to me like you're trying to code locational impacts, and that's not easy.

Might also want to cross-post this in software. It's 90% "OMGWTFBBQHALO2" right now, but there's still a devoted team of coders that lurks. 🙂

- M4H

Exactly. THe problem is that with only simple shapes you get simple results unless you are a regular-polygon fanatic.

As things get more complicated I guess you could to use tripple integrals and such to find the volume and use parametric equations to find the position if the object is moving....

wow..this sounds so nasty...
 
Originally posted by: Nik
Great first post, but wrong forum. Learn fast and learn well, noob.

OT is the best for quick questions and you know it. Even if it isn't really for specific things like 3d stuff.
 
Originally posted by: Goosemaster
Originally posted by: MercenaryForHire
Toss the third dimension into your equations. Replace (Formula representing bounding lines) with (Formula representing bounding planes) - and you now have three sets of upper/lower tests to do vs. two.

If you're trying to code collision detection, start with simple bounding-boxes (or cylinders, spheres, etc depending on shape) and work up. Sounds to me like you're trying to code locational impacts, and that's not easy.

Might also want to cross-post this in software. It's 90% "OMGWTFBBQHALO2" right now, but there's still a devoted team of coders that lurks. 🙂

- M4H

Exactly. THe problem is that with only simple shapes you get simple results unless you are a regular-polygon fanatic.

As things get more complicated I guess you could to use tripple integrals and such to find the volume and use parametric equations to find the position if the object is moving....

wow..this sounds so nasty...

The third dimension is a bitch. It's much more fun to enjoy "curved surfaces" in real life then try to properly represent them on-screen. 😉

- M4H
 
yeah the third dimension is going to be hard... but i do hate it when in games, you touch an enemy and you clip right through them. and also, the game i'm making is supposed to have really good physics, so that is necissary. one last question. even with inequalities, how are shapes with concave portions to them going to work?
 
Originally posted by: MercenaryForHire
Originally posted by: Goosemaster
Originally posted by: MercenaryForHire
Toss the third dimension into your equations. Replace (Formula representing bounding lines) with (Formula representing bounding planes) - and you now have three sets of upper/lower tests to do vs. two.

If you're trying to code collision detection, start with simple bounding-boxes (or cylinders, spheres, etc depending on shape) and work up. Sounds to me like you're trying to code locational impacts, and that's not easy.

Might also want to cross-post this in software. It's 90% "OMGWTFBBQHALO2" right now, but there's still a devoted team of coders that lurks. 🙂

- M4H

Exactly. THe problem is that with only simple shapes you get simple results unless you are a regular-polygon fanatic.

As things get more complicated I guess you could to use tripple integrals and such to find the volume and use parametric equations to find the position if the object is moving....

wow..this sounds so nasty...

The third dimension is a bitch. It's much more fun to enjoy "curved surfaces" in real life then try to properly represent them on-screen. 😉

- M4H



mmm.......baby.....your ass is more beautiful and roundthan than (x^2 + y^2 = z^2 ) /2
 
Originally posted by: Robotoer
yeah the third dimension is going to be hard... but i do hate it when in games, you touch an enemy and you clip right through them. and also, the game i'm making is supposed to have really good physics, so that is necissary. one last question. even with inequalities, how are shapes with concave portions to them going to work?

Perhaps they just use other deminsions like making a 3d parabola with z as the orthogonal axis or y or x...pick as many letters as you want... but limit them to x,y, and z 😉
 
Originally posted by: Robotoer
yeah the third dimension is going to be hard... but i do hate it when in games, you touch an enemy and you clip right through them. and also, the game i'm making is supposed to have really good physics, so that is necissary. one last question. even with inequalities, how are shapes with concave portions to them going to work?

Take the equation of the shape that's forming the concavity and use that.

In all seriousness, start with the bounding boxes and simple shapes and work up. Not trying to call you stupid or put down your coding skills - but you're trying to undertake one of the most difficult tasks right from scratch.

Make a post in Software with more background. I'm intrigued. 🙂

- M4H
 
Originally posted by: MercenaryForHire
Originally posted by: Robotoer
yeah the third dimension is going to be hard... but i do hate it when in games, you touch an enemy and you clip right through them. and also, the game i'm making is supposed to have really good physics, so that is necissary. one last question. even with inequalities, how are shapes with concave portions to them going to work?

Take the equation of the shape that's forming the concavity and use that.

In all seriousness, start with the bounding boxes and simple shapes and work up. Not trying to call you stupid or put down your coding skills - but you're trying to undertake one of the most difficult tasks right from scratch.

Make a post in Software with more background. I'm intrigued. 🙂

- M4H

Yeah,.

By the way, as a kid ( I don't know how old you are ) , I did the WORST THING ONE COULD EVER DO WHEN INTERESTED IN MAKING games...I downloaded Poser...

Urgh...so many tireless nights trying to make the models have sex with each....what a waste....
 
Back
Top