// creates an arbitrary Caresian coordinate system with given plane xy public static RotoTranslation3 CoordinateSystemWithPlaneXY(Plane plane) { var x = Vector3Utils.VectorOrthogonalTo(plane.Normal); var y = plane.Normal.Cross(x); return(new RotoTranslation3(Rotation3Utils.GramSchmidt(x, y), plane.ProjectOrigin())); }
public void GramSchmidt_reconstructs_rotation_from_its_x_column_and_a_linear_combination_of_the_x_and_y_columns([ValueSource("GramSchmidt_TestCases")] Rotation3 rot) { var x = 4.3 * rot.ColX(); var y = 3.4 * rot.ColY() + 0.123 * x; var result = Rotation3Utils.GramSchmidt(x, y); ExpectEqualRotations(result, rot); }