Falling polygons: meshing vs. stacking - analytic solution needed

In summary, the conversation discusses a problem with a 3D game where falling tangram pieces need to be arranged to form squares within a square basin. The issue is with the collision detection logic, as the current polygonal collision engine registers overlaps where there should be none. The speaker is looking for an analytic solution to determine if a particular space within the basin is occupied or vacant, given prior knowledge of the tangram positions. They are seeking assistance in finding a solution method or the correct mathematical topic to address this issue.
  • #1
SLanghi
1
0
Falling polygons: meshing vs. stacking -- analytic solution needed

I'm a game developer and not a mathematics specialist, so I'm not 100% sure if this question is correctly categorized.

My problem is as follows.

I'm building a game that's similar to Tetris, but in 3D instead of 2D. Rather than arranging falling tetriminos to form lines within a grid, the player arranges falling tangram pieces to form squares within a square basin.

All of the tangram pieces occupy even fractions of a square (1/4, 1/8, 1/2). Furthermore, when a piece lands, each of its vertices aligns with one of the following: the corners of the basin, the midpoints of the basin's sides, or the central midpoint of the basin.

As the player guides the falling pieces, there will be cases in which a piece nestles just inside the vacancy formed by other, adjacent pieces. I need a collision-detection logic that can allow for these situations where the descending object "just fits" into a hole having the exact shape and size of the piece.

The polygonal collision engine I'm using (Unity) is exhibiting problematic behavior. Even when the tangrams' vertices are aligned exactly to the key points mentioned above, the physics-based polygonal collision logic registers an overlap between a falling piece and one of the pieces bordering the hole into which it's falling. As a result, the falling piece stacks on top of the other pieces, though it appears to the naked eye that the falling piece should have continued into the hole.

I'd like to use an analytic solution that can tell me whether a space within the basin having a particular shape at a particular location is occupied or vacant, given full prior knowledge of the tangrams already residing with the basin. I have very few ideas about where to start with this. If anyone can provide a solution method, or even point me toward the correct mathematical topic, I'll greatly appreciate it.
 
Mathematics news on Phys.org
  • #2
Hmm, certainly not differential geometry. Either general math or programming.

If I understand your problem correctly, the polygon positions are discrete. Why don't you just make a grid and check if one element of it is occupied?
 

1. What is the difference between meshing and stacking polygons?

Meshing polygons refers to arranging them in a way that they fit together without any gaps or overlaps. Stacking, on the other hand, involves placing polygons on top of each other in a stacked formation.

2. Which method, meshing or stacking, is more commonly used in scientific research?

Both methods have their own advantages and are commonly used in different fields of research. Meshing is often used in computer graphics and engineering simulations, while stacking is more commonly used in materials science and crystallography.

3. What are the benefits of using an analytic solution in studying falling polygons?

An analytic solution is a mathematical approach that allows for a more precise and accurate understanding of the behavior of falling polygons. It can provide insights into the forces and dynamics involved in the process, which can be useful in designing structures or predicting behavior in real-world scenarios.

4. Can an analytic solution be applied to all types of falling polygons?

An analytic solution can be applied to a wide range of falling polygons, as long as the system can be described using mathematical equations and principles. However, for more complex or irregularly shaped polygons, numerical simulations may be necessary to obtain accurate results.

5. How can studying falling polygons benefit society?

Understanding the behavior of falling polygons can have practical applications in various fields, such as structural engineering, materials science, and even natural disasters. By studying and analyzing falling polygons, we can develop better designs and strategies to prevent or mitigate potential hazards and improve the safety and efficiency of structures and systems.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
8
Views
3K
Back
Top