Re: [Flightgear-devel] Metapost for drawing instruments?
BRILLIANT! Incredibly useful, the best method I have ever seen for drawing instruments.Thank you so much for sharing. Alex On 11 Jun 2010, at 19:56, Melchior FRANZ wrote: * Roy Vegard Ovesen -- Friday 11 June 2010: Melchior made a Python script to generate svg-files: http://www.mail-archive.com/flightgear-de...@flightgear.org/msg30853.html Guess I have to answer now, as the links in that posting are no longer valid: $ wget http://members.aon.at/mfranz/svginstr.tar.gz# [5 kB] $ tar -xzf svginstr.tar.gz $ cd svginstr $ make This lets simple Python driver files (like torque.py) generate SVG files that can then be further edited in inkscape if necessary. That's a lot easier than to mess with all the ticks and arcs in inkscape, though that's possibly only because I'm not an inkscape expert. Examples (two test files, two actual bo105 files) inside. Just run make. m. -- ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel -- ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Metapost for drawing instruments?
* Alexander Barrett -- Sunday 13 June 2010: BRILLIANT! Thanks. :-) I've just committed more changes and tagged v0.1. This is backward compatible. But the next version won't be, so if you plan to start using the script, better wait a few days. The main changes in v0.2 will be that there's no more bullet() and ptext(), and that all graphics primitives are drawn at origin. All operations lose x and y args, which are replaced by positioning commands. These can be concatenated. All polar coordinates will be specified as (angle, distance), never the other way around. clock = instrument(clock.svg, 512, 512, bo105 clock) clock.at(0, 80).text(FlightGear, color = red) or instead of the former ptext() (i.e. text with polar coordinates): clock.at_polar(30, 80).text(FlightGear) And you can concatenate these positioning commands with offsets or polar_offsets: clock.at_polar(30, 80).offset(-5, 3).text(FlightGear) This makes manual adjustments easier, as all angles are internally mapped using the angle() method. And this angle() method can/should be redefined to map scale values to angles, like it used to be. (That way one can just make the tick at scale(!) value 100 red, and doesn't have to figure out at which angle exactly that is. The angle() method knows already.) Confused? Excellent! :-)OK, I'll write some documentation too ... m. -- ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Metapost for drawing instruments?
* Melchior FRANZ -- Friday 11 June 2010: Guess I have to answer now, as the links in that posting are no longer valid: $ wget http://members.aon.at/mfranz/svginstr.tar.gz# [5 kB] $ git clone git://gitorious.org/svginstr/svginstr.git m. -- ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Metapost for drawing instruments?
js.canvas and webGL is cool pete On Sat, Jun 12, 2010 at 5:01 PM, Melchior FRANZ mfr...@aon.at wrote: * Melchior FRANZ -- Friday 11 June 2010: Guess I have to answer now, as the links in that posting are no longer valid: $ wget http://members.aon.at/mfranz/svginstr.tar.gz# [5 kB] $ git clone git://gitorious.org/svginstr/svginstr.git m. -- ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel -- ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Metapost for drawing instruments?
Hi, Does anyone have any examples of using metapost to draw instrument graphics (arcs, ticks, etc.) Or are there other free tools that have good primitives for drawing instrument/gauge graphics? I have a little side personal project here and I'd like to play around with it a bit. I personally use Inkscape with much satisfaction. Drawing arcs, marks and numbers is very easy with the vectorial capacities of Inkscape. At the end of the job, I export as a bitmap ( png is default in Inkscape ) , then I import the result in GIMP to add shadows or other fancy eye candy. I attach an example Inkscape file, if you want to see how things are done. Cheers, Patrice attachment: asi-example.svg-- ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Metapost for drawing instruments?
On Fri, Jun 11, 2010 at 2:00 PM, Patrice Poly p.pol...@gmail.com wrote: Hi, Does anyone have any examples of using metapost to draw instrument graphics (arcs, ticks, etc.) Or are there other free tools that have good primitives for drawing instrument/gauge graphics? I have a little side personal project here and I'd like to play around with it a bit. I personally use Inkscape with much satisfaction. Drawing arcs, marks and numbers is very easy with the vectorial capacities of Inkscape. At the end of the job, I export as a bitmap ( png is default in Inkscape ) , then I import the result in GIMP to add shadows or other fancy eye candy. Same process for me. Inkscape has worked out great for my instrumentation. -Gary aka Buckaroo -- ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Metapost for drawing instruments?
* Roy Vegard Ovesen -- Friday 11 June 2010: Melchior made a Python script to generate svg-files: http://www.mail-archive.com/flightgear-de...@flightgear.org/msg30853.html Guess I have to answer now, as the links in that posting are no longer valid: $ wget http://members.aon.at/mfranz/svginstr.tar.gz# [5 kB] $ tar -xzf svginstr.tar.gz $ cd svginstr $ make This lets simple Python driver files (like torque.py) generate SVG files that can then be further edited in inkscape if necessary. That's a lot easier than to mess with all the ticks and arcs in inkscape, though that's possibly only because I'm not an inkscape expert. Examples (two test files, two actual bo105 files) inside. Just run make. m. -- ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Metapost for drawing instruments?
On Fri, Jun 11, 2010 at 1:16 PM, Roy Vegard Ovesen wrote: Melchior made a Python script to generate svg-files: http://www.mail-archive.com/flightgear-de...@flightgear.org/msg30853.html Excellent, I'll play around with this and see what I can come up with. Thanks! Curt. -- Curtis Olson: http://baron.flightgear.org/~curt/ -- ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] Metapost for drawing instruments?
* Melchior FRANZ -- Friday 11 June 2010: Guess I have to answer now, as the links in that posting are no longer valid: $ wget http://members.aon.at/mfranz/svginstr.tar.gz# [5 kB] ... and that wasn't the last version, either. Please download again. Not that it has changed much, but there were some minor fixes. The arctext works now, for example. But also note that this isn't a finished package, meant for publication. I just hacked along as I needed new features, and I was really a Perl guy back than. I'll probably rewrite some parts once I do the missing bo105 intruments. That the bo105's clock doesn't look very pretty doesn't have much to do with the code. It's just that: - I used ksvg for rendering back then, and it placed numbers differently, so they are now off a bit in inkscape. - I didn't have a font where the 1 (ones) were nose-less, so I just used a lowercase L. On the small clock scale this didn't matter much, but nowadays I'd probably search longer for a proper font, or create one with fontforge. Hint: use fc-list on Linux to get the names of available fonts. m. -- ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel