I’ve created a special ellipse in illustrator, one that I need drawn in my app. I’ve used Qwarkee to convert it to core graphics code using mainly:
void CGPathAddCurveToPoint (CGMutablePathRef path, const CGAffineTransform *m, CGFloat cp1x, CGFloat cp1y, CGFloat cp2x, CGFloat cp2y, CGFloat x, CGFloat y);
Here is the code:
CGMutablePathRef pPath_0 = CGPathCreateMutable();
CGPathMoveToPoint(pPath_0, NULL, 515.98,258.24);
CGPathAddCurveToPoint(pPath_0, NULL, 515.98,435.61,415.54,515.98,258.24,515.98);
CGPathAddCurveToPoint(pPath_0, NULL, 100.94,515.98,0.50,435.61,0.50,258.24);
CGPathAddCurveToPoint(pPath_0, NULL, 0.50,80.86,100.94,0.50,258.24,0.50);
CGPathAddCurveToPoint(pPath_0, NULL, 415.54,0.50,515.98,80.86,515.98,258.24);
CGPathCloseSubpath(pPath_0);

The diameter of the this proportionally sized ellipse is 515.98. Now I’d like to change the code so that the ellipse will be stretched to fit my view bounds no matter what size it is. The end points are obvious, I can just use the height and width of view to determine this. However, I’m having trouble understanding how I should determine the control points. Do I take these as proportions of view height / view width? Not sure I quite understand the mathematics of bezier paths so I can maintain the same amount of curve I’ve implemented as the view stretches either horizontally or veritcally.
I cross posted this at a physics forum and a nice guy gave me a great solution:
http://www.physicsforums.com/showthread.php?s=aff26efd9c911d2a8c29118f550b86fb&p=3996775#post3996775