Generally speaking, we can assert that METAGRAF includes any necessary element for making any kind of drawing. In some cases, these elements, named OBJECTS, are repeated just for funtionality or user friendliness reasons, for example, OVAL and CIRCLE. The latter can be drawn by four different ways.
Afterwards, we'll explain the reasons of this "overwealth".
All these objects can be transformed with the usual afine transformations.
On the other hand, the thickness, type of line, color and fill are modifiable.
Here are some examples:
The above images show some interesting particularities not very common. That is, in the text image we've included a math formula which has suffered the following transformations:Now, we will explain every object construction in detail.
POINT.
The object is just a pair of coordinates that define it, the same definition as MetaPost. Besides, on the fly, METAGRAF allows to choose the thickness and color trough the color dialog.
LINE.
Similarly, the object line is drawn very easily. It's done the same way as MetaPost, with typical variables: thickness, color and type of line (dotted thick, dotted thin,...summing up seven different types to select).
POLYLINE.
RECTANGLE.
OVAL.
CIRCLE.
ARC.
POLYGON.
CUBIC CURVE
ARROWS.
TEXT.
IMAGES
This object is the same as the POLYGON but not (necessarily) closed.
This is a special object. But now, we'll state that is a closed cycle made of four lines that link four points. The possibilities of thickness, color, type of line,... are the same that LINE possibilities.
Nonetheless, the METAGRAF rectangle is not necessarily 90 degrees from the start, it may get to a not rectangle paralelogram. Afterwards we will say more about.
In MetaPost the oval is made of four cubic curves, that start from the middle points of the sides of a rectangle and end in the points of the neighbour side. The control points are choosen following D. Knuth "algorithm". The OVAL, because of being built from a rectangle, has the same transformations as rectangles, so that it can be circumscribed into a non rectangular paralelogram.
There're four kinds of circles available in METAGRAF.
The first and easier one is the oval we've seen in the previous
section. We just choose a rectangle that is a square.
This is a very common trick of graphic programs, but it's not
comfortable for the user, because require grid adjusting all the
time, to get a real circle. Even at that conditions, it's not
"comfortable".
The standard circle used in METAGRAF is in fact a modified oval.
The only difference is that in this case, the rectangle is a square
and the relationship among sides has been fixed. A complex routine
allows the drawing of the circle with most ease as we'll later see.
On the other hand, the system devised for the arc drawing, allows 360 degrees arcs, that is, a circle.
Finally, there's a special circle designed for generating
spirals, that uses the MetaPost function "fullcircle". It can be used also as a circle.
The arc of circle, which is translated into a MetaPost limited "full circle", is built drawing a first line that
marks the origin, radius and slope respect the start of the arc.
Marking another point, this point and the origin of the first line are joined creating the second line that limits the arc. This one can be modified or adjusted in the simplest way, just by moving any of the three basic points, as is done with LINE or any other object.
The polygon is a classical element, very useful and easy to create and modify.
Once it's been drawn the first side, the rest is done automatically
clicking with the mouse wherever we want to place a vortex.
The number of sides has been limited to 64, never reached in
practice.
Metapost deals with it like a closed cycle of straight paths. It's
fully modifiable in 2-D and 3-D as we'll see.
This object is only found at METAGRAF, Its management resembles polygon, but, when we click the mouse in the second point after creating the first line, the cubic line appears, it's
a Bezier's. Its control points are the middle points between extrems.
If a curve line that is not limited to one element is wished, new points can be added as is done with polygons. The curve is
adjusting itself every two clicks, so that it is tangent in the
middle point of the sides of the circumscribing polygon. Metapost
handles it the same way Java does on the screen, applying Bezier
curves with the same control points, marked with the mouse clicks.
Arrows are extremely important in any technical drawing. So, all their capabilities have been exploited. They have a special panel. It appears when we press the specific button and we can choose between 5 arrow
sizes, each one with 5 different angles with the sides of the arrow, and there are five different shape of arrows to choose from.
Moreover you can soften the point or leave it pointed and the the arrow can be filled or just drawn the contour. Straight, double or reverse
... no detail has been forgotten.
Finally, we end this description with the most important of all.
It's the link with typesetting systems like TeX/LaTeX, PDFTeX,...
It's possible to use raw PostScript and use the fonts available
in the system. METAGRAF has a nice and original management of texts.
You can change shape, shearing, placings,... in such a way that
is unknown till today.
This issue will be dealt later
A new and totally original way to include any image in standard JPEG or GIF mode is now possible with METAGRAF. And, what is more, the image can be manipulated in color, brightness, special effects... etc. This is a kind of "small revolution" for MetaPost, unable up to now to use these possibilities. MG is bringing new life to MP overcoming old frontiers of this one.