Bill Galbraith wrote:
Off Topic - Sorry if I am wasting your time
I am looking for a graphics package to draw aircraft from my DATCOM+
configuration files. In that file, I have data available such as
airfoil sections, wing span, fuselage cross-sections, horizontal and
vertical tail locations, engine locations, etc.
I'm not expecting highly detailed drawing, but merely rough pictures
of what the aircraft looks like. I think it would help uncover
problems in the configuration file. The input would be via a text
file, which I can tailor to whatever is needed. I don't want to do any
interaction with it (at least not yet).
I fully expect to have to do something from scratch, but I thought I
would ask first, to see if anyone has anything that they can suggest.
Let me first say that there are at least a hundred million 2d drawing
libs available. If you want to add this functionality to an existing
application that might steer you in one particular direction or
another. If you want to start something from scratch, you'll probably
get as many suggestions as there are subscribers to this list.
My first knee jerk reaction would be to look at Perl-Tk. That's
something I have experience with and the Tk canvas widget will let you
do all kinds of 2d drawing, and even some interactive object
manipulation if you want to get fancy (i.e. maybe you want to eventually
draw the design and have the application kick out the FlightGear/JSBSim
configuration file?)
If you suspect you might eventually want to have a 3d component to your
application, you might want to think about using OpenGL. It's pretty
straightforward to set up a 2d drawing surface and then draw lines and
text in screen coordinates.
FLTK might be an interesting option ... that's a cross platform
interactive gui builder that generates C code and is then compiled (i.e.
theoretically fast). Perl-Tk is a scripted language so edit / run
/debug turn around time is much faster, but it might start to bog down
on complicated drawing tasks (but it ought to be more than fast enough
for what you are proposing.)
There's other ways to approach this too. If you just want to produce a
picture, you might look at the "GD" package for perl. This allows you
to open am image drawing surface and draw stuff to it, then save it out
to png or jpg file for viewing with any image viewer. I use this
approach for the Scenery download map.
Of course for those who's brains have opposite polarity compared to
mine, you can substitude python where ever I've written perl.
I'm sure I'm just scratching the surface here, good luck!
Curt.
_______________________________________________
Flightgear-users mailing list
[email protected]
http://mail.flightgear.org/mailman/listinfo/flightgear-users
2f585eeea02e2c79d7b1d8c4963bae2d