Tag Archives: math

Solve This Math Problem

I’m a bit sleep deprived right now. I’m going to the zoo this weekend and I need to push my sleep schedule forward, so I’ve been up all night and a good bit of day so far. For some reason I decided to work on my TextWorld project during this time.

I need some math for this. I’m sure I’ll figure it out myself eventually if I have to, but it occured to me that I have some very nerdy friends who might be able to do this for me. Or at least figure out the math, I’ll probably have to alter it to work in Flash.

Anyways I need to figure out if a particular rectangular polyhedron defined by x, y, z in meters will fit inside another rectangular polyhedron defined by x, y, z, in any orientation.

The TextWorld Simulation considers everything to be a six sided rectangular polyhedron internally, and I need to be able to tell if a particular object will fit in a particular space. It wouldn’t be too bad if I just had to figure out if it would fit while the two were flat, but I need to know if it would fit in an angle. Like, a two by four might not fit in a room unless it’s bent so that the tips are in the far corners of the room.

So, how do I figure out if a thing fits in a particular space?

Tagged , ,