• 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: How to import drawing paths into a Cocoa application?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to import drawing paths into a Cocoa application?


  • Subject: Re: How to import drawing paths into a Cocoa application?
  • From: Jens Alfke <email@hidden>
  • Date: Sat, 26 Apr 2008 21:44:31 -0700


On 26 Apr '08, at 7:24 PM, John C. Randolph wrote:

I've asked several math majors over the years if they could give me an exact function for the length of a bezier curve. They've generally told me it was possible, but none of them actually produced it.


A math major's notion of "an exact function" probably allows integral signs. :-P

I looked into similar operations on cubic curves (though not specifically path length) years and years ago when I worked on a font- design program. There are a few easy operations, like getting the bounding-box, but otherwise the math tends to get really hairy. In the case of length, you're solving a path integral, and if I remember my college calculus*, the integrand will be a tangle of roots of sums of sixth powers.

Everything I've read since indicates that the universal solution is to flatten the curves and do the rest of the work on polygons, which is far easier. (One of the exceptions was Apple's old QuickDraw GX: like TrueType fonts, it was based on quadric curves, which are less flexible but mathematically more tractable. GX apparently had code for doing a lot of operations directly on curves without having to flatten them first.)

—Jens

* I don't. o_O

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >How to import drawing paths into a Cocoa application? (From: Steve Weller <email@hidden>)
 >Re: How to import drawing paths into a Cocoa application? (From: Graham Cox <email@hidden>)
 >Re: How to import drawing paths into a Cocoa application? (From: "John C. Randolph" <email@hidden>)

  • Prev by Date: Re: Calculating file size
  • Next by Date: Re: Observer CoreData Objects changes
  • Previous by thread: Re: How to import drawing paths into a Cocoa application?
  • Next by thread: Re: How to import drawing paths into a Cocoa application?
  • Index(es):
    • Date
    • Thread