• 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: Conrad Shultz <email@hidden>
  • Date: Mon, 08 Aug 2011 17:32:40 -0700

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 8/8/11 5:16 PM, N!K wrote:
> Does NSBezierPath do decimation as well as interpolation? I didn't
> find it in the Class Reference. Or is there another class that does
> it? Or must I do the decimation before plotting the data with
> NSBezierPath?
>
> Decimation reduces the original sampling rate for a sequence to a
> lower rate, the opposite of interpolation. The decimation process
> filters the input data with a lowpass filter and then resamples the
> resulting smoothed signal at a lower rate.
>
>
> In my application, the math generates  hundreds of points for
> accuracy, for every one that needs to be plotted to make a decent
> looking plot. Signal processing theory says that you can't just
> throw away points, or you can generate errors.

Not ringing a bell, but this sounds more along the lines of signal
processing than pure drawing.  (NSBezierPath is for arbitrary drawing,
not plotting per se.)

You might find some useful goodies in the Accelerate framework
(http://developer.apple.com/library/mac/#documentation/Accelerate/Reference/AccelerateFWRef/_index.html),
but I've only just barely started learning about it myself.

> For example, I might generate 25,000 points and be happy to look at
> a 200 point plot. 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.

- --
Conrad Shultz

Synthetiq Solutions
www.synthetiqsolutions.com

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iD8DBQFOQIAoaOlrz5+0JdURArwDAJ4vmVoJWVJFDANlgMG1XTwA0uvcjQCfWS/l
lbWVdwHp2SPVO/N+pTvPL6s=
=w8Ez
-----END PGP 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

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

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