Aircraft altimeter w/FLTK

39 views
Skip to first unread message

Greg Ercolano

unread,
Jul 24, 2016, 1:03:25 AM7/24/16
to fltkg...@googlegroups.com
We don't see many examples of FLTK used to render "realistic" instruments,
so I thought I'd make a mechanical aircraft altimeter simulation.

This is an FLTK widget where you can set the altitude to any value between 0 and 99,000 feet.
The demo runs the altimeter in realtime to show how the dial and drum numbers work:



I added this demo to my "FLTK cheat" page; here's the link:
http://seriss.com/people/erco/fltk/#Altimeter

Only took a few hours to make; most of the time was spent painting the images in GIMP.
Started with a few photos, and simplified them a bit, separating them into levels.

The goal was to show how one can composite PNG images in realtime to render
a realistic instrument with very little code.

The link includes a short gif animation of what the demo looks like when you run it.

OpenGL is not used, just straight FLTK drawing calls.

aditya siram

unread,
Aug 5, 2016, 5:35:36 PM8/5/16
to fltk.general
This is really neat! So I ported it to Haskell using the FLTKHS bindings: https://github.com/deech/fltkhs-altimeter to show off both the bindings and FLTK itself.

-deech

Greg Ercolano

unread,
Aug 5, 2016, 6:21:05 PM8/5/16
to fltkg...@googlegroups.com
On 08/05/16 14:35, aditya siram wrote:
> This is really neat! So I ported it to Haskell using the FLTKHS bindings:
> https://github.com/deech/fltkhs-altimeter to show off both the bindings and FLTK itself.

Cool, glad you like it and ported it!
I perused the Haskell code; nice, looks much reduced compared to the C++ code.

Reply all
Reply to author
Forward
0 new messages