public Vector2d ProjectPoint(Vector2d pnt) { if (projectionType == ProjectionType.FishEye) { MakeMatrixes(); Vector3d pnt3d = Coordinates.GeoTo3dDouble(pnt.Y, pnt.X, sphereRadius); Vector3d pntOut = TranMatrix.Transform(pnt3d); Coordinates cord = Coordinates.CartesianToSpherical(pntOut); Vector2d pntOut2d = new Vector2d(cord.Lng, cord.Lat); return(pntOut2d); } else { MakeMatrixes(); Vector3d pnt3d = Coordinates.GeoTo3dDouble(pnt.Y, pnt.X, sphereRadius); Vector3d pntOut = CamMatrix.Transform(pnt3d); Vector2d pntOut2d = new Vector2d(pntOut.X, pntOut.Y); if (RadialDistorion) { pntOut2d = ProjectRadialWarp(new Vector2d(pntOut.X, pntOut.Y)); } return(pntOut2d); } }