[Flightgear-devel] Re: making instrument scales with MetaPost

2004-05-24 Thread Melchior FRANZ
* Josh Babcock -- Monday 24 May 2004 19:34:
> Jon S Berndt wrote:
> > FWIW, Gimp has a script that creates text arcs that I have considered 
> > using if I ever get a chance to make some instruments.

> I have not had much luck with it.

Unfortunately, the ones that I have demonstrated aren't perfect either. There's
no kerning. One can either have kerning (btex ... etex) *or* play with letters.
Have to think about that. (The text arcs aren't a MP feature, but a little macro
that I hacked together. At least I added manual kerning now, which is good enough.
Some automatic kerning would still be nice, though.)

m.

___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


Re: [Flightgear-devel] Re: making instrument scales with MetaPost

2004-05-24 Thread Josh Babcock
Jon S Berndt wrote:
FWIW, Gimp has a script that creates text arcs that I have considered 
using if I ever get a chance to make some instruments.

Jon
___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
I have not had much luck with it.
Josh
___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


RE: [Flightgear-devel] Re: making instrument scales with MetaPost

2004-05-23 Thread Jim Wilson
Jon Berndt said:

> > * Jon S Berndt, Fri May 21 16:44:16 CDT 2004:
> > > FWIW, Gimp has a script that creates text arcs that I have considered 
> > > using if I ever get a chance to make some instruments.
> > 
> > Gimp is always a good choice. However ... 
> > http://members.aon.at/mfranz/textarc.png  (27kB)
> > 
> > m.  :-]
> 
> 
> Show-off.
> 
> ;-)
> 
> That's cool. You think it would work for this?
> 
> http://www.dfrc.nasa.gov/gallery/photo/XB-70/HTML/ED97-44244-1.html
> 

Umm...I don't see any arced text in that cockpit at all.

Best,

Jim


___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


[Flightgear-devel] Re: making instrument scales with MetaPost

2004-05-23 Thread Melchior FRANZ
* Jon Berndt -- Sunday 23 May 2004 01:50:
> > http://members.aon.at/mfranz/textarc.png  (27kB)

> Show-off.

hehe  :-)



> That's cool. You think it would work for this?
> 
> http://www.dfrc.nasa.gov/gallery/photo/XB-70/HTML/ED97-44244-1.html

All the instruments in this blurry photo? That's boring. No challenge for MP ... 

m.






PS: for the curious, that is what defined the picture:

instrument("text example", 99, 9, -1);
interim defaultscale:=3.34;
arctext("FlightGear's friend MetaPost can also set text along a path! -", 60u, 
90, green);

interim defaultscale:=4.1;
arctext("no need for manual Gimp work -", 40u, 180, red);

interim defaultscale:=3;
pathtext("FlightGear Simulator", reverse fullcircle scaled 180u rotated 25 
xscaled -1, blue);

path p; p=(-70u,70u){dir -30}..(80u,60u){dir -65}..(50u,-70u){dir -135}..{dir 
180}(-70u,-70u);
pathtext("... and your paths don't even need to be circles. Any shape will do. 
 :-P", p, (1,0,1));
endinstrument;

___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


Re: [Flightgear-devel] Re: making instrument scales with MetaPost

2004-05-23 Thread Arnt Karlsen
On Sat, 22 May 2004 18:50:19 -0500, Jon wrote in message 
<[EMAIL PROTECTED]>:

> > * Jon S Berndt, Fri May 21 16:44:16 CDT 2004:
> > > FWIW, Gimp has a script that creates text arcs that I have
> > > considered using if I ever get a chance to make some instruments.
> > 
> > Gimp is always a good choice. However ... 
> > http://members.aon.at/mfranz/textarc.png  (27kB)
> > 
> > m.  :-]
> 
> 
> Show-off.

..the spell checker works?  ;-)

-- 
..med vennlig hilsen = with Kind Regards from Arnt... ;-)
...with a number of polar bear hunters in his ancestry...
  Scenarios always come in sets of three: 
  best case, worst case, and just in case.



___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


RE: [Flightgear-devel] Re: making instrument scales with MetaPost

2004-05-22 Thread Jon Berndt
> * Jon S Berndt, Fri May 21 16:44:16 CDT 2004:
> > FWIW, Gimp has a script that creates text arcs that I have considered 
> > using if I ever get a chance to make some instruments.
> 
> Gimp is always a good choice. However ... 
> http://members.aon.at/mfranz/textarc.png  (27kB)
> 
> m.  :-]


Show-off.

;-)

That's cool. You think it would work for this?

http://www.dfrc.nasa.gov/gallery/photo/XB-70/HTML/ED97-44244-1.html

Jon


___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


[Flightgear-devel] Re: making instrument scales with MetaPost

2004-05-22 Thread Melchior FRANZ
* Jon S Berndt, Fri May 21 16:44:16 CDT 2004:
> FWIW, Gimp has a script that creates text arcs that I have considered 
> using if I ever get a chance to make some instruments.

Gimp is always a good choice. However ... 
http://members.aon.at/mfranz/textarc.png  (27kB)

m.  :-]

___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


[Flightgear-devel] Re: making instrument scales with MetaPost

2004-05-22 Thread Melchior FRANZ
* Roy Vegard Ovesen -- Saturday 22 May 2004 00:39:
> On Friday 21 May 2004 23:41, Melchior FRANZ wrote:
> > I uploaded a new version that contains a weird ASI with non-linear
> > mapper #n. Looks strange. No idea what they had in mind.
> 
> I guess that when one wants to monitor for example the approach speed it makes 
> sense to have greater scale resolution around the approach speed.

Yes, but why is 10--20 not spread that much, and why is 80--100, but not
60--80 and not 100--120. Must have to do with the blue line, but what?
This was modelled after "Jim's" cockpit photo
(ttp://www.airliners.net/open.file/438320/L/) -- all other bo105 cockpit
photos have an evenly spaced ASI. These just weren't sharp enough. Maybe
I'll replace that instrument with a more common (and less obscure) one.
(Was it just a leftover from the flea market? For a totally different
aircraft? ;-)



> This document contains a lot of MetaPost hints and methods, and is a nice 
> supplenet to the user manual:
> 
> http://www.pragma-ade.com/general/manuals/metafun-p.pdf

Some interesting stuff, but mostly related to the LaTeX "competitor"
ConTeXt, and not to MP.

m.



PS: I've yet again updated the file. Now it outputs interpolation table
entries for the *.xml file. Only need to be copied over, e.g.:

$ mpost bo105.mp
This is MetaPost, Version 0.641 (Web2C 7.4.5)
(bo105.mp
== Dual Engine/Rotor Tachometer ==
035
221151
442267
[...]

PPS: It's a little known fact, but the led.txf font that is used in the
 radios and many instruments was done with MetaPost, too.

PPPS: I'll stop with MP-propaganda now.  :-)  

m.

___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


Re: [Flightgear-devel] Re: making instrument scales with MetaPost

2004-05-21 Thread Roy Vegard Ovesen
On Friday 21 May 2004 23:41, Melchior FRANZ wrote:
> * Roy Vegard Ovesen -- Friday 21 May 2004 23:26:
> > This @() function proved to be very powerfull and it made creating scales
> > very easy.
>
> I changed this to a unary operator #. So one can now write #10 and metapost
> will replace this by the angle that represents the scale value of 10% RPM.
>
> > I can see this function modified to create non-linear scales
> > (exponential, logaritmic ...), scales that go counter-clockwise ...
>
> Yeah. I uploaded a new version that contains a weird ASI with non-linear
> mapper #n. Looks strange. No idea what they had in mind.

I guess that when one wants to monitor for example the approach speed it makes 
sense to have greater scale resolution around the approach speed.

This document contains a lot of MetaPost hints and methods, and is a nice 
supplenet to the user manual:

http://www.pragma-ade.com/general/manuals/metafun-p.pdf

-- 
Roy Vegard Ovesen


___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


[Flightgear-devel] Re: making instrument scales with MetaPost

2004-05-21 Thread Melchior FRANZ
* Roy Vegard Ovesen -- Friday 21 May 2004 23:26:
> This @() function proved to be very powerfull and it made creating scales very 
> easy.

I changed this to a unary operator #. So one can now write #10 and metapost will
replace this by the angle that represents the scale value of 10% RPM.



> I can see this function modified to create non-linear scales  
> (exponential, logaritmic ...), scales that go counter-clockwise ...

Yeah. I uploaded a new version that contains a weird ASI with non-linear mapper #n.
Looks strange. No idea what they had in mind. (BTW: the fact that it doesn't look
like a circle is an optical illusion. It *is* a circle. :-)

  http://members.aon.at/mfranz/asi.png  (24kB)

m.

___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


Re: [Flightgear-devel] Re: making instrument scales with MetaPost

2004-05-21 Thread Jon S Berndt
FWIW, Gimp has a script that creates text arcs that I have considered 
using if I ever get a chance to make some instruments.

Jon
___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


Re: [Flightgear-devel] Re: making instrument scales with MetaPost

2004-05-21 Thread Roy Vegard Ovesen
On Thursday 20 May 2004 18:34, Melchior FRANZ wrote:
> OK, here's a new version, just so you can see how easy instrument face
> creation with MetaPost is. Note that there's a function @() defined, that
> maps the real instrument angles to MetaPost angles. So I could directly
> input all the values as I saw them on the cockpit photo.

This @() function proved to be very powerfull and it made creating scales very 
easy. I can see this function modified to create non-linear scales 
(exponential, logaritmic ...), scales that go counter-clockwise ... I renamed 
it to aout() and ainn() when I needed two of it, because MetaPost apparently 
did not like names like @out() and @inn().

I would recomend to anyone trying to decide how to create instrument faces to 
at least take a look at MetaPost. With a bit of experience it becomes quicker 
and a lot more accurate than hand-drawing. Download Melchior's example and 
start from there!

I used the example file to recreate the King Air Fuel Gauge, and I'm 
continuing to create several other instrument faces for the King Air.

-- 
Roy Vegard Ovesen


___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


Re: [Flightgear-devel] Re: making instrument scales with MetaPost

2004-05-21 Thread Roy Vegard Ovesen
On Thursday 20 May 2004 12:01, Melchior FRANZ wrote:
> BTW: this is my little transparency trick: in my fgfs.mp library file I
> have this:
>
>color foreground, transparent;
>background:=black;
>transparent:=white;
>white:=255/256white;
>foreground:=white;
>
> which lets white actually be written as 254/254/254 ... white enough (who
> needs true white, anyway), and transparent areas are 255/255/255. Note that
> 1/2a is the same as (1/2)a or .5a, and not 1/(2a).
>
>   ***
>
> now I can "draw foo withcolor transparent"
>
>   ***
>
> and later, in my Makefile I have lines like these:
>
>
>foo.rgb: foo.mp Makefile
>mpost foo.mp
>convert -density 1024x1024 foo.1 -transparent white -resize
> 256x256 sgi:foo.rgb

One can also use Gimp to turn a color to alpha (Filters->Colors->Color to 
Alpha...). When doing this, the shades of the color becomes "shades" of 
alpha. For antialiased edges this works very well. Downside is of course that 
it is much more work :-(

-- 
Roy Vegard Ovesen


___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


[Flightgear-devel] Re: making instrument scales with MetaPost

2004-05-20 Thread Melchior FRANZ
OK, here's a new version, just so you can see how easy instrument face
creation with MetaPost is. Note that there's a function @() defined, that
maps the real instrument angles to MetaPost angles. So I could directly
input all the values as I saw them on the cockpit photo. Also, the
program outputs the correct fgfs angles for the *.xml interpolation
table. (Modeled after http://www.airliners.net/open.file/438320/L/)

  http://members.aon.at/mfranz/bo105.mp  (3.3kB)
  http://members.aon.at/mfranz/tach.png  (27kB)

m.  :-)


___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


[Flightgear-devel] Re: making instrument scales with MetaPost

2004-05-20 Thread Melchior FRANZ
* Vivian Meazza -- Thursday 20 May 2004 17:00:
[turbine RPM]
> They go from idle to max, isn't that enough?

no

m.

___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


RE: [Flightgear-devel] Re: making instrument scales with MetaPost

2004-05-20 Thread Vivian Meazza


 Melchior FRANZ wrote
 
> * Vivian Meazza -- Thursday 20 May 2004 16:07:
> > Melchior FRANZ wrote
> > > only the rotor hand, though, because there's no turbine RPM
> > > in YASim (?). Maybe I'll make the turbine RPM up with Nasal ...
> [...]
> > N1 N2 ?
> 
> Yes, but there's no way to start/stop the turbines in YASim, 
> so the values don't increase/decrease when the turbine is 
> spooling up/down according to the sound.
> 
> m.
> 

They go from idle to max, isn't that enough?

V



___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


Re: [Flightgear-devel] Re: making instrument scales with MetaPost

2004-05-20 Thread Andy Ross
Melchior FRANZ wrote:
> hh ... now that makes sense. I couldn't read the word "PERCENT". I guess
> one needs to be native English speaker to be able to decipher that. OK, I'll
> do this instrument now -- only the rotor hand, though, because there's no
> turbine RPM in YASim (?). Maybe I'll make the turbine RPM up with Nasal ...

Well, as of last week, there *is* a working turbine RPM output.  The
problem is that there's no turbine model in the helicopter stuff.  The
engine is essentially hardcoded into the Rotor class, it can't be
shared with the rest of the code.

What needs to happen is that the rotor code should simply export a
torque, and let the external code (either PropEngine, or something
like it) do the RPM integration.

Andy

___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


[Flightgear-devel] Re: making instrument scales with MetaPost

2004-05-20 Thread Melchior FRANZ
* Vivian Meazza -- Thursday 20 May 2004 16:07:
> Melchior FRANZ wrote
> > only the rotor hand, though, because there's no turbine RPM 
> > in YASim (?). Maybe I'll make the turbine RPM up with Nasal ...
[...]
> N1 N2 ?

Yes, but there's no way to start/stop the turbines in YASim, so the
values don't increase/decrease when the turbine is spooling up/down
according to the sound.

m.

___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


Re: [Flightgear-devel] Re: making instrument scales with MetaPost

2004-05-20 Thread Al West
On Thursday 20 May 2004 14:02, Melchior FRANZ wrote:
> * Al West -- Thursday 20 May 2004 14:43:
> > On Thursday 20 May 2004 08:13, Melchior FRANZ wrote:
> > > Looks like Maik's rotor RPM numbers are off
> > > (442 RPM). I can't make sense of the dual tacho.
> >
> > What doesn't make sense?
>
> The ticks are labeled from 0 to 140, with a lot of colored marks around
> 100. Where would 442 fit into this range? It's not guaranteed that Maik's
> 442 is right, of course. I'll ask my adviser.
>

It's showing Percentage RPM.  Some marks of bo105 have an autothrottle to 
maintain Rotor RPM which is what some of the coloured marks represent.  

___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


RE: [Flightgear-devel] Re: making instrument scales with MetaPost

2004-05-20 Thread Vivian Meazza


Melchior FRANZ wrote
 
> 
> * Jim Wilson -- Thursday 20 May 2004 15:18:
> > The rotor can exceed the drive shaft speed (e.g. autorotation).  Is 
> > that what you are asking?
> 
> No, I couldn't see where 442 would fit into that scale, and 
> what 140 should stand for (140 RPM? ... too low; or 14000 
> RPM? ... too high), but ...
> 
> 
> 
> > Those ticks are a "percent" of something, note that label
> > "Percent RPM" on the face in that pic.
> 
> hh ... now that makes sense. I couldn't read the word 
> "PERCENT". I guess one needs to be native English speaker to 
> be able to decipher that. OK, I'll do this instrument now -- 
> only the rotor hand, though, because there's no turbine RPM 
> in YASim (?). Maybe I'll make the turbine RPM up with Nasal ...
> 
> 
> 
> > I think online somewhere you might
> > find a helicopter manual for Fly 2 that explains some of this.
> 
> Hey, I have a real Bo105 pilot at hand since a few days. Just 
> need to ask him and wait for response. :-)
> 

N1 N2 ?

Regards

Vivian 



___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


[Flightgear-devel] Re: making instrument scales with MetaPost

2004-05-20 Thread Melchior FRANZ
* Jim Wilson -- Thursday 20 May 2004 15:18:
> The rotor can exceed the drive shaft speed (e.g. autorotation).  Is that what
> you are asking?

No, I couldn't see where 442 would fit into that scale, and what 140 should
stand for (140 RPM? ... too low; or 14000 RPM? ... too high), but ...



> Those ticks are a "percent" of something, note that label 
> "Percent RPM" on the face in that pic.

hh ... now that makes sense. I couldn't read the word "PERCENT". I guess
one needs to be native English speaker to be able to decipher that. OK, I'll
do this instrument now -- only the rotor hand, though, because there's no
turbine RPM in YASim (?). Maybe I'll make the turbine RPM up with Nasal ...



> I think online somewhere you might 
> find a helicopter manual for Fly 2 that explains some of this.

Hey, I have a real Bo105 pilot at hand since a few days. Just need to ask him
and wait for response. :-)

m.

___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


[Flightgear-devel] Re: making instrument scales with MetaPost

2004-05-20 Thread Melchior FRANZ
* Al West -- Thursday 20 May 2004 14:43:
> On Thursday 20 May 2004 08:13, Melchior FRANZ wrote:
> > Looks like Maik's rotor RPM numbers are off
> > (442 RPM). I can't make sense of the dual tacho.
> >
> What doesn't make sense?

The ticks are labeled from 0 to 140, with a lot of colored marks around
100. Where would 442 fit into this range? It's not guaranteed that Maik's
442 is right, of course. I'll ask my adviser.

m.

___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


Re: [Flightgear-devel] Re: making instrument scales with MetaPost

2004-05-20 Thread Josh Babcock
Melchior FRANZ wrote:
* Melchior FRANZ -- Thursday 20 May 2004 09:37:
What I would [...]:
(1) [...]
(2) [...]
(2) [...]
(3) [...]

And finally:
  (7) learn to count
m.
___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
No, you have to play it off.  I't like, umm, counting from zero, except you 
still get to start on one, see?  That way the programers and the non-programers 
are all happy, right?  Yeah, you *meant* to do it.

Josh
___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


Re: [Flightgear-devel] Re: making instrument scales with MetaPost

2004-05-20 Thread Jim Wilson
Melchior FRANZ said:

> * Jim Wilson -- Thursday 20 May 2004 01:46:
> > Melchior FRANZ said:
> > > Here's a small MetaPost file that I used to make the Bo105 rotor tacho
> > > (which is totally made up; need some expert advice first):
> > 
> > Check out:
> > http://www.airliners.net/open.file/438320/L/
> 
> Hey, very cool. The best cockpit photo that I've seen so far. How could I miss
> that. The sad thing is that none of the photos agree on instrument layout.
> (I miss an ADF, btw.) Looks like Maik's rotor RPM numbers are off (442 RPM).
> I can't make sense of the dual tacho.

The rotor can exceed the drive shaft speed (e.g. autorotation).  Is that what
you are asking?  Those ticks are a "percent" of something, note that label
"Percent RPM" on the face in that pic.  I think online somewhere you might
find a helicopter manual for Fly 2 that explains some of this.
 
Best,

Jim


___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


Re: [Flightgear-devel] Re: making instrument scales with MetaPost

2004-05-20 Thread Al West
On Thursday 20 May 2004 08:13, Melchior FRANZ wrote:
> Looks like Maik's rotor RPM numbers are off
> (442 RPM). I can't make sense of the dual tacho.
>

What doesn't make sense?

___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


[Flightgear-devel] Re: making instrument scales with MetaPost

2004-05-20 Thread Melchior FRANZ
BTW: this is my little transparency trick: in my fgfs.mp library file I have this:

   color foreground, transparent;
   background:=black;
   transparent:=white;
   white:=255/256white;
   foreground:=white;

which lets white actually be written as 254/254/254 ... white enough (who needs true
white, anyway), and transparent areas are 255/255/255. Note that 1/2a is the same
as (1/2)a or .5a, and not 1/(2a).

  ***

now I can "draw foo withcolor transparent"

  ***

and later, in my Makefile I have lines like these:


   foo.rgb: foo.mp Makefile
   mpost foo.mp
   convert -density 1024x1024 foo.1 -transparent white -resize 256x256 
sgi:foo.rgb

m.

___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


[Flightgear-devel] Re: making instrument scales with MetaPost

2004-05-20 Thread Melchior FRANZ
* Josh Babcock -- Thursday 20 May 2004 01:01:
> > On Tuesday 18 May 2004 19:09, Melchior FRANZ wrote:
> > >  http://members.aon.at/mfranz/tach.mp  (1.9kB)

[instrument faces created with MetaPost]
> Ok, this stuff looks really cool, but I am encountering a pretty steep learning 
> curve with MetaPost.  Does someone out there want to cook up a generic template 
> with plug-in values for all the variables and enough documentation that someone 
> can just pick it up and go?

Just take one of the two presented *.mp files, add a new instrument ("beginfig"
or, in my case, "begininstrument") and add some drawing commands. They are pretty
self-explaining. Then run the file through MetaPost:

  $ mpost foo.mp # may be called metapost
  $ for i in foo.*; do convert $i $i.png; done


Writing templates wouldn't make sense. It would be like writing a template for
poems. The language isn't hard to understand (at least the parts that we used).
The documentation that comes with MetaPost is sufficient -- look in
/usr/share/texmf/doc/metapost/base/ or wherever your TeX dir is). Ask if you
have problems. Here's a short tutorial:

z0=(2,3);  % define coordinate, can also be written as  x0=2; y0=3;
drawdot z0;% draw a dot, obviously at z0  (draw works, too)
draw z0--z1;   % draw a straight line between from z0 to z1
draw z0..z1..z2;   % draw a smooth line through the points
z0=z1 rotated 30;  % does what it says it does  ;-)

m.

___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


[Flightgear-devel] Re: making instrument scales with MetaPost

2004-05-20 Thread Melchior FRANZ
* Melchior FRANZ -- Thursday 20 May 2004 09:37:
> What I would [...]:
> 
> (1) [...]
> (2) [...]
> (2) [...]
> (3) [...]

And finally:

  (7) learn to count

m.

___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


[Flightgear-devel] Re: making instrument scales with MetaPost

2004-05-20 Thread Melchior FRANZ
* Roy Vegard Ovesen -- Wednesday 19 May 2004 22:22:
> http://home.tiscali.no/rvovesen/fuel.png  (19,964 bytes)

Nice! With the MetaPost user number at least doubling within just one day
I'd say that this is now the preferred way to make instrument faces.  ;-) 



> http://home.tiscali.no/rvovesen/rose.mp
> 
> If your example is "not the best coding style" then I would say that mine is 
> probably _the_ worst coding style. :-)

First of all: I cheated. The "not the best style" statement was for the first
upload, but I consecutively improved the style and uploaded new version. And
then: TMTOWTDI (there's more than one way to do it) and the result counts.
Nothing else. 



> I used polar coordinates to draw the scale lines at desired angles and radii.

So did I. Except ...



> I also used polar coordinates to place the numbers at the exact same angles as 
> the lines. It looks to me like you have carefully chosen the cartesian 
> coordinates to place the number labels at.

... for the digits. That's because digits have rectangle shape and can't be
placed evenly. There's some fine control required, and I made use of the
symmetry properties of 0/2/4/6 and 1/5.



> I opened the postscript file with Gimp. Upon opening, one can select the 
> resolution (DPI) and the amount of anti-aliasing of graphics and text 
> separately.

I have a Makefile that creates the rgb and drops it into the bo's instrument
dir. No intermediate, manual steps. I would have used gimp, though, if "convert"
hadn't produced a decent texture already.

What I would change in your *.mp file, is:

(1) The position and size of the image: the center of the face should IMHO be
at "origin" (0,0). That's a lot more natural, makes rotations easier, and
the code easier to read. The canvas should take the later size into account:
my faces are already 2^n * 2^m in size. No later cropping required,
only "convert foo.1 foo.png".

(2) I prefer to use relative units. I don't define u in terms of length units
(1 cm), but such that (0u,0u) is the center, (100u,100u) the upper right
corner, and (-100u,-100u) the lower left corner.

(2) I'd rather use "(0,10u) rotated i" instead of "(3u+10u*cosd(i),3u+10u*sind(i)"
(provided that you considered (1). Or even "left scaled 10u rotated i".

(3) The position of 10, 12 and 14. That's why I didn't use polar coordinates
for that.  ;-)

m.

___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


[Flightgear-devel] Re: making instrument scales with MetaPost

2004-05-20 Thread Melchior FRANZ
* Jim Wilson -- Thursday 20 May 2004 01:46:
> Melchior FRANZ said:
> > Here's a small MetaPost file that I used to make the Bo105 rotor tacho
> > (which is totally made up; need some expert advice first):
> 
> Check out:
> http://www.airliners.net/open.file/438320/L/

Hey, very cool. The best cockpit photo that I've seen so far. How could I miss
that. The sad thing is that none of the photos agree on instrument layout.
(I miss an ADF, btw.) Looks like Maik's rotor RPM numbers are off (442 RPM).
I can't make sense of the dual tacho.

Maybe I can get some better pictures in the future: A RL Bo105 pilot contacted
me for the 3d model and said he could send me some photos. He hasn't tried
fgfs yet and I'm not sure if he will. But he's an army pilot and where there's
one, there should be others. Once our FDM is considered finished, I could try
to pick up a tester.  :-)



> >   http://members.aon.at/mfranz/tach.mp  (1.9kB)

> Looks interesting.

... and it's easier to learn than Perl, as long as you stay away from the
more obscure language features. (Those can be scary.)

m.

___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel