From: Dimitrios Eftaxiopoulos Date: Fri, 23 Mar 2012 09:03:45 +0000 (+0200) Subject: Imported Upstream version 2~rc2+svn378 X-Git-Tag: archive/raspbian/2.5-2+rpi1^2~26^2~32 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=d0f90bdb556cde097039750f85a6c89d58aacc5c;p=mathgl.git Imported Upstream version 2~rc2+svn378 --- diff --git a/examples/full_test.cpp b/examples/full_test.cpp index 62cb93e..f9d6481 100644 --- a/examples/full_test.cpp +++ b/examples/full_test.cpp @@ -49,6 +49,47 @@ void smgl_combined(mglGraph *gr); void save(mglGraph *gr,const char *name,const char *suf); void test(mglGraph *gr) { + gr->SubPlot(2,2,0,""); gr->Title("Line, Curve, Rhomb, Ellipse"); + gr->Line(mglPoint(-1,-1),mglPoint(-0.5,1),"qAI"); + gr->Curve(mglPoint(-0.6,-1),mglPoint(1,1),mglPoint(0,1),mglPoint(1,1),"rA"); + gr->Rhomb(mglPoint(0,0.4),mglPoint(1,0.9),0.2,"b#"); + gr->Rhomb(mglPoint(0,0),mglPoint(1,0.4),0.2,"cg@"); + gr->Ellipse(mglPoint(0,-0.5),mglPoint(1,-0.1),0.2,"u#"); + gr->Ellipse(mglPoint(0,-1),mglPoint(1,-0.6),0.2,"m@"); + gr->Mark(mglPoint(0,-0.5),"*"); gr->Mark(mglPoint(1,-0.1),"*"); + + gr->Light(true); + gr->SubPlot(2,2,1); gr->Title("Face[xyz]"); gr->Rotate(50,60); gr->Box(); + gr->FaceX(mglPoint(1,0,-1),1,1,"r"); + gr->FaceY(mglPoint(-1,-1,-1),1,1,"g"); + gr->FaceZ(mglPoint(1,-1,-1),-1,1,"b"); + gr->Face(mglPoint(-1,-1,1),mglPoint(-1,1,1),mglPoint(1,-1,0),mglPoint(1,1,1),"m"); + + gr->SubPlot(2,2,3,""); gr->Title("Cone"); + gr->Cone(mglPoint(-0.7,-0.3),mglPoint(-0.7,0.7,0.5),0.2,0.1,"b"); + gr->Puts(mglPoint(-0.7,-0.7),"no edges\n(default)"); + gr->Cone(mglPoint(0,-0.3),mglPoint(0,0.7,0.5),0.2,0.1,"g@"); + gr->Puts(mglPoint(0,-0.7),"with edges\n('\\@' style)"); + gr->Cone(mglPoint(0.7,-0.3),mglPoint(0.7,0.7,0.5),0.2,0,"ry"); + gr->Puts(mglPoint(0.7,-0.7),"'arrow' with\ngradient"); + + gr->SubPlot(2,2,2,""); gr->Title("Sphere and Drop"); + gr->Alpha(false); + gr->Puts(mglPoint(-0.9,-0.7),"sh=0"); + gr->Drop(mglPoint(-0.9,0),mglPoint(0,1),0.5,"r",0); + gr->Puts(mglPoint(-0.3,-0.7),"sh=0.33"); + gr->Drop(mglPoint(-0.3,0),mglPoint(0,1),0.5,"r",0.33); + gr->Puts(mglPoint(0.3,-0.7),"sh=0.67"); + gr->Drop(mglPoint(0.3,0),mglPoint(0,1),0.5,"r",0.67); + gr->Puts(mglPoint(0.9,-0.7),"sh=1"); + gr->Drop(mglPoint(0.9,0),mglPoint(0,1),0.5,"r",1); + gr->Ball(mglPoint(-0.9,0,1),'k'); + gr->Ball(mglPoint(-0.3,0,1),'k'); + gr->Ball(mglPoint(0.3,0,1),'k'); + gr->Ball(mglPoint(0.9,0,1),'k'); + gr->Line(mglPoint(-0.9,0,1),mglPoint(0.9,0,1),"b"); + return; + mglParse par; par.AllowSetSize(true); setlocale(LC_CTYPE, ""); @@ -1962,7 +2003,7 @@ int main(int argc,char **argv) gr = new mglGraph; // if(type==5 || type==9 || type==10) { u3d.unrotate_flag = true; gr = &u3d; } - if(mini) { gr->SetSize(200,150); suf = "_sm"; } + if(mini) { gr->SetSize(190,145); suf = "_sm"; } else if(big) { gr->SetSize(1920,1440); suf = "_lg"; } else gr->SetSize(width,height); diff --git a/src/prim.cpp b/src/prim.cpp index c6823e8..61badd0 100644 --- a/src/prim.cpp +++ b/src/prim.cpp @@ -353,8 +353,9 @@ void mgl_ellipse(HMGL gr, float x1, float y1, float z1, float x2, float y2, floa gr->Reserve(2*n+1); mglPoint p1(x1,y1,z1), p2(x2,y2,z2), v=p2-p1; d = v.norm(); - if(d==0) v = mglPoint(r); else v *= r/d; - mglPoint u=(mglPoint(0,0,1)^v)*sqrt(d*d/r/r+1), q=u^v, p, s=(p1+p2)/2.; + if(d==0) v = mglPoint(1); else v /= d; + mglPoint u=mglPoint(0,0,1)^v, q=u^v, p, s=(p1+p2)/2.; + u *= r; v *= sqrt(d*d/4+r*r); // central point first n0 = gr->AddPnt(p1,c,q,-1,11); for(long i=0;i + +MathGL 2.0 + + + + + + + + + \ No newline at end of file diff --git a/texinfo/surf_cont_fog_g.png b/texinfo/surf_cont_fog_g.png new file mode 100644 index 0000000..8b4e906 Binary files /dev/null and b/texinfo/surf_cont_fog_g.png differ diff --git a/texinfo/title.html b/texinfo/title.html new file mode 100644 index 0000000..fcf2817 --- /dev/null +++ b/texinfo/title.html @@ -0,0 +1,14 @@ + + + + + MathGL 2.0 + + + + + + + \ No newline at end of file diff --git a/texinfo/toc_en.html b/texinfo/toc_en.html new file mode 100644 index 0000000..72ce447 --- /dev/null +++ b/texinfo/toc_en.html @@ -0,0 +1,32 @@ + + + + + MathGL 2.0 + + +Main page

+News

+Features

+Pictures

+MGL scripts

+Download

+Documentation

+Other projects

+ +
+ +

+

MathGL – library for scientific data visualization

+
+ + + +
+ Google Groups +
+ MathGL +
+ Visit this group +

+ + \ No newline at end of file diff --git a/texinfo/toc_fr.html b/texinfo/toc_fr.html new file mode 100644 index 0000000..841d33c --- /dev/null +++ b/texinfo/toc_fr.html @@ -0,0 +1,32 @@ + + + + + MathGL 2.0 + + +Home

+News

+Features

+Pictures

+MGL scripts

+Download

+Documentation

+Other projects

+ +
+ +

+ + + +
+ Google Groups +
+ MathGL +
+ Visit this group +

+ + \ No newline at end of file diff --git a/texinfo/toc_ru.html b/texinfo/toc_ru.html new file mode 100644 index 0000000..841d33c --- /dev/null +++ b/texinfo/toc_ru.html @@ -0,0 +1,32 @@ + + + + + MathGL 2.0 + + +Home

+News

+Features

+Pictures

+MGL scripts

+Download

+Documentation

+Other projects

+ +
+ +

+ + + +
+ Google Groups +
+ MathGL +
+ Visit this group +

+ + \ No newline at end of file diff --git a/texinfo/version_hist.txt b/texinfo/version_hist.txt new file mode 100644 index 0000000..92771aa --- /dev/null +++ b/texinfo/version_hist.txt @@ -0,0 +1,31 @@ +2.0.b Released 23 August 2011 + +1.11.2 Released 30 May 2011 +1.11.1 Released 28 March 2011 +1.11 Released 8 November 2010 +1.10.2.1 Released 27 March 2010 +1.10.2 Released 22 March 2010 +1.10.1 Released 8 March 2010 +1.10 Released 28 December 2009 +1.9 Released 8 July 2009 +1.8.1 Released 4 March 2009 +1.8 Released 27 November 2008 +1.7 Released 5 June 2008 +1.6.2 Released 5 April 2008 +1.6.1 Released 2 April 2008 +1.6 Released 17 March 2008 +1.5 Released 11 January 2008 +1.4.3.1 Released 24 December 2008 +1.4.3 Released 18 December 2008 +1.4.2 Released 27 November 2007 +1.4.1 Released 14 November 2007 +1.4 Released 30 October 2007 +1.3 Released 15 October 2007 +1.2.2 Released 26 September 2007 +1.2.1 Released 14 September 2007 +1.2 Released 10 September 2007 +1.1 Released 23 May 2007 +1.0 Released 2 April 2007 +0.9 Last beta version of the MathGL library. Released 2 March 2007 +0.8.1 Released 19 Febriary 2007 +0.8.0 First public release (24 January 2007) diff --git a/texinfo/web_en.texi b/texinfo/web_en.texi new file mode 100644 index 0000000..ab21e0e --- /dev/null +++ b/texinfo/web_en.texi @@ -0,0 +1,535 @@ +\input texinfo +@setfilename mgl_web_en.info +@set VERSION 2.0 +@settitle MathGL @value{VERSION} +@syncodeindex pg cp +@comment %**end of header + +@copying +This website demonstrates the Mathematical Graphic Library (MathGL) version @value{VERSION}, a collection of classes and routines for scientific plotting. Please report any errors in this manual to @email{mathgl.abalakin@@gmail.org}. + +Copyright @copyright{} 2008 Alexey Balakin. + +@quotation +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.2 or +any later version published by the Free Software Foundation; with no +Invariant Sections, with the Front-Cover Texts being ``A GNU Manual,'' +and with the Back-Cover Texts as in (a) below. A copy of the +license is included in the section entitled ``GNU Free Documentation +License.'' + +(a) The FSF's Back-Cover Text is: ``You have the freedom to +copy and modify this GNU manual. Buying copies from the FSF +supports it in developing GNU and promoting software freedom.'' +@end quotation +@end copying + +@titlepage +@title MathGL website +@subtitle for version @value{VERSION} +@author A.A. Balakin (@uref{http://mathgl.sourceforge.net/}) +@page +@vskip 0pt plus 1filll +@insertcopying +@end titlepage + +@contents + +@ifnottex +@node Top +@top MathGL + +This website demonstrates the Mathematical Graphic Library (MathGL), a collection of classes and routines for scientific plotting. It corresponds to release @value{VERSION} of the library. Please report any errors in this manual to @email{mathgl.abalakin@@gmail.org}. More information about MathGL can be found at the project homepage, @uref{http://mathgl.sourceforge.net/}. + +Copyright @copyright{} 2008 Alexey A. Balakin. + +@quotation +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.2 or +any later version published by the Free Software Foundation; with no +Invariant Sections, with the Front-Cover Texts being ``A GNU Manual,'' +and with the Back-Cover Texts as in (a) below. A copy of the +license is included in the section entitled ``GNU Free Documentation +License.'' + +(a) The FSF's Back-Cover Text is: ``You have the freedom to +copy and modify this GNU manual. Buying copies from the FSF +supports it in developing GNU and promoting software freedom.'' +@end quotation + +@end ifnottex + +@menu +* Main:: +* News:: +* Features:: +* Pictures:: +* MGL scripts:: +* Download:: +* Documentation:: +* Other projects:: +@end menu + +@ifhtml +@macro external {} +@html + + +SourceForge.net Logo + + thefreecountry.com: Free Programmers' Resources, Free Webmasters' Resources, Free Security Resources, Free Software + +Support This Project +@end html +@end macro +@macro fig {plot,text} +@uref{../\text\, @image{../small/\plot\_sm,3cm, , , .png}} +@end macro +@end ifhtml + +@ifnothtml +@macro external {} +@end macro +@macro fig {plot,text} +@uref{http://mathgl.sourceforge.net/\text\, @image{small/\plot\_sm,3cm, , , .png}} +@end macro +@end ifnothtml + +@node Main, News, , Top +@section MathGL is ... + +@ifhtml +@html +Surface in fog +@end html +@end ifhtml +@itemize @bullet +@item +a library for making high-quality scientific graphics under Linux and Windows; +@item +a library for the fast data plotting and data processing of large data arrays; +@item +a library for working in window and console modes and for easy embedding into other programs; +@item +a library with large and growing set of graphics. +@end itemize + +At this version (1.11) MathGL has more than 35000 lines of code, more than 55 general types of graphics for 1d, 2d and 3d data arrays, including special ones for chemical and statistical graphics. It can export graphics to raster and vector (EPS or SVG) formats. It has Qt, FLTK, OpenGL interfaces and can be used even from console programs. It has functions for data processing and script MGL language for simplification of data plotting. Also it has several types of transparency and smoothed lightning, vector fonts and TeX-like symbol parsing, arbitrary curvilinear coordinate system and many over useful things. It can be used from code written on C++/C/Fortran/Python/Octave and many other languages. Finally it is platform independent and free (under GPL v.2.0 license). + +There is a @uref{http://sourceforge.net/forum/?group_id=152187, forum} where you can ask a question or suggest an improvement. However the @uref{http://groups.google.com/group/mathgl, MathGL group} is preferable for quicker answer. + +For subscribing to @uref{http://groups.google.com/group/mathgl, MathGL group} you can use form below +@ifhtml +@html +
+Email: +
+@end html +@end ifhtml + +@strong{About LGPL and GPL licenses.} +Generally MathGL is GPL library. However, you can use LGPL license for MathGL core if you don't use wrapper widget classes, SWIG-based interfaces and disable GSL features. This can be done by using @code{lgpl} option at build time. According this, I've added the LGPL win32 binaries into @ref{Download} page. + +@strong{Latest news} +@itemize +@item @emph{29 March 2012.} +New version (v.2.0) of @uref{http://sourceforge.net/projects/mathgl, MathGL} is released. There are a lot of new features, which partially denoted @ref{News, here}. +@end itemize + +There is detailed @ref{News, news list}. Sourceforge project page @uref{http://sourceforge.net/projects/mathgl/, here}. + +@external + +@node News, Features, Main, Top +@section News + +@itemize +@item +@strong{29 March 2012.} +New version (v.2.0) of @uref{http://sourceforge.net/projects/mathgl, MathGL} is released. There are a lot of new features, which partially denoted below. +@itemize @bullet +@item +mglGraph class is single plotter class instead of mglGraphZB, mglGraphPS and so on. +@item +Text style and text color positions are swapped. I.e. text style @samp{r:C} give red centered text, but not roman dark cyan text as for v.1.*. +@item +ColumnPlot() indexing is reverted. +@item +Move most of arguments of plotting functions into the string parameter and/or options. +@item +``Bright'' colors (like @{b8@}) can be used in color schemes and line styles. +@item +Intensively use pthread internally for parallelization of drawing and data processing. +@item +Add tick labels rotation and skipping. Add ticks in time/date format. +@item +New kinds of plots (Tape(), Label(), Cones(), ContV()). Extend existing plots. New primitives (Circle(), Ellipse(), Rhomb(), ...). New plot positioning (MultiPlot(), GridPlot()) +@item +Improve MGL scripts. Add 'ask' command and allow string concatenation from different lines. +@item +Export to LaTeX and to 3D formats (OBJ, OFF, STL, X3D). +@item +Add pipes support in utilities (@code{mglconv, mglview}). +@end itemize + +@item +@strong{23 August 2011.} Version 2.0.beta was released. +@item +@strong{30 May 2011.} Version 1.11.2 was released. +@item +@strong{8 November 2010.} Version 1.11 was released. +@item +@strong{28 December 2009.} Version 1.10 was released. +@item +@strong{8 July 2009.} Version 1.9 was released. +@item +@strong{27 November 2008.} Version 1.8 was released. +@item +@strong{5 June 2008.} Version 1.7 was released. +@item +@strong{17 March 2008.} Version 1.6 was released. +@item +@strong{11 January 2008.} Version 1.5 was released. +@item +@strong{30 October 2007.} Version 1.4 was released. +@item +@strong{15 October 2007.} Version 1.3 was released. +@item +@strong{10 September 2007.} Version 1.2 was released. +@item +@strong{23 May 2007.} Version 1.1 was released. +@item +@strong{2 April 2007.} Version 1.0 was released. +@item +@strong{24 January 2007.} First public release (v.0.8). +@end itemize + +@external + + +@node Features, Pictures, News, Top +@section Features + +MathGL can plot a wide range of graphics. It includes: +@itemize @bullet +@item +one-dimensional: Plot, Area, Bars, Step, Stem, Torus, Chart, Error, Tube, Mark, (@ref{1D plotting}); + +@item +two-dimensional plots: Mesh, Surf, Dens, Cont, ContF, Boxs, Axial, Fall, Belt, Tile, including surfaces transparent (SurfA) or colored (SurfC) by another data (@ref{2D plotting}); + +@item +three-dimensional plots: Surf3, Dens3, Cont3, ContF3, Cloud-like, including isosurfaces transparent (Surf3A) or colored (Surf3C) by another data (@ref{3D plotting}); + +@item +vector fields plots: vector fields Vect and Traj, flow threads Flow, flow pipes Pipe, mapping chart Map, and so on (@ref{Vector fields}); + +@item +and so on. See also @ref{Extra samples}. +@end itemize + +In fact, I created the functions for drawing of all the types of scientific plots that I know. The list of plots is growing; if you need some special type of a plot then please email me @email{mathgl.abalakin@@gmail.com, e-mail} and it will appear in the new version. + +I tried to make plots as nice looking as possible: e.g., a surface can be transparent and highlighted by several (up to 10) light sources. Most of the drawing functions have 2 variants: simple one for the fast plotting of data, complex one for specifying of the exact position of the plot (including parametric representation). Resulting image can be saved in bitmap PNG, JPEG, TGA, BMP format, or in vector EPS, SVG or TeX format, or in 3D formats OBJ, OFF, STL or X3D, or in IDTF format which can be converted into U3D. + +All texts are drawn by vector fonts, which allows for high scalability and portability. Texts may contain commands for: some of the TeX-like symbols, changing index (upper or lower indexes) and the style of font inside the text string. Texts of ticks are rotated with axis rotation. It is possible to create a legend of plot and put text in an arbitrary position on the plot. Arbitrary text encoding (by the help of function @code{setlocale()}) and UTF-16 encoding are supported. + +Special class mglData is used for data encapsulation. In addition to a safe creation and deletion of data arrays it includes functions for data processing (smoothing, differentiating, integrating, interpolating and so on) and reading of data files with automatic size determination. Class mglData can handle arrays with up to three dimensions (arrays which depend on up to 3 independent indexes @math{a_@{ijk@}}). Using an array with higher number of dimensions is not meaningful, because I do not know how it can be plotted. Data filling and modification may be done manually or by textual formulas. + +There is fast evaluation of a textual mathematical expression. It is based on string precompilation to tree-like code at the creation of class instance. At evaluation stage code performs only fast tree-walk and returns the value of the expression. In addition to changing data values, textual formulas are also used for drawing in @emph{arbitrary} curvilinear coordinates. A set of such curvilinear coordinates is limited only by user's imagination rather than a fixed list like: polar, parabolic, spherical, and so on. + +@external + +@node Pictures, MGL scripts, Features, Top +@section Pictures + +There are samples for @ref{1D plotting, 1D arrays}, @ref{2D plotting, 2D arrays}, @ref{3D plotting, 3D arrays}, @ref{Vector fields} and some @ref{Extra samples}. + +@anchor{1D plotting} +@subsection Examples of graphics for 1d arrays + +@fig{plot, mathgl_en/mathgl_en_13.html#Plot-sample} +@fig{radar, mathgl_en/mathgl_en_13.html#Radar-sample} +@fig{step, mathgl_en/mathgl_en_13.html#Step-sample} +@fig{tens, mathgl_en/mathgl_en_13.html#Tens-sample} + +@fig{area, mathgl_en/mathgl_en_13.html#Area-sample} +@fig{region, mathgl_en/mathgl_en_13.html#Region-sample} +@fig{stem, mathgl_en/mathgl_en_13.html#Stem-sample} +@fig{torus, mathgl_en/mathgl_en_13.html#Torus-sample} + +@fig{bars, mathgl_en/mathgl_en_13.html#Bars-sample} +@fig{barh, mathgl_en/mathgl_en_13.html#Barh-sample} +@fig{cones, mathgl_en/mathgl_en_13.html#Cones-sample} +@fig{chart, mathgl_en/mathgl_en_13.html#Chart-sample} + +@fig{boxplot, mathgl_en/mathgl_en_13.html#BoxPlot-sample} +@fig{candle, mathgl_en/mathgl_en_13.html#Candle-sample} +@fig{tube, mathgl_en/mathgl_en_13.html#Tube-sample} +@fig{tape, mathgl_en/mathgl_en_13.html#Tape-sample} + +@fig{error, mathgl_en/mathgl_en_13.html#Error-sample} +@fig{mark, mathgl_en/mathgl_en_13.html#Mark-sample} +@fig{textmark, mathgl_en/mathgl_en_13.html#TextMark-sample} +@fig{label, mathgl_en/mathgl_en_13.html#Label-sample} + +@anchor{2D plotting} +@subsection Examples of graphics for 2d arrays + +@fig{surf, mathgl_en/mathgl_en_14.html#Surf-sample} +@fig{surfc, mathgl_en/mathgl_en_14.html#SurfC-sample} +@fig{surfa, mathgl_en/mathgl_en_14.html#SurfA-sample} +@fig{mesh, mathgl_en/mathgl_en_14.html#Mesh-sample} + +@fig{fall, mathgl_en/mathgl_en_14.html#Fall-sample} +@fig{belt, mathgl_en/mathgl_en_14.html#Belt-sample} +@fig{boxs, mathgl_en/mathgl_en_14.html#Boxs-sample} +@fig{axial, mathgl_en/mathgl_en_14.html#Axial-sample} + +@fig{dens, mathgl_en/mathgl_en_14.html#Dens-sample} +@fig{tile, mathgl_en/mathgl_en_14.html#Tile-sample} +@fig{tiles, mathgl_en/mathgl_en_14.html#TileS-sample} +@fig{grad, mathgl_en/mathgl_en_14.html#Grad-sample} + +@fig{cont, mathgl_en/mathgl_en_14.html#Cont-sample} +@fig{contf, mathgl_en/mathgl_en_14.html#ContF-sample} +@fig{contd, mathgl_en/mathgl_en_14.html#ContD-sample} +@fig{contv, mathgl_en/mathgl_en_14.html#ContV-sample} + +@anchor{3D plotting} +@subsection Examples of graphics for 3d arrays + +@fig{surf3, mathgl_en/mathgl_en_15.html#Surf3-sample} +@fig{surf3c, mathgl_en/mathgl_en_15.html#Surf3C-sample} +@fig{surf3a, mathgl_en/mathgl_en_15.html#Surf3A-sample} +@fig{cloud, mathgl_en/mathgl_en_15.html#Cloud-sample} + +@fig{densa, mathgl_en/mathgl_en_15.html#Dens3-sample} +@fig{conta, mathgl_en/mathgl_en_15.html#Cont3-sample} +@fig{contfa, mathgl_en/mathgl_en_15.html#ContF3-sample} +@fig{dots, mathgl_en/mathgl_en_15.html#Dots-sample} + +@fig{dens_xyz, mathgl_en/mathgl_en_15.html#Dens-projection-sample} +@fig{cont_xyz, mathgl_en/mathgl_en_15.html#Cont-projection-sample} +@fig{contf_xyz, mathgl_en/mathgl_en_15.html#ContF-projection-sample} +@fig{triplot, mathgl_en/mathgl_en_15.html#TriPlot-and-QuadPlot} + +@anchor{Vector fields} +@subsection Examples of graphics for vector fields + +@fig{vect, mathgl_en/mathgl_en_16.html#Vect-sample} +@fig{traj, mathgl_en/mathgl_en_16.html#Tra-sjample} +@fig{flow, mathgl_en/mathgl_en_16.html#Flow-sample} +@fig{pipe, mathgl_en/mathgl_en_16.html#Pipe-sample} + +@anchor{Extra samples} +@subsection Examples of additional features + +@fig{inplot, mathgl_en/mathgl_en_10.html#Subplots} +@fig{axis, mathgl_en/mathgl_en_10.html#Axis-and-ticks} +@fig{ticks, mathgl_en/mathgl_en_10.html#Axis-and-ticks} +@fig{loglog, mathgl_en/mathgl_en_10.html#Axis-and-ticks} + +@fig{curvcoor, mathgl_en/mathgl_en_10.html#Curvilinear-coordinates} +@fig{colorbar, mathgl_en/mathgl_en_10.html#Colorbars} +@fig{box, mathgl_en/mathgl_en_10.html#Bounding-box} +@fig{ternary, mathgl_en/mathgl_en_10.html#Ternary-axis} + +@fig{text, mathgl_en/mathgl_en_10.html#Text-features} +@fig{legend, mathgl_en/mathgl_en_10.html#Legend-sample} +@fig{cut, mathgl_en/mathgl_en_10.html#Cutting-sample} +@fig{alpha, mathgl_en/mathgl_en_17.html#Transparency-and-lighting} + +@fig{type0, mathgl_en/mathgl_en_17.html#Types-of-transparency} +@fig{type1, mathgl_en/mathgl_en_17.html#Types-of-transparency} +@fig{type2, mathgl_en/mathgl_en_17.html#Types-of-transparency} +@fig{fog, mathgl_en/mathgl_en_17.html#Adding-fog} + +@fig{combined, mathgl_en/mathgl_en_17.html#g_t_0060_0060Compound_0027_0027-graphics} +@fig{several_light, mathgl_en/mathgl_en_17.html#Several-light-sources} +@fig{stereo, mathgl_en/mathgl_en_17.html#Stereo-image} +@fig{primitives, mathgl_en/mathgl_en_17.html#Using-primitives} + +@fig{stfa, mathgl_en/mathgl_en_17.html#STFA-sample} +@fig{dat_diff, mathgl_en/mathgl_en_11.html#Change-data} +@fig{dat_extra, mathgl_en/mathgl_en_11.html#Change-data} +@fig{map, mathgl_en/mathgl_en_17.html#Mapping-visualization} + +@fig{hist, mathgl_en/mathgl_en_17.html#Making-histogram} +@fig{fit, mathgl_en/mathgl_en_17.html#Nonlinear-fitting-sample} +@fig{pde, mathgl_en/mathgl_en_17.html#PDE-solving-hints} +@fig{parser, mathgl_en/mathgl_en_17.html#MGL-parser-using} + +@external + +@node MGL scripts, Download, Pictures, Top +@section MGL scripts + +MGL script language is rather simple. Each string is a command. First word of string is the name of command. Other words are command arguments. Command may have up to 1000 arguments (at least for now). Words are separated from each other by space or tabulation symbol. The upper or lower case of words is important, i.e. variables @var{a} and @var{A} are different variables. Symbol @samp{#} starts the comment (all characters after # will be ignored). The exception is situation when @samp{#} is a part of some string. Also options can be specified after symbol @samp{;}. Symbol @samp{:} starts new command (like new line character) if it is not placed inside a string or inside brackets. + +If string contain references to external parameters (substrings @samp{$0}, @samp{$1} ... @samp{$9}) or definitions (substrings @samp{$a}, @samp{$b} ... @samp{$z}) then before execution the values of parameter/definition will be substituted instead of reference. It allows to use the same MGL script for different parameters (file names, paths, condition and so on). + +Argument can be a string, a variable (data arrays) or a number (scalars). +@itemize @bullet +@item +The string is any symbols between ordinary marks @samp{'}. Long strings can be concatenated from several lines by @samp{\} symbol. I.e. the string @samp{'a +'\
' b'} will give string @samp{'a + b'} (here @samp{
} is newline). + +@item +Usually variable have a name which is arbitrary combination of symbols (except spaces and @samp{'}) started from a letter and with length less than 64. A temporary array can be used as variable: +@itemize @bullet +@item +sub-arrays (like in @code{subdata} command) as command argument. For example, @code{a(1)} or @code{a(1,:)} or @code{a(1,:,:)} is second row, @code{a(:,2)} or @code{a(:,2,:)} is third column, @code{a(:,:,0)} is first slice and so on. Also you can extract a part of array from m-th to n-th element by code @code{a(m:n,:,:)} or just @code{a(m:n)}. + +@item +any column combinations defined by formulas, like @code{a('n*w^2/exp(t)')} if names for data columns was specified (by @code{idset} command or in the file at string started with @code{##}). + +@item +any expression (without spaces) of existed variables produce temporary variable. For example, @samp{sqrt(dat(:,5)+1)} will produce temporary variable with data values equal to @code{tmp[i,j] = sqrt(dat[i,5,j]+1)}. + +@item +temporary variable of higher dimensions by help of []. For example, @samp{[1,2,3]} will produce a temporary vector of 3 elements @{1, 2, 3@}; @samp{[[11,12],[21,22]]} will produce matrix 2*2 and so on. Here you can join even an arrays of the same dimensions by construction like @samp{[v1,v2,...,vn]}. + +@item +result of code for making new data inside @{@}. For example, @samp{@{sum dat 'x'@}} produce temporary variable which contain result of summation of @var{dat} along direction 'x'. This is the same array @var{tmp} as produced by command @samp{sum tmp dat 'x'}. You can use nested constructions, like @samp{@{sum @{max dat 'z'@} 'x'@}}. +@end itemize +Temporary variables can not be used as 1st argument for commands which create (return) the data (like @samp{new}, @samp{read}, @samp{hist} and so on). + +@item +Special names @code{nan=#QNAN, pi=3.1415926..., on=1, off=0, :=-1} are treated as number if they were not redefined by user. Variables with suffixes are treated as numbers. Names defined by @code{define} command are treated as number. Also results of formulas with sizes 1x1x1 are treated as number (for example, @samp{pi/dat.nx}). +@end itemize +Before the first using all variables must be defined with the help of commands, like, @code{new}, @code{var}, @code{list}, @code{copy}, @code{read}, @code{hist}, @code{sum} and so on. + +Command may have several set of possible arguments (for example, @code{plot ydat} and @code{plot xdat ydat}). All command arguments for a selected set must be specified. However, some arguments can have default values. These argument are printed in [], like @code{text ydat ['stl'='']} or @code{text x y 'txt' ['fnt'='' size=-1]}. At this, the record @code{[arg1 arg2 arg3 ...]} means @code{[arg1 [arg2 [arg3 ...]]]}, i.e. you can omit only tailing arguments if you agree with its default values. For example, @code{text x y 'txt' '' 1} or @code{text x y 'txt' ''} is correct, but @code{text x y 'txt' 1} is incorrect (argument @code{'fnt'} is missed). + +For more details see @uref{../mathgl_en/mathgl_en_64.html#MGL-scripts, MathGL documentation} + +@external + +@node Download, Documentation, MGL scripts, Top +@section Download + +@strong{Stable version (v.2.0)} + +You may download current version of MathGL for following configurations: +@itemize @bullet +@item +@uref{http://downloads.sourceforge.net/mathgl/mathgl-2.0.tar.gz,source} file with autoconf/automake script. +@item +@uref{http://downloads.sourceforge.net/mathgl/mathgl-2.0-mingw.i686.zip,Win32 GPL} binaries for MinGW (build for i686) +@item +@uref{http://downloads.sourceforge.net/mathgl/mathgl-2.0.LGPL-mingw.i686.zip,Win32 LGPL} binaries for MinGW (build for i686, no GSL and HDF5 support) +@item +@uref{http://downloads.sourceforge.net/mathgl/mathgl-2.0-1.DevPack,DevPak} package for Dev-C++ or Code::Blocks (GPL version) +@item +@uref{http://downloads.sourceforge.net/mathgl/mathgl-2.0.eng.pdf,PDF} documentation in English +@c HTML documentation in English +@c HTML documentation in Russian +@c @item +@c @uref{http://downloads.sourceforge.net/mathgl/mathgl_slides-1.9.pdf,PDF} slideshow of main features +@end itemize + +@strong{Previous version (v.1.11.2)} + +You may download current version of MathGL for following configurations: +@itemize @bullet +@item +@uref{http://downloads.sourceforge.net/mathgl/mathgl-1.11.2.tar.gz,source} file with autoconf/automake script. +@item +@uref{http://downloads.sourceforge.net/mathgl/mathgl-1.11.2-mingw.i686.zip,Win32 GPL} binaries for MinGW (build for i686) +@item +@uref{http://downloads.sourceforge.net/mathgl/mathgl-1.11.1.1.LGPL-mingw.i686.zip,Win32 LGPL} binaries for MinGW (build for i686, no GSL and HDF5 support) +@item +@uref{http://downloads.sourceforge.net/mathgl/mathgl-1.11.2-1.DevPack,DevPak} package for Dev-C++ or Code::Blocks (GPL version) +@item +@uref{http://downloads.sourceforge.net/mathgl/mathgl-1.11.2.eng.pdf,PDF} documentation in English +@c HTML documentation in English +@c HTML documentation in Russian +@item +@uref{http://downloads.sourceforge.net/mathgl/mathgl_slides-1.9.pdf,PDF} slideshow of main features +@end itemize + +@strong{Font files} + +There are a set of @uref{http://sourceforge.net/project/showfiles.php?group_id=152187&package_id=267177,font files} for MathGL with following typefaces. Note, that the set of glyphs can be less than in default font. As result not all TeX symbols can be displayed. +@itemize @bullet +@item +@uref{http://downloads.sourceforge.net/mathgl/STIX_font.tgz,STIX} font -- default font for MathGL. +@item +@uref{http://downloads.sourceforge.net/mathgl/adventor_font.tgz,Adventor font} -- the @uref{http://www.gust.org.pl/projects/e-foundry/tex-gyre/index_html,TeX Gyre} sansserif font based on the URW Gothic L family (like Avant Garde Gothic). +@item +@uref{http://downloads.sourceforge.net/mathgl/bonum_font.tgz,Bonum font} -- the @uref{http://www.gust.org.pl/projects/e-foundry/tex-gyre/index_html,TeX Gyre} serif font based on the URW Bookman L family. +@item +@uref{http://downloads.sourceforge.net/mathgl/chorus_font.tgz,Chorus font} -- the @uref{http://www.gust.org.pl/projects/e-foundry/tex-gyre/index_html,TeX Gyre} font based on the URW Chancery L Medium Italic. +@item +@uref{http://downloads.sourceforge.net/mathgl/cursor_font.tgz,Cursor font} -- the @uref{http://www.gust.org.pl/projects/e-foundry/tex-gyre/index_html,TeX Gyre} monospaced serif font based on the URW Nimbus Mono L (like Courier). +@item +@uref{http://downloads.sourceforge.net/mathgl/heros_font.tgz,Heros font} -- the @uref{http://www.gust.org.pl/projects/e-foundry/tex-gyre/index_html,TeX Gyre} sansserif font based on the URW Nimbus Sans L (like Helvetica). +@item +@uref{http://downloads.sourceforge.net/mathgl/heroscn_font.tgz,HerosCN font} -- the "compressed" version of previous one. +@item +@uref{http://downloads.sourceforge.net/mathgl/pagella_font.tgz,Pagella font} -- the @uref{http://www.gust.org.pl/projects/e-foundry/tex-gyre/index_html,TeX Gyre} serif font based on the URW Palladio L (like Palatino). +@item +@uref{http://downloads.sourceforge.net/mathgl/schola_font.tgz,Schola font} -- the @uref{http://www.gust.org.pl/projects/e-foundry/tex-gyre/index_html,TeX Gyre} serif fonts is based on the URW Century Schoolbook L. +@item +@uref{http://downloads.sourceforge.net/mathgl/termes_font.tgz,Termes font} -- the @uref{http://www.gust.org.pl/projects/e-foundry/tex-gyre/index_html,TeX Gyre} serif fonts is based on the Nimbus Roman No9 L (like Times). +@end itemize + +@external + +@node Documentation, Other projects, Download, Top +@section Documentation + +Here you can view and download latest version of documentation. This documentation is just compiled version of @uref{https://sourceforge.net/svn/?group_id=152187,SVN} documentation. + +There are @uref{../mathgl_en/mathgl_en.html,English} and @uref{../mathgl_ru/mathgl_ru.html,Russian} versions. It also include @uref{../mathgl_en/mathgl_en_18.html#FAQ,FAQ} about MathGL. + +Another variant is download single @uref{mathgl_en.pdf,PDF} (about 7 Mb). + +@external + +@node Other projects, , Documentation, Top +@section Other projects + +Except scientific (non public) projects I also have some general interest projects: +@itemize @bullet +@item +@uref{http://sourceforge.net/projects/pocketmk/, PocketMK} is small program for PocketPC which simulate famous Russian calculators MK-61 and slightly extend it. +@item +@uref{http://udav.sourceforge.net/,UDAV} is front-end for MGL scripts. It has windows interface for data viewing, changing and plotting. Also it can execute MGL scripts, setup and rotating graphics and so on. +@end itemize + +Also I recommend to look at: +@itemize @bullet +@item +@uref{http://englab.bugfest.net/,EngLab} is a cross-compile mathematical platform with a C like syntax intended to be used both by engineers and users with small programming knowledge. It is extremely scalable and allows users and the community to easily compile their own functions as shared objects. +@item +@uref{http://threedepict.sourceforge.net/,3Depict} is software for analysis of scientific datasets commonly encountered in atom probe tomography. You can manipulate, interact with and analyse point based datasets. +@item +@uref{http://www.sourceforge.net/projects/graphplot/,Graphplot} is function plotter based on MathGL. +@item +@uref{http://www.sourceforge.net/projects/graphplot/,OscillViewer} is oscilloscope monitoring program. Working with L-Card 14-140 AD-Convertor. Based on Qt and MathGL libraries. +@end itemize + +Finally, few links to free software and libraries: +@itemize @bullet +@item +@uref{http://www.thefreecountry.com/,thefreecountry.com} have a lot of Free Programmers', Webmasters' and Security Resources +@item +@uref{http://gnuwin32.sourceforge.net/,GnuWin} provides ports of tools with a GNU or similar open source license, to modern MS-Windows. +@item +@uref{http://loll.sourceforge.net/,LLoL} is project collecting, organising, classifying, and maintaining important URLs about Linux and the Open Source movement for all levels of Linux users. The LoLL project now has 4000+ links which are updated usually on a daily basis. +@end itemize + +@external + +@bye diff --git a/texinfo/web_ru.texi b/texinfo/web_ru.texi new file mode 100644 index 0000000..184e172 --- /dev/null +++ b/texinfo/web_ru.texi @@ -0,0 +1,427 @@ +\input texinfo +@setfilename mgl_web_en.info +@set VERSION 2.0 +@settitle MathGL @value{VERSION} +@syncodeindex pg cp +@comment %**end of header + +@copying +This website demonstrates the Mathematical Graphic Library (MathGL) version @value{VERSION}, a collection of classes and routines for scientific plotting. Please report any errors in this manual to @email{mathgl.abalakin@@gmail.org}. + +Copyright @copyright{} 2008 Alexey Balakin. + +@quotation +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.2 or +any later version published by the Free Software Foundation; with no +Invariant Sections, with the Front-Cover Texts being ``A GNU Manual,'' +and with the Back-Cover Texts as in (a) below. A copy of the +license is included in the section entitled ``GNU Free Documentation +License.'' + +(a) The FSF's Back-Cover Text is: ``You have the freedom to +copy and modify this GNU manual. Buying copies from the FSF +supports it in developing GNU and promoting software freedom.'' +@end quotation +@end copying + +@titlepage +@title MathGL website +@subtitle for version @value{VERSION} +@author A.A. Balakin (@uref{http://mathgl.sourceforge.net/}) +@page +@vskip 0pt plus 1filll +@insertcopying +@end titlepage + +@contents + +@ifnottex +@node Top +@top MathGL + +This website demonstrates the Mathematical Graphic Library (MathGL), a collection of classes and routines for scientific plotting. It corresponds to release @value{VERSION} of the library. Please report any errors in this manual to @email{mathgl.abalakin@@gmail.org}. More information about MathGL can be found at the project homepage, @uref{http://mathgl.sourceforge.net/}. + +Copyright @copyright{} 2008 Alexey A. Balakin. + +@quotation +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.2 or +any later version published by the Free Software Foundation; with no +Invariant Sections, with the Front-Cover Texts being ``A GNU Manual,'' +and with the Back-Cover Texts as in (a) below. A copy of the +license is included in the section entitled ``GNU Free Documentation +License.'' + +(a) The FSF's Back-Cover Text is: ``You have the freedom to +copy and modify this GNU manual. Buying copies from the FSF +supports it in developing GNU and promoting software freedom.'' +@end quotation + +@end ifnottex + +@menu +* MathGL is ...:: +* News:: +* Features:: +* Pictures:: +* MGL scripts:: +* Download:: +* Documentation:: +* Other projects:: +@end menu + +@macro fig {fname,text} +@center @image{../\fname\, 11cm, , \text\, .png} +@end macro + +@macro external +@html + + +SourceForge.net Logo + + thefreecountry.com: Free Programmers' Resources, Free Webmasters' Resources, Free Security Resources, Free Software + +Support This Project +@end html +@end macro + + +@node MathGL is ..., News, , Top +@section MathGL is ... + +@html +Surface in fog +@end html +@itemize @bullet +@item +a library for making high-quality scientific graphics under Linux and Windows; +@item +a library for the fast data plotting and data processing of large data arrays; +@item +a library for working in window and console modes and for easy embedding into other programs; +@item +a library with large and growing set of graphics. +@end itemize + +At this version (1.11) MathGL has more than 35000 lines of code, more than 55 general types of graphics for 1d, 2d and 3d data arrays, including special ones for chemical and statistical graphics. It can export graphics to raster and vector (EPS or SVG) formats. It has Qt, FLTK, OpenGL interfaces and can be used even from console programs. It has functions for data processing and script MGL language for simplification of data plotting. Also it has several types of transparency and smoothed lightning, vector fonts and TeX-like symbol parsing, arbitrary curvilinear coordinate system and many over useful things. It can be used from code written on C++/C/Fortran/Python/Octave and many other languages. Finally it is platform independent and free (under GPL v.2.0 license). + +There is a @uref{http://sourceforge.net/forum/?group_id=152187, forum} where you can ask a question or suggest an improvement. However the @uref{http://groups.google.com/group/mathgl, MathGL group} is preferable for quicker answer. + +For subscribing to @uref{http://groups.google.com/group/mathgl, MathGL group} you can use form below +@html +
+Email: +
+@end html + +@strong{About LGPL and GPL licenses.} +Generally MathGL is GPL library. However, you can use LGPL license for MathGL core if you don't use wrapper widget classes, SWIG-based interfaces and disable GSL features. This can be done by using @code{lgpl} option at build time. According this, I've added the LGPL win32 binaries into @ref{Download} page. + +@strong{Latest news} +@itemize +@item @emph{29 March 2012.} +New version (v.2.0) of @uref{http://sourceforge.net/projects/mathgl, MathGL} is released. There are a lot of new features, which partially denoted @uref{TODO, here}. +@end itemize + +There is detailed @ref{News, news list}. Sourceforge project page @uref{http://sourceforge.net/projects/mathgl/, here}. + +@external + +@node News, Features, MathGL is ..., Top +@section News + +@itemize +@item +@strong{29 March 2012.} +New version (v.2.0) of @uref{http://sourceforge.net/projects/mathgl, MathGL} is released. There are a lot of new features, which partially denoted @uref{TODO, here}. +@itemize @bullet +@item +mglGraph class is single plotter class instead of mglGraphZB, mglGraphPS and so on. +@item +Text style and text color positions are swapped. I.e. text style @samp{r:C} give red centered text, but not roman dark cyan text as for v.1.*. +@item +ColumnPlot() indexing is reverted. +@item +Move most of arguments of plotting functions into the string parameter and/or options. +@item +``Bright'' colors (like @{b8@}) can be used in color schemes and line styles. +@item +Intensively use pthread internally for parallelization of drawing and data processing. +@item +Add tick labels rotation and skipping. Add ticks in time/date format. +@item +New kinds of plots (Tape(), Label(), Cones(), ContV()). Extend existing plots. New primitives (Circle(), Ellipse(), Rhomb(), ...). New plot positioning (MultiPlot(), GridPlot()) +@item +Improve MGL scripts. Add 'ask' command and allow string concatenation from different lines. +@item +Export to LaTeX and to 3D formats (OBJ, OFF, STL, X3D). +@item +Add pipes support in utilities (@code{mglconv, mglview}). +@end itemize + +@item +@strong{23 August 2011.} Version 2.0.beta was released. +@item +@strong{30 May 2011.} Version 1.11.2 was released. +@item +@strong{8 November 2010.} Version 1.11 was released. +@item +@strong{28 December 2009.} Version 1.10 was released. +@item +@strong{8 July 2009.} Version 1.9 was released. +@item +@strong{27 November 2008.} Version 1.8 was released. +@item +@strong{5 June 2008.} Version 1.7 was released. +@item +@strong{17 March 2008.} Version 1.6 was released. +@item +@strong{11 January 2008.} Version 1.5 was released. +@item +@strong{30 October 2007.} Version 1.4 was released. +@item +@strong{15 October 2007.} Version 1.3 was released. +@item +@strong{10 September 2007.} Version 1.2 was released. +@item +@strong{23 May 2007.} Version 1.1 was released. +@item +@strong{2 April 2007.} Version 1.0 was released. +@item +@strong{24 January 2007.} First public release (v.0.8). +@end itemize + +@external + + +@node Features, Pictures, News, Top +@section Features + +MathGL can plot a wide range of graphics. It includes: +@itemize @bullet +@item +one-dimensional (Plot, Area, Bars, Step, Stem, Torus, Chart, Error, Tube, Mark, @ref{1D plotting}); + +@item +two-dimensional plots (Mesh, Surf, Dens, Cont, ContF, Boxs, Axial, Fall, Belt, Tile, @ref{2D plotting}); + +@item +three-dimensional plots (Surf3, Dens3, Cont3, ContF3, Cloud-like, @ref{3D plotting}); + +@item +vector fields plots: vector fields Vect and Traj, flow threads Flow, flow pipes Pipe, mapping chart Mapand so on (@ref{Vector fields}); + +@item +dual data plots: surfaces and isosurfaces, transparent or colored (i.e. with transparency or color varied) by other data SurfA, SurfC, Surf3A, Surf3C (@ref{Dual plotting}); + +@item +and so on. See also @ref{Extra samples}. +@end itemize + +In fact, I created the functions for drawing of all the types of scientific plots that I know. The list of plots is growing; if you need some special type of a plot then please email me @email{mathgl.abalakin@@gmail.com, e-mail} and it will appear in the new version. + +I tried to make plots as nice looking as possible: e.g., a surface can be transparent and highlighted by several (up to 10) light sources. Most of the drawing functions have 2 variants: simple one for the fast plotting of data, complex one for specifying of the exact position of the plot (including parametric representation). Resulting image can be saved in bitmap PNG, JPEG, TGA, BMP format, or in vector EPS, SVG or TeX format, or in 3D formats OBJ, OFF, STL or X3D, or in IDTF format which can be converted into U3D. + +All texts are drawn by vector fonts, which allows for high scalability and portability. Texts may contain commands for: some of the TeX-like symbols, changing index (upper or lower indexes) and the style of font inside the text string. Texts of ticks are rotated with axis rotation. It is possible to create a legend of plot and put text in an arbitrary position on the plot. Arbitrary text encoding (by the help of function @code{setlocale()}) and UTF-16 encoding are supported. + +Special class mglData is used for data encapsulation. In addition to a safe creation and deletion of data arrays it includes functions for data processing (smoothing, differentiating, integrating, interpolating and so on) and reading of data files with automatic size determination. Class mglData can handle arrays with up to three dimensions (arrays which depend on up to 3 independent indexes @math{a_@{ijk@}}). Using an array with higher number of dimensions is not meaningful, because I do not know how it can be plotted. Data filling and modification may be done manually or by textual formulas. + +There is fast evaluation of a textual mathematical expression. It is based on string precompilation to tree-like code at the creation of class instance. At evaluation stage code performs only fast tree-walk and returns the value of the expression. In addition to changing data values, textual formulas are also used for drawing in @emph{arbitrary} curvilinear coordinates. A set of such curvilinear coordinates is limited only by user's imagination rather than a fixed list like: polar, parabolic, spherical, and so on. + +@external + +@node Pictures, MGL scripts, Features, Top +@section Pictures + +@anchor{1D plotting} +@subsection Examples of graphics for 1d arrays + +@anchor{2D plotting} +@subsection Examples of graphics for 2d arrays + +@anchor{3D plotting} +@subsection Examples of graphics for 3d arrays + +@anchor{Dual plotting} +@subsection Examples of graphics for several arrays + +@anchor{Vector fields} +@subsection Examples of graphics for vector fields + +@anchor{Extra samples} +@subsection Examples of additional features + +@external + +@node MGL scripts, Download, Pictures, Top +@section MGL scripts + +MGL script language is rather simple. Each string is a command. First word of string is the name of command. Other words are command arguments. Command may have up to 1000 arguments (at least for now). Words are separated from each other by space or tabulation symbol. The upper or lower case of words is important, i.e. variables @var{a} and @var{A} are different variables. Symbol @samp{#} starts the comment (all characters after # will be ignored). The exception is situation when @samp{#} is a part of some string. Also options can be specified after symbol @samp{;}. Symbol @samp{:} starts new command (like new line character) if it is not placed inside a string or inside brackets. + +If string contain references to external parameters (substrings @samp{$0}, @samp{$1} ... @samp{$9}) or definitions (substrings @samp{$a}, @samp{$b} ... @samp{$z}) then before execution the values of parameter/definition will be substituted instead of reference. It allows to use the same MGL script for different parameters (file names, paths, condition and so on). + +Argument can be a string, a variable (data arrays) or a number (scalars). +@itemize @bullet +@item +The string is any symbols between ordinary marks @samp{'}. Long strings can be concatenated from several lines by @samp{\} symbol. I.e. the string @samp{'a +'\
' b'} will give string @samp{'a + b'} (here @samp{
} is newline). + +@item +Usually variable have a name which is arbitrary combination of symbols (except spaces and @samp{'}) started from a letter and with length less than 64. A temporary array can be used as variable: +@itemize @bullet +@item +sub-arrays (like in @code{subdata} command) as command argument. For example, @code{a(1)} or @code{a(1,:)} or @code{a(1,:,:)} is second row, @code{a(:,2)} or @code{a(:,2,:)} is third column, @code{a(:,:,0)} is first slice and so on. Also you can extract a part of array from m-th to n-th element by code @code{a(m:n,:,:)} or just @code{a(m:n)}. + +@item +any column combinations defined by formulas, like @code{a('n*w^2/exp(t)')} if names for data columns was specified (by @code{idset} command or in the file at string started with @code{##}). + +@item +any expression (without spaces) of existed variables produce temporary variable. For example, @samp{sqrt(dat(:,5)+1)} will produce temporary variable with data values equal to @code{tmp[i,j] = sqrt(dat[i,5,j]+1)}. + +@item +temporary variable of higher dimensions by help of []. For example, @samp{[1,2,3]} will produce a temporary vector of 3 elements @{1, 2, 3@}; @samp{[[11,12],[21,22]]} will produce matrix 2*2 and so on. Here you can join even an arrays of the same dimensions by construction like @samp{[v1,v2,...,vn]}. + +@item +result of code for making new data inside @{@}. For example, @samp{@{sum dat 'x'@}} produce temporary variable which contain result of summation of @var{dat} along direction 'x'. This is the same array @var{tmp} as produced by command @samp{sum tmp dat 'x'}. You can use nested constructions, like @samp{@{sum @{max dat 'z'@} 'x'@}}. +@end itemize +Temporary variables can not be used as 1st argument for commands which create (return) the data (like @samp{new}, @samp{read}, @samp{hist} and so on). + +@item +Special names @code{nan=#QNAN, pi=3.1415926..., on=1, off=0, :=-1} are treated as number if they were not redefined by user. Variables with suffixes are treated as numbers. Names defined by @code{define} command are treated as number. Also results of formulas with sizes 1x1x1 are treated as number (for example, @samp{pi/dat.nx}). +@end itemize +Before the first using all variables must be defined with the help of commands, like, @code{new}, @code{var}, @code{list}, @code{copy}, @code{read}, @code{hist}, @code{sum} and so on. + +Command may have several set of possible arguments (for example, @code{plot ydat} and @code{plot xdat ydat}). All command arguments for a selected set must be specified. However, some arguments can have default values. These argument are printed in [], like @code{text ydat ['stl'='']} or @code{text x y 'txt' ['fnt'='' size=-1]}. At this, the record @code{[arg1 arg2 arg3 ...]} means @code{[arg1 [arg2 [arg3 ...]]]}, i.e. you can omit only tailing arguments if you agree with its default values. For example, @code{text x y 'txt' '' 1} or @code{text x y 'txt' ''} is correct, but @code{text x y 'txt' 1} is incorrect (argument @code{'fnt'} is missed). + +For more details see @uref{TODO, MathGL documentation} + +@external + +@node Download, Documentation, MGL scripts, Top +@section Download + +@strong{Stable version (v.2.0)} + +You may download current version of MathGL for following configurations: +@itemize @bullet +@item +@uref{http://downloads.sourceforge.net/mathgl/mathgl-2.0.tar.gz,source} file with autoconf/automake script. +@item +@uref{http://downloads.sourceforge.net/mathgl/mathgl-2.0-mingw.i686.zip,Win32 GPL} binaries for MinGW (build for i686) +@item +@uref{http://downloads.sourceforge.net/mathgl/mathgl-2.0.LGPL-mingw.i686.zip,Win32 LGPL} binaries for MinGW (build for i686, no GSL and HDF5 support) +@item +@uref{http://downloads.sourceforge.net/mathgl/mathgl-2.0-1.DevPack,DevPak} package for Dev-C++ or Code::Blocks (GPL version) +@item +@uref{http://downloads.sourceforge.net/mathgl/mathgl-2.0.eng.pdf,PDF} documentation in English +@c HTML documentation in English +@c HTML documentation in Russian +@c @item +@c @uref{http://downloads.sourceforge.net/mathgl/mathgl_slides-1.9.pdf,PDF} slideshow of main features +@end itemize + +@strong{Previous version (v.1.11.2)} + +You may download current version of MathGL for following configurations: +@itemize @bullet +@item +@uref{http://downloads.sourceforge.net/mathgl/mathgl-1.11.2.tar.gz,source} file with autoconf/automake script. +@item +@uref{http://downloads.sourceforge.net/mathgl/mathgl-1.11.2-mingw.i686.zip,Win32 GPL} binaries for MinGW (build for i686) +@item +@uref{http://downloads.sourceforge.net/mathgl/mathgl-1.11.1.1.LGPL-mingw.i686.zip,Win32 LGPL} binaries for MinGW (build for i686, no GSL and HDF5 support) +@item +@uref{http://downloads.sourceforge.net/mathgl/mathgl-1.11.2-1.DevPack,DevPak} package for Dev-C++ or Code::Blocks (GPL version) +@item +@uref{http://downloads.sourceforge.net/mathgl/mathgl-1.11.2.eng.pdf,PDF} documentation in English +@c HTML documentation in English +@c HTML documentation in Russian +@item +@uref{http://downloads.sourceforge.net/mathgl/mathgl_slides-1.9.pdf,PDF} slideshow of main features +@end itemize + +@strong{Font files} + +There are a set of @uref{http://sourceforge.net/project/showfiles.php?group_id=152187&package_id=267177,font files} for MathGL with following typefaces. Note, that the set of glyphs can be less than in default font. As result not all TeX symbols can be displayed. +@itemize @bullet +@item +@uref{http://downloads.sourceforge.net/mathgl/STIX_font.tgz,STIX} font -- default font for MathGL. +@item +@uref{http://downloads.sourceforge.net/mathgl/adventor_font.tgz,Adventor font} -- the @uref{http://www.gust.org.pl/projects/e-foundry/tex-gyre/index_html,TeX Gyre} sansserif font based on the URW Gothic L family (like Avant Garde Gothic). +@item +@uref{http://downloads.sourceforge.net/mathgl/bonum_font.tgz,Bonum font} -- the @uref{http://www.gust.org.pl/projects/e-foundry/tex-gyre/index_html,TeX Gyre} serif font based on the URW Bookman L family. +@item +@uref{http://downloads.sourceforge.net/mathgl/chorus_font.tgz,Chorus font} -- the @uref{http://www.gust.org.pl/projects/e-foundry/tex-gyre/index_html,TeX Gyre} font based on the URW Chancery L Medium Italic. +@item +@uref{http://downloads.sourceforge.net/mathgl/cursor_font.tgz,Cursor font} -- the @uref{http://www.gust.org.pl/projects/e-foundry/tex-gyre/index_html,TeX Gyre} monospaced serif font based on the URW Nimbus Mono L (like Courier). +@item +@uref{http://downloads.sourceforge.net/mathgl/heros_font.tgz,Heros font} -- the @uref{http://www.gust.org.pl/projects/e-foundry/tex-gyre/index_html,TeX Gyre} sansserif font based on the URW Nimbus Sans L (like Helvetica). +@item +@uref{http://downloads.sourceforge.net/mathgl/heroscn_font.tgz,HerosCN font} -- the "compressed" version of previous one. +@item +@uref{http://downloads.sourceforge.net/mathgl/pagella_font.tgz,Pagella font} -- the @uref{http://www.gust.org.pl/projects/e-foundry/tex-gyre/index_html,TeX Gyre} serif font based on the URW Palladio L (like Palatino). +@item +@uref{http://downloads.sourceforge.net/mathgl/schola_font.tgz,Schola font} -- the @uref{http://www.gust.org.pl/projects/e-foundry/tex-gyre/index_html,TeX Gyre} serif fonts is based on the URW Century Schoolbook L. +@item +@uref{http://downloads.sourceforge.net/mathgl/termes_font.tgz,Termes font} -- the @uref{http://www.gust.org.pl/projects/e-foundry/tex-gyre/index_html,TeX Gyre} serif fonts is based on the Nimbus Roman No9 L (like Times). +@end itemize + +@external + +@node Documentation, Other projects, Download, Top +@section Documentation + +Here you can view and download latest version of documentation. This documentation is just compiled version of @uref{https://sourceforge.net/svn/?group_id=152187,SVN} documentation. + +There are @uref{TODO,English} and @uref{TODO,Russian} versions. It also include @uref{TODO,FAQ} about MathGL. + +Another variant is download single @uref{mathgl_en.pdf,PDF} (about 7 Mb). + +@external + +@node Other projects, , Documentation, Top +@section Other projects + +Except scientific (non public) projects I also have some general interest projects: +@itemize @bullet +@item +@uref{http://sourceforge.net/projects/pocketmk/, PocketMK} is small program for PocketPC which simulate famous Russian calculators MK-61 and slightly extend it. +@item +@uref{http://udav.sourceforge.net/,UDAV} is front-end for MGL scripts. It has windows interface for data viewing, changing and plotting. Also it can execute MGL scripts, setup and rotating graphics and so on. +@end itemize + +Also I recommend to look at: +@itemize @bullet +@item +@uref{http://englab.bugfest.net/,EngLab} is a cross-compile mathematical platform with a C like syntax intended to be used both by engineers and users with small programming knowledge. It is extremely scalable and allows users and the community to easily compile their own functions as shared objects. +@item +@uref{http://threedepict.sourceforge.net/,3Depict} is software for analysis of scientific datasets commonly encountered in atom probe tomography. You can manipulate, interact with and analyse point based datasets. +@item +@uref{http://www.sourceforge.net/projects/graphplot/,Graphplot} is function plotter based on MathGL. +@item +@uref{http://www.sourceforge.net/projects/graphplot/,OscillViewer} is oscilloscope monitoring program. Working with L-Card 14-140 AD-Convertor. Based on Qt and MathGL libraries. +@end itemize + +Finally, few links to free software and libraries: +@itemize @bullet +@item +@uref{http://www.thefreecountry.com/,thefreecountry.com} have a lot of Free Programmers', Webmasters' and Security Resources +@item +@uref{http://gnuwin32.sourceforge.net/,GnuWin} provides ports of tools with a GNU or similar open source license, to modern MS-Windows. +@item +@uref{http://loll.sourceforge.net/,LLoL} is project collecting, organising, classifying, and maintaining important URLs about Linux and the Open Source movement for all levels of Linux users. The LoLL project now has 4000+ links which are updated usually on a daily basis. +@end itemize + +@external + +@bye