How to check that these points formulate flat plane(on the same plane)?
Show older comments
In hyperplanes (4d and more),How to check that these points formulate flat plane(on the same plane)?
for example these points (6d plane)?
P1 =[396326796.725069,-205153846.153846,0,0,0,0];
P2 =[-205153846.153846,396326796.725069,-205153846.153846,0,0,0];
P3= [0,-205153846.153846,396326796.725069,-205153846.153846,0,0];
P4 = [0 0 -205153846.153846 396326796.725069 -205153846.153846 0];
P5=[0 0 0 -205153846.153846 396326796.725069 -205153846.153846];
P6=[0 0 0 0 -205153846.153846 198163398.362534];
Answers (1)
P1 = [396326796.725069,-205153846.153846,0,0,0,0];
P2 = [-205153846.153846,396326796.725069,-205153846.153846,0,0,0];
P3 = [0,-205153846.153846,396326796.725069,-205153846.153846,0,0];
P4 = [0 0 -205153846.153846 396326796.725069 -205153846.153846 0];
P5 = [0 0 0 -205153846.153846 396326796.725069 -205153846.153846];
P6 = [0 0 0 0 -205153846.153846 198163398.362534];
P = [P1; P2; P3; P4; P5; P6];
RankP = rank(P - P(1, :))
isHyperplane = RankP < 6 % [EDITED] "coplanar" was a clumsy term
19 Comments
M
on 8 Feb 2023
Jan
on 8 Feb 2023
The rank of the matrix is equivalent to the number of dimensions of the subspace. If the vectors do not belong to a subspace, they span the complete space, such that the rank is the number of dimensions. For your example: The 6 points build a 5D space.
M
on 8 Feb 2023
First look up the definitions of the terms you use.
A plane is an expression that is only used in three-dimensional affine space and it denotes a 2-dimensional affine subspace.
An affine hyperplane in n-dimensional affine space is an (n-1)-dimensional affine subspace.
If you want to know whether six points P1,...,P6 span an affine hyperplane,
rank([P2-P1; P3-P1; P4-P1; P5-P1; P6-P1])
must be 5.
M
on 8 Feb 2023
Torsten
on 8 Feb 2023
when we can know that these six points P1,...,P6 dont span an affine hyperplane?
If rank([P2-P1; P3-P1; P4-P1; P5-P1; P6-P1]) < 5.
Torsten
on 8 Feb 2023
P1,...,P6 span an affine hyperplane if rank([P2-P1; P3-P1; P4-P1; P5-P1; P6-P1]) = 5.
If rank([P2-P1; P3-P1; P4-P1; P5-P1; P6-P1]) < 5, they span a lower-dimensional affine subspace.
@Torsten, so this is not correct "isCoplanar = RankP < 6" ???
It is not incorrect if the idea is to test whether the points are contained in a hyperplane. If the idea is to determine whether they span a hyperplane, i.e., if their affine hull is a hyperplane, then the test would be,
spansHyperplane = (RankP == 5)
It may help to think about 3D examples to understand the difference. If you have 3 points in R^3 which are colinear, they are indeed coplanar (in fact there is an infinite selection of planes that they lie in), but their affine hull is the line all 3 points lie on, not a plane.
A set of 3 non-colinear points however do have a complete plane as their affine hull. The 3 points are therefore coplanar and the plane containing them is unique.
Jan
on 9 Feb 2023
The term "isCoplanar" in my answer was a bad choice. Then rank tells us the dimensions of the spanned subspace (or "affine hyperplane"). "Planar" and in consequence "coplanar" are less useful in 6D.
I'm not sure if the meaning of the original question has been defined clearly yet: What do you call a "flat plane"?
Categories
Find more on Error Detection and Correction in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!