I'm looking for a deterministic algorithm to obtain the best fitting rhombus out of a set of user-drawn points. It need not necessarily be optimal (simple would be better).
Thanks.
I'm looking for a deterministic algorithm to obtain the best fitting rhombus out of a set of user-drawn points. It need not necessarily be optimal (simple would be better).
Thanks.
Well a rhombus is well defined by two slopes and three intercepts, so you have five unknowns to solve for. The problem is of course that your inputs (i.e. the matrix coefficients) are not exact. In this case, least squares leads to:
$x = (A^T A)^{-1} A^T b$