How can I find the points of intersection between two cubes in 3D space?

In summary, you would need to break up the cubes into a finite 3-d grid, and then use a method to determine which grid cubes are filled by the larger cube.
  • #1
parch
17
0
hi,

I need to find the points of intersection between two cubes, and the algorithm should give the intersection points even though my cubes are rotated in any direction. i need to know, Is there any general algorithm for this and what is the current research(any method) in finding the intersection of two cubes. the application where i am using is unstructured 3d mesh generation. Kindly help me to get a clear idea in this topic.
thanks in advance for your reply..:smile:
 
Physics news on Phys.org
  • #2
I don't understand question.

Two cubes could intersect along a point, line, plane, or solid.

So you want a computer program that does this? What language? For what purpose?
 
  • #3
hey thanks for your quick reply. I mean two cubes are placed one over another, an we need to find the points of intersection. the algorithm i need is, it should be able to get the intersection points though my cubes are rotated in any direction. I will use it for unstructured 3d cartesian mesh generation. you can have you program in Fortran or C++. Thanks in advance.
 
  • #4
What are on Earth are you talking about man?

You'll need to use far more precise language than "placed one over another."

A picture is worth a 1,000 words.
 
  • #5
Imagine there are 2 cubes of same finite dimension. Example from 0 to 1 in all three axis. place the first cube with the origin (0,0,0), and place the second cube with the origin (0.5,0.5,0.5). So now both the cubes will get intersected with each other. I need to get the points where the edges of the cubes crosses the outer surface, we get six locations. (just think in 2d to get more clear). Still find problem in my question have ur post.
 
  • #6
A 'cube' type thing is just described by a1<=x<=a2, b1<=y<=b2, c1<=z<=c2. To intersect two of them just figure out how to intersect two segments in each of the coordinate axes.
 
Last edited:
  • #7
more clear please. any one.
 
  • #8
Cube of edge length 1 at origin (0,0,0), described by -1/2<=x<=1/2 etc. Same at origin (1/2,1/2,1/2) described by 0<=x<=1, etc. Intersection, 0<=x<=1/2, etc.
 
  • #9
hi dick & clustro

1) I think from the attached figure you will be able to get my question.

2) the red lines in one cube will cut the outer surface of other cube. I need to find the location where the edge(red line) cuts the outer face.(six points will occur! am i rite). Is there any algorithm used for this. and what are the ways it can be done.

3)the algorithm should be more general way where any degree rotation should give me the intersection points. I tried a way where my algorithm fails to locate the points if other cube is rotated more than 90 degree..

thanks in advance...
 

Attachments

  • Screenshot.png
    Screenshot.png
    4.8 KB · Views: 1,297
  • #10
Just break it up into a finite 3-d grid, and for each cube, decide which grid cubes are filled by the larger cube. Then see which grid-cubes are filled by each of the larger cubes simultaneously, and keep these. This is the intersection.

This method does not offer infinite precision, but it is general and will offer a (relativelty) arbitrary precision.
 

1. What is the intersection of two cubes?

The intersection of two cubes is the set of points where the two cubes overlap or intersect. It is the common region shared by both cubes.

2. How is the intersection of two cubes calculated?

The intersection of two cubes is calculated by finding the coordinates of the vertices of both cubes and then determining which vertices are shared by both cubes. This can be done using algebraic methods or by graphically representing the cubes and finding the overlapping points.

3. What is the dimension of the intersection of two cubes?

The dimension of the intersection of two cubes depends on the dimension of the cubes themselves. If both cubes are three-dimensional, then the intersection will also be three-dimensional. However, if one cube is two-dimensional and the other is three-dimensional, then the intersection will be two-dimensional.

4. Can the intersection of two cubes be a cube itself?

Yes, it is possible for the intersection of two cubes to be a cube itself. This can happen when the two cubes have the same dimensions and are positioned in a way that their vertices align to form a cube.

5. What is the significance of the intersection of two cubes in mathematics?

The intersection of two cubes is significant in mathematics as it helps in solving various geometric and algebraic problems. It also has applications in fields such as computer graphics and computer-aided design (CAD) where it is used to create 3D models and shapes.

Similar threads

  • Calculus and Beyond Homework Help
Replies
9
Views
1K
Replies
1
Views
903
Replies
4
Views
2K
  • Calculus and Beyond Homework Help
Replies
3
Views
3K
  • Calculus and Beyond Homework Help
Replies
5
Views
2K
  • Calculus and Beyond Homework Help
Replies
2
Views
1K
  • Calculus and Beyond Homework Help
Replies
2
Views
2K
  • Calculus and Beyond Homework Help
Replies
11
Views
2K
  • Calculus and Beyond Homework Help
Replies
1
Views
3K
  • Calculus and Beyond Homework Help
Replies
3
Views
1K
Back
Top