asierra / Metagrafica

MetaGrafica is a descriptive language to create 2D vector graphics of publication quality as Encapsulated PostScript.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

metagrafica

For English, see below.

MetaGráfica es un lenguaje gráfico vectorial 2D de construcción descriptiva. La versión original de finales de los 1980s controlaba directamente una impresora láser HP en una época en que no había buenas aplicaciones gráficas con salidas de la calidad requerida por un documento científico para publicación. En la versión de 2002 se migró al lenguaje C++, se aprovechó la biblioteca estándar de estructuras de datos STL y la orientación a objetos. Con esa versión la salida era exclusivamente Encapsulated PostScript y el texto usaba el código Latin1 o ISO 8859-1 que incluía todos los caracteres especiales usados en español y los símbolos matemáticos y griegos se conseguían con la fuente estándar symbol. Esa versión fue usada para los libros de texto de Mecánica Cuántica de Luis de la Peña. PostScript se estancó en esos años, no alcanzó la revolución de Unicode, pero sigue siendo soportado por la mayoría de las aplicaciones gráficas y es trivial convertirlo al moderno PDF. Esta versión genera únicamente EPS y de ser necesario, integra una fuente de TeX para los símbolos griegos, matemáticos y físicos.

El tipo de datos elemental es el punto, definido por una pareja de coordenadas (x, y) en un espacio cartesiano bidimensional. La estructura de datos básica es el camino ("path"), formado por una serie de puntos, con lo que se puede definir cualquier objeto gráfico como curvas, polígonos, etc. Las características específicas como grosor de línea o color se definen mediante atributos. Maneja una versión limitada de texto matemático estilo LaTeX, que permite escribir símbolos griegos, super y subscripts y otros símbolos físicos. Su fortaleza es la definición de estructuras, que permiten combinar distintos primitivos gráficos con transformaciones lineales en coordenadas homogéneas, para generar gráficos más complejos, sin necesidad de usar otro lenguaje de programación. Es importante aclarar que Metagrafica no pretende ser un lenguaje de programación, es muy específico y limitado a la generación de figuras técnicas de alta calidad.

Esta versión deberá ser compilada con el estándar 2014 de C++, con las recomendaciones del [C++ Ortodoxo] (https://gist.github.com/bkaradzic/2e39896bc7d8c34e042b).


MetaGráfica is a 2D descriptive vector graphics language. The original version from late 1980s directly controlled an HP laser printer at a time when there were no good graphics applications with output of the quality required for a scientific publication. In the 2002 version, it was migrated to the C++ language, taking advantage of object oriented programming and the STL. With that version the output was exclusively Encapsulated PostScript and for text we used the Latin1 or ISO 8859-1 coding that included all the special characters used in Spanish and Western Europe languages; the mathematical and Greek symbols were achieved using the standard symbol font. That version was used for Luis de la Peña's Quantum Mechanics textbooks. PostScript stagnated in those years, falling short of the Unicode revolution, but it is still supported by most graphical applications and is trivial to convert to modern PDF. This version still generates only EPS and, if necessary, embedes a TeX font for Greek, mathematical and physical symbols.

The elementary data type is the point, defined by a pair of coordinates (x, y) in a two-dimensional Cartesian space. The basic data structure is the path, formed by a series of points, with which any graphic object can be defined such as curves, polygons, etc. Specific characteristics such as line width or color are defined by attributes. It handles a limited version of LaTeX-style mathematical text, which allows you to write Greek symbols, super and subscripts and other physical symbols. Its strength is the definition of structures, which allow combining different graphic primitives with linear transformations in homogeneous coordinates, to generate more complex graphics, without the need to use another programming language. It is important to clarify that Metagrafica is not intended to be a programming language, it is very specific and limited to the generation of high quality technical figures.

This version must be compiled with the C++ 2014 standard, following the recommendations of [Orthodox C++] (https://gist.github.com/bkaradzic/2e39896bc7d8c34e042b).

License: GPL 3.0 Copyright (c) 2024 Alejandro Aguilar Sierra (algsierra@gmail.com)

About

MetaGrafica is a descriptive language to create 2D vector graphics of publication quality as Encapsulated PostScript.

License:GNU General Public License v3.0


Languages

Language:C++ 69.7%Language:C 28.5%Language:Lex 1.5%Language:Makefile 0.4%