I have a series of finite planes defined by 4 corner points. Some of the planes are "touching" (to a certain small tolerance), and I would like to identify these touching planes and "merge" them into a single one that approximates the combined planes. Note that they always touch with an edge, in a parallel way. What would be the smartest way to do this?
2026-03-25 09:23:26.1774430606
Identifying that two planes touch and "merging" them
58 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
1
There are 1 best solutions below
Related Questions in EUCLIDEAN-GEOMETRY
- Visualization of Projective Space
- Circle inside kite inside larger circle
- If in a triangle ABC, ∠B = 2∠C and the bisector of ∠B meets CA in D, then the ratio BD : DC would be equal to?
- Euclidean Fifth Postulate
- JMO geometry Problem.
- Measure of the angle
- Difference between parallel and Equal lines
- Complex numbers - prove |BD| + |CD| = |AD|
- Find the ratio of segments using Ceva's theorem
- How to calculate the width of the separating margin in support vector machine (SVM)
Related Questions in COMPUTER-VISION
- Visualization of Projective Space
- Calculating the polar of a given pole relative to a conic (with NO Calculus)
- combinatorial game of sheets
- Even numbers combinatorial game
- Subtracting 1 from a generic low pass filter
- What if 0 is one of the entry of a rotated point in $R^3$
- Approximation of Hessian=$J^TJ$ for general non-linear optimization problems
- Depth Estimation from two points
- Why is the equation of line through 2 points in projective space is their cross product
- Reprojection error formula
Trending Questions
- Induction on the number of equations
- How to convince a math teacher of this simple and obvious fact?
- Find $E[XY|Y+Z=1 ]$
- Refuting the Anti-Cantor Cranks
- What are imaginary numbers?
- Determine the adjoint of $\tilde Q(x)$ for $\tilde Q(x)u:=(Qu)(x)$ where $Q:U→L^2(Ω,ℝ^d$ is a Hilbert-Schmidt operator and $U$ is a Hilbert space
- Why does this innovative method of subtraction from a third grader always work?
- How do we know that the number $1$ is not equal to the number $-1$?
- What are the Implications of having VΩ as a model for a theory?
- Defining a Galois Field based on primitive element versus polynomial?
- Can't find the relationship between two columns of numbers. Please Help
- Is computer science a branch of mathematics?
- Is there a bijection of $\mathbb{R}^n$ with itself such that the forward map is connected but the inverse is not?
- Identification of a quadrilateral as a trapezoid, rectangle, or square
- Generator of inertia group in function field extension
Popular # Hahtags
second-order-logic
numerical-methods
puzzle
logic
probability
number-theory
winding-number
real-analysis
integration
calculus
complex-analysis
sequences-and-series
proof-writing
set-theory
functions
homotopy-theory
elementary-number-theory
ordinary-differential-equations
circles
derivatives
game-theory
definite-integrals
elementary-set-theory
limits
multivariable-calculus
geometry
algebraic-number-theory
proof-verification
partial-derivative
algebra-precalculus
Popular Questions
- What is the integral of 1/x?
- How many squares actually ARE in this picture? Is this a trick question with no right answer?
- Is a matrix multiplied with its transpose something special?
- What is the difference between independent and mutually exclusive events?
- Visually stunning math concepts which are easy to explain
- taylor series of $\ln(1+x)$?
- How to tell if a set of vectors spans a space?
- Calculus question taking derivative to find horizontal tangent line
- How to determine if a function is one-to-one?
- Determine if vectors are linearly independent
- What does it mean to have a determinant equal to zero?
- Is this Batman equation for real?
- How to find perpendicular vector to another vector?
- How to find mean and median from histogram
- How many sides does a circle have?
From your picture, it seems calculating the midpoint of each edge (so 4 per rectangle), and ordering them lexigraphically (according to $x$-value, then, if $x$ value is equal, according to $y$ value) might do the trick.
Go through this list, for each midpoint on the list, find the midpoints that come after it in the list that are 'near enough' according to your criteria. The ordering makes sure that once the difference of the $x$-values is bigger than you want, you don't need to continue further in the list.
If you have found a 'match' of midpoints, you need to check that the endpoints of the corresponding edges are the same (up to tolerance), also remember to compare poth pairs of endpoints (if the midpoints of $AB$ and $CD$ are the same, it could be $A=C, B=D$ or $A=D, B=C$).
If that also works, the next test would be that the two rectangles or coplanar (not at and angle with each other). If the 2 recangles are $AXYB$ and $XCDY$ (with $XY$ being the common edge), the lenght of the normalized cross product
$$\left\lvert\frac{\overrightarrow{XA}}{\lVert\overrightarrow{XA}\rVert} \times \frac{\overrightarrow{XC}}{\lVert\overrightarrow{XC}\rVert}\right\rvert$$
should be close to zero (it is the sine of the angle excompassed by $\overrightarrow{XA}$ and $\overrightarrow{XC}$).
If that also works out, the final test would be to check that the recangles are actuelly on opposite sides of their common edge, not on the same (that would mean one is inside the other, which might also allow an optimization.). To do that calculate the normalized dot product of the previous vectors:
$$\frac{\overrightarrow{XA}}{\lVert\overrightarrow{XA}\rVert} \cdot \frac{\overrightarrow{XC}}{\lVert\overrightarrow{XC}\rVert}$$
It should be $-1$ (or near it) for rectangles on opposite sides of their common edge (good), and $1$ (or near it) for rectangles on the same side of their common edge (bad).
If all those checks work out, you can now replace $AXYB$ and $XCDY$ with their union $ACDB$. You need to update your data structures and probably restart the process, in case the new $ACDB$ would fit with another rectangle that had been previously considered but did not fit with $AXYB$ and $XCDY$.
Another idea might be to just remove the midpoints of the original $AXYB$ and $XCDY$ from the list and continue, then at the end rerun the entire process, where you remove $AXYB$ and $XCDY$ from and add $ACDB$ to the list of rectangles (and of course do the same for all the other rectangles that you found to be touching). Then your algorithms stops when one such process didn't find any new rectangles that touch.