• 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: Warping an image with a Bezier Path
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Warping an image with a Bezier Path


  • Subject: Re: Warping an image with a Bezier Path
  • From: David Remahl <email@hidden>
  • Date: Sat, 18 Jan 2003 20:24:11 -0800

Seth,

It is definitely not possible using Quartz, anyway. With OpenGL it should be possible, depending on the size and complexity of what you are drawing. It's your best bet, by far, anyway.

You could use NSBitmapImageRep and generate OpenGL textures from the bitmap data on one of the representations. Why do you need a refresh rate of "between 80 and 160" Hz? The screen will not refresh that frequently, so you wouldn't get anything more once you exceeded the refresh rate of the display.

You may choose to construct the object you are drawing in 3D, or just texture map a flat surface composed by a large number of polygons. If you generate that surface according to the start, end and control points of the bezier path components of the NSBezierPath you want to restrain the object to, and choose reasonable texturing coordinates, you should be able to do what you want. The implementation would be rather maths intensive.

In any case, dealing with normal NSViews, NSImages and using NSGetPixelColor() (or whatever the func I'm thinking of is called) would not be as efficient as you are hoping. Optimising, using NSBitmapImageReps and doing the image warp manually would increase the speed of the drawing by an order of magnitude, but OpenGL is hardware accellerated on many machines and would beat even your best efforts.

/ Regards, David Remahl

On Saturday, January 18, 2003, at 07:43 PM, Seth Willits wrote:

I'd have to be able to change the shape of the trophy somewhere between 80 and 160 times a second (I think) and be able to draw the picture into a window in real time on pretty much any computer that can run OS X. Think it's possible?
_______________________________________________
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: 
 >Re: Warping an image with a Bezier Path (From: Seth Willits <email@hidden>)

  • Prev by Date: Re: Warping an image with a Bezier Path
  • Next by Date: UUID Generation in Cocoa
  • Previous by thread: Re: Warping an image with a Bezier Path
  • Next by thread: Re: Warping an image with a Bezier Path
  • Index(es):
    • Date
    • Thread