Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Does cocoa just leak?



On Sunday, September 30, 2001, at 10:34 , John C. Randolph wrote:

is there an alternative way to obtain the x position on a path given a known y-position?
No. Remember that a Bezier path isn't limited to a single point at any given position on the y axis.

My paths aren't that complicated - basically it's a single rectangle, but with two of the parallel edges being curved.

What if I simplified it even more and only use one curved path segment - something like this:

[myPath moveToPoint:pointOne];
[myPath curveToPoint: pointTwo
controlPoint1:pointThree)
controlPoint2: pointFour];

If I know that the path is growing in Y for every point along the path from pointOne to pointTwo, is there a simple algorithm for finding out the value of Y is for any given X?
Could any one point me in the direction for the documentation / reference on the mathematics behind bezier paths?

I'm sorry for the OT question.

Regards,

j o a r


References: 
 >Re: Does cocoa just leak? (From: "John C. Randolph" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.