git cherry-pick commit
Least Square issue
two points determin a line
2 unknown 2 linear equation cramer rule
3 points
2 unknown,
approximation
overdetermined system
least square solution
derivative = 0
line:
two forms:
- implicit form: positive / negative space
- parameterized form: coding
converting between two forms
Triangles:
How to figure out the order of each triangle ?
det of a matrix
it also represents signed area of triangle
parametric form barycentric form
Rectangles:
parametric form
symmetric form : code
center , direction, extent
Polylines:
Polygons:
concave
convex
2d polygon code:
how to test polygon is simple polygon ?
neighboring edges does not intersect each other
how to test polygon is convex polygon ?
iterate every vertex and they are aloways on the same pos/neg side of edge composed with neighboring vertexs.
Quatric curve can represent following type:
- circle
parametric form: quatric form
3d space circle
center, normal and radius
- ellipses parametric form X = C + e0*cos(t)A0 + e1sin(t)*A1
AlignedBox: aabb
use min and max to represent
Obb: center axis extent