2 cubic objects in a 3-dimensional space is capable to determine if they intersect
· If the cubes intersect determine what the volume of the shared space is.
· The two cubes are parallel to each other (they are not rotated in any way).
· To build each of the cubes the user must be able to provide coordinates (x,y,z) for the center of the cube and the length of the edge.
Sample Data
Cube A: Length of the edge = 5m, center point (x = 10m, y = 10m, z = 0)
Cube B: Length of the edge = 2m, center point (x = 9m, y = 9m, z = 0)
The cubes intersect and the intersection volume is 8.0 m³