public static CoordSys GramSchmidt(CameraSpacePoint first, CameraSpacePoint sec, CameraSpacePoint third, CameraSpacePoint center) { CameraSpacePoint secNew = first.ProjOperator(sec).SubtractFrom(sec); CameraSpacePoint thirdNew = secNew.ProjOperator(third).Add(first.ProjOperator(third)).SubtractFrom(third); //float res1 = first.DotProduct(secNew); //float res2 = first.DotProduct(thirdNew); //float res3 = secNew.DotProduct(thirdNew); return(new CoordSys() { Center = center, Top = center.Add(secNew), Front = center.Add(first), Side = center.Add(thirdNew) }); }