• 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: Decimation - NSBezierPath or something else?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Decimation - NSBezierPath or something else?


  • Subject: Re: Decimation - NSBezierPath or something else?
  • From: Graham Cox <email@hidden>
  • Date: Tue, 09 Aug 2011 10:49:19 +1000

On 09/08/2011, at 10:32 AM, Conrad Shultz wrote:

>>  Throwing 25,000 points at NSBezierPath might swamp
>> it, or at least run very slowly.
>
> The obligatory question: is this conjecture or have you found this to be
> the case?
>
> I have some code that plots about 7500 points in a scalable, scrollable
> NSView using NSBezierPath (without attempting any fancy optimization)
> and I see absolutely no delay at all during either the initial render or
> subsequent transformations.


I can tell you that 25,000 points in a bezier path will make for slow drawing, though it also depends on your hardware of course.

NSBezierPath does not do automatic decimation or filtering - you have to do it yourself. For example I wrote a category on NSBezierPath to perform Douglas-Peucker simplification (which is a straightforward way to simplify a path without losing its essential qualities), and it was pretty strightforward. Unfortunately that code is commercial, so I can't share - an online search will reveal the method. D-P is old and simple but still a very good method - it's the "standard" way to simplify in GIS applications. There are variations on it that improve it somewhat.

--Graham


_______________________________________________

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

  • Follow-Ups:
    • Re: Decimation - NSBezierPath or something else?
      • From: Conrad Shultz <email@hidden>
    • Re: Decimation - NSBezierPath or something else?
      • From: N!K <email@hidden>
References: 
 >Decimation - NSBezierPath or something else? (From: N!K <email@hidden>)
 >Re: Decimation - NSBezierPath or something else? (From: Conrad Shultz <email@hidden>)

  • Prev by Date: Re: Decimation - NSBezierPath or something else?
  • Next by Date: Re: CFURLWriteDataAndPropertiesToResource as root?
  • Previous by thread: Re: Decimation - NSBezierPath or something else?
  • Next by thread: Re: Decimation - NSBezierPath or something else?
  • Index(es):
    • Date
    • Thread