public static Point2D_F64 computePoint ( double t , EllipseRotated_F64 ellipse , Point2D_F64 output ) { if ( output == null ) output = new Point2D_F64 ( ) ; double ct = Math . cos ( t ) ; double st = Math . sin ( t ) ; double cphi = Math . cos ( ellipse . phi ) ; double sphi = Math . sin ( ellipse . phi ) ; // coordinate in ellipse frame double x = ellipse . a * ct ; double y = ellipse . b * st ; // put into global frame output . x = ellipse . center . x + x * cphi - y * sphi ; output . y = ellipse . center . y + x * sphi + y * cphi ; return output ; }
Computes the point on the ellipse at location t where t is an angle in radians