-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Description
This algorithm directly fits a circle with all points, eliminating the need for iterative solvation. However, the process is not as easy:
Algorithm
- Compute the Plane of the Points (SVD)
a. Compute the Centroid of the Points (this will be a plane point, so now we just need a normal vector)
b. Subtract the centroid from all points and produce the outer product using each point against itself. Add all matrices together (the result is symmetric).
c. Solve for the eigenvector associated with the lowest eigenvalue. This will be easier since you have a 3D matrix, and you simply need to solve a cubic equation (Cardano's method). This is the plane vector. If the other eigenvalues are distinct, their eigenvectors can form a basis for the plane, which you will need in the next step. - Compute the Points in 2D space on the plane
a. Project all points onto the plane. This is found by subtracting each point with any point on the plane, finding the projection of that point on the plane's normal vector, then subtracting the point by the normal vector times the length of the projection.
b. Express all points in the basis vectors of the plane. Use the centroid as the center of the coordinate system, subtract that from each vector, then find the projection distance of the results onto the basis to get the "x, y" of each point - Find the circle
a. Using your 2D points, fit them to a circle using any method. Probably least squares, using the general formula of a circle (hint, use the pseudo inverse)
b. Project the center and radius vectors back into 3D space using the center of the coordinate system as well as the basis vectors.
Resources
Metadata
Metadata
Assignees
Labels
No labels