• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Getting cartesian values from Bezier curve question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting cartesian values from Bezier curve question


  • Subject: Re: Getting cartesian values from Bezier curve question
  • From: Glenn Andreas <email@hidden>
  • Date: Tue, 15 Jun 2004 15:56:06 -0500

At 7:11 AM -0700 6/15/04, Vince Ackerman wrote:
Did you get an answer to this? I too need to find this method.

Vince

On Jun 14, 2004, at 16:05, dan donaldson wrote:

My question is, is there a simple way to derive the y value of a bezier line segment given an x coordinate. Assume that there is no circumstance where more than one y value might exist for a given x value. I don't see anything in the NSBezierPath documentation that indicates that this is supported.

Why not just flatten the path (which converts it to a series of lines) - you can specify the amount of flatness for the appropriate accuracy, and then just walk the points - when you find a line whose starting X coordinate is on one size of your point, and an ending one that is on the other side, just interpolate the Y coordinate accordingly and done. (You can take either the first such or last such, depending on how you want to handle curves that cross your X coordinate multiple times).

--
Glenn Andreas email@hidden mondo blobbo, Cythera, Theldrow, oh my!
Mad, Bad, and Dangerous to Know
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >Getting cartesian values from Bezier curve question (From: dan donaldson <email@hidden>)
 >Re: Getting cartesian values from Bezier curve question (From: Vince Ackerman <email@hidden>)

  • Prev by Date: Undo Mysteries
  • Next by Date: WebKit And Threading
  • Previous by thread: Re: Getting cartesian values from Bezier curve question
  • Next by thread: Re: Getting cartesian values from Bezier curve question
  • Index(es):
    • Date
    • Thread