Hi John,

The difficulty with this kind of display is simulating the persistence of the old cathode-ray tubes in a realistic way. Just drawing a shadow is unlikely to work, though it might help get you some way by creating the glow caused by scattering.

One possibility is to use OpenGL. It has a "history buffer" mode (may not be called that - I forget exactly) that stores the previous image at a diminished brightness and that can be stacked for a series of frames, giving a fade or trail effect.

Alternatively you can model persistence yourself by buffering up several frames (for example, using a NSBitmapImageRep) and then drawing the stack for each frame followed by the latest content. I have used this approach to simulate an oscilloscope display and it works well in terms of realism, but performance can be an issue. You'll probably need to store at least 3 or 4 "previous" frames to get the effect you want - there's no really good way to do it in one pass and get realism. Fact is those old tubes literally stored the image in the phosphors which naturally faded in their own time after the beam passed - to simulate that realistically requires that you model the image storage.

--Graham


On 27/09/2009, at 11:19 AM, John Cebasek wrote:

Hi All:

I'm wondering what the best way to create a radar sweep effect is? (Like in old war movies?)

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to