set(CMAKE_VERBOSE_MAKEFILE ON)
set(MathGL_VERSION_MAJOR 8)
set(MathGL_VERSION_MINOR 0)
-set(MathGL_PATCH_VERSION 0)
+set(MathGL_PATCH_VERSION 1)
set(MathGL_VERSION ${MathGL_VERSION_MAJOR}.${MathGL_VERSION_MINOR}.${MathGL_PATCH_VERSION})
-set(MathGL_SOVERSION 8.0)
+set(MathGL_SOVERSION ${MathGL_VERSION_MAJOR})
string(TIMESTAMP MathGL_DATE UTC)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
add_library(${mgllib} SHARED ${mgl_src_lst})
add_library(${mgllib}-static STATIC ${mgl_src_lst})
set_target_properties(${mgllib} PROPERTIES SOVERSION ${MathGL_SOVERSION})
+ set_target_properties(${mgllib} PROPERTIES VERSION ${MathGL_VERSION})
set_target_properties(${mgllib} PROPERTIES DEFINE_SYMBOL "mgl_EXPORTS")
set_target_properties(${mgllib} PROPERTIES C_VISIBILITY_PRESET hidden)
set_target_properties(${mgllib} PROPERTIES CXX_VISIBILITY_PRESET hidden)
#option(enable-qt5 "Enable Qt5 widget" OFF)
CMAKE_DEPENDENT_OPTION(enable-qt5asqt "Set Qt5 as default libmgl-qt" OFF "enable-qt5" OFF)
CMAKE_DEPENDENT_OPTION(enable-freetype "Enable freetype support" OFF "NOT enable-all" ON)
-set(PY3VERSION_DOTTED "3.8" CACHE STRING "Used python version")
+set(PY3VERSION_DOTTED "3.9" CACHE STRING "Used python version")
string(REPLACE "." "" PY3VERSION_NODOT ${PY3VERSION_DOTTED})
# msvc fwprintf print char* for the specifier of "%s" format
+8.0.1 Released 12 January 2022
+
+* Increase accuracy at line segment skipping.
+* Changes in SOVERSION numbering.
+* Minor spelling fix (thanks to Rafael Laboissière)
+
8.0 Released 1 January 2022
* Change version numbering according Debian rules.
2.3.4 Released 13 February 2016
* Add mglData::Pulse() for determining pulse parameters.
-* Add mglData::ScanFile() for getting formated data from textual file.
+* Add mglData::ScanFile() for getting formatted data from textual file.
* Add mglData::SetList() for setting data from variable argument list of double values.
* Add mglIFS2d() and mglIFS3d() for fractal generation using iterated function system (thanks to Diego Sejas Viscarra).
* Add option to SetSize() for scaling only primitives but don't erase it.
- Add new primitives (arc,polygon,rotated text) as mouse handled ones;
- Add close button to data tabs;
- Add button to stop script drawing and stop() slot for QMathGL;
- - Allow to delete/hide/unhide selected plot;
- - Allow to move selected plot between inplots;
+ - allow one to delete/hide/unhide selected plot;
+ - allow one to move selected plot between inplots;
- Improve NewCommand dialog -- now it replace the script command if user change arguments only;
- MGL commands 'perspective' and 'fog' now work correctly in UDAV;
- Update UDAV icons to use Oxygen ones.
msgstr ""
#: src/exec_dat.cpp:1595
-msgid "Get formated data from file"
+msgid "Get formatted data from file"
msgstr ""
#: src/exec_dat.cpp:1568
#: udav/udav_wnd.cpp:198
msgid ""
"Open and execute/show script or data from file (Ctrl+O).\n"
-"You may switch off automatic exection in UDAV properties."
+"You may switch off automatic execution in UDAV properties."
msgstr ""
#: mgllab/help.cpp:169
msgstr "Llenar columna de datos por fórmula en ids de columnas"
#: src/exec_dat.cpp:1809
-msgid "Get formated data from file"
+msgid "Get formatted data from file"
msgstr "Obtener datos con formato de archivo"
#: src/exec_dat.cpp:1734
#: udav/udav_wnd.cpp:198
msgid ""
"Open and execute/show script or data from file (Ctrl+O).\n"
-"You may switch off automatic exection in UDAV properties."
+"You may switch off automatic execution in UDAV properties."
msgstr ""
"Abrir y ejecutar/mostrar script o datos de archivo (Ctrl+O).\n"
"Puede desactivar ejecucion automatica en propiedades de UDAV."
msgstr "Вычислить данные по формуле из имен колонок"
#: src/exec_dat.cpp:1809
-msgid "Get formated data from file"
+msgid "Get formatted data from file"
msgstr "Загрузить форматированные данные из файла"
#: src/exec_dat.cpp:1734
#: udav/udav_wnd.cpp:198
msgid ""
"Open and execute/show script or data from file (Ctrl+O).\n"
-"You may switch off automatic exection in UDAV properties."
+"You may switch off automatic execution in UDAV properties."
msgstr ""
"Открыть и выполнить скрипт или данные (Ctrl+O).\n"
"Вы можете отключить автоматическое выполнение в настройках."
for(k=i+1;k<num;k++)\r
{\r
const mglPoint p2(GetPntP(k0+k*step)-p1);\r
- float dd=1/sqrt(p2.x*p2.x+p2.y*p2.y), t = atan2(p2.y,p2.x);\r
+ float dd=0.3/sqrt(p2.x*p2.x+p2.y*p2.y), t = atan2(p2.y,p2.x);\r
if(t>t1 && t<t2)\r
{ t1 = t1<t-dd?t-dd:t1; t2 = t2>t+dd?t+dd:t2; } // new range\r
else break;\r
{"roots",_("Find roots using data as initial values"), "roots Res 'func' Ini ['var']|Res 'func' ini ['var']|Res 'func' 'vars' Ini", mgls_roots ,4},
{"save",_("Save data to file"),"save Dat 'file'|val 'file'|'str' 'file' ['how']", mgls_save ,3},
{"savehdf",_("Save data to HDF5 file"),"savehdf Dat 'file' 'id' [rewrite]|val 'file' 'id' [rewrite]", mgls_savehdf ,3},
- {"scanfile",_("Get formated data from file"),"scanfile Dat 'fname 'templ'", mgls_scanfile ,4},
+ {"scanfile",_("Get formatted data from file"),"scanfile Dat 'fname 'templ'", mgls_scanfile ,4},
{"section",_("Extract sub-array between values"),"section Res Dat id ['dir' val]|Res Dat Ids ['dir' val]", mgls_section ,4},
{"sew",_("Remove jump into the data, like phase jumps"),"sew Dat ['dir' da]", mgls_sew ,16},
{"sinfft",_("Sin-Fourier transform at some direction"),"sinfft Dat 'dir'", mgls_sinfft ,16},
bool gz = fname[strlen(fname)-1]=='z';
void *fp;
- if(!strcmp(fname,"-")) fp = stdout; // allow to write in stdout
+ if(!strcmp(fname,"-")) fp = stdout; // allow one to write in stdout
else
{
fp = gz ? (void*)gzopen(fname,"wt") : (void*)fopen(fname,"wt");
bool gz = fname[strlen(fname)-1]=='z';
void *fp;
- if(!strcmp(fname,"-")) fp = stdout; // allow to write in stdout
+ if(!strcmp(fname,"-")) fp = stdout; // allow one to write in stdout
else fp = gz ? (void*)gzopen(fname,"wt") : (void*)fopen(fname,"wt");
if(!fp) { gr->SetWarn(mglWarnOpen,fname); return; }
int w = _Gr_->GetWidth(), h = _Gr_->GetHeight();
bool gz = fname[strlen(fname)-1]=='z';
long hh = _Gr_->GetHeight(), ww = _Gr_->GetWidth();
- void *fp = stdout; // allow to write in stdout
+ void *fp = stdout; // allow one to write in stdout
bool head = true;
if(strcmp(fname,"-")) fp = gz ? (void*)gzopen(fname,"wt") : (void*)fopen(fname,"wt");
else head = false;
@item
@strong{All plots are vector plots.} The MathGL library is intended for handling scientific data which have vector nature (lines, faces, matrices and so on). As a result, vector representation is used in all cases! In addition, the vector representation allows one to scale the plot easily -- change the canvas size by a factor of 2, and the picture will be proportionally scaled.
@item
-@strong{New drawing never clears things drawn already.} This, in some sense, unexpected, idea allows to create a lot of ``combined'' graphics. For example, to make a surface with contour lines one needs to call the function for surface plotting and the function for contour lines plotting (in any order). Thus the special functions for making this ``combined'' plots (as it is done in Matlab and some other plotting systems) are superfluous.
+@strong{New drawing never clears things drawn already.} This, in some sense, unexpected, idea allows one to create a lot of ``combined'' graphics. For example, to make a surface with contour lines one needs to call the function for surface plotting and the function for contour lines plotting (in any order). Thus the special functions for making this ``combined'' plots (as it is done in Matlab and some other plotting systems) are superfluous.
@end enumerate
In addition to the general concepts I want to comment on some non-trivial or less commonly used general ideas -- plot positioning, axis specification and curvilinear coordinates, styles for lines, text and color scheme.
The special 2-axis color scheme (like in @ref{map} plot) can be used if it contain symbol @samp{%}. In this case the second direction (alpha channel) is used as second coordinate for colors. At this, up to 4 colors can be specified for corners: @{c1,a1@}, @{c2,a1@}, @{c1,a2@}, @{c2,a2@}. Here color and alpha ranges are @{c1,c2@} and @{a1,a2@} correspondingly. If one specify less than 4 colors then black color is used for corner @{c1,a1@}. If only 2 colors are specified then the color of their sum is used for corner @{c2,a2@}.
-There are several useful combinations. String @samp{kw} corresponds to the simplest gray color scheme where higher values are brighter. String @samp{wk} presents the inverse gray color scheme where higher value is darker. Strings @samp{kRryw}, @samp{kGgw}, @samp{kBbcw} present the well-known @emph{hot}, @emph{summer} and @emph{winter} color schemes. Strings @samp{BbwrR} and @samp{bBkRr} allow to view bi-color figure on white or black background, where negative values are blue and positive values are red. String @samp{BbcyrR} gives a color scheme similar to the well-known @emph{jet} color scheme.
+There are several useful combinations. String @samp{kw} corresponds to the simplest gray color scheme where higher values are brighter. String @samp{wk} presents the inverse gray color scheme where higher value is darker. Strings @samp{kRryw}, @samp{kGgw}, @samp{kBbcw} present the well-known @emph{hot}, @emph{summer} and @emph{winter} color schemes. Strings @samp{BbwrR} and @samp{bBkRr} allow one to view bi-color figure on white or black background, where negative values are blue and positive values are red. String @samp{BbcyrR} gives a color scheme similar to the well-known @emph{jet} color scheme.
For more precise coloring, you can change default (equidistant) position of colors in color scheme. The format is @samp{@{CN,pos@}}, @samp{@{CN,pos@}} or @samp{@{xRRGGBB,pos@}}. The position value @var{pos} should be in range [0, 1]. Note, that alternative method for fine tuning of the color scheme is using the formula for coloring (see @ref{Curved coordinates}).
The font styles are: @samp{r} -- roman (or regular) font, @samp{i} -- italic style, @samp{b} -- bold style. By default roman roman font is used. The align types are: @samp{L} -- align left (default), @samp{C} -- align center, @samp{R} -- align right, @samp{T} -- align under, @samp{V} -- align center vertical. Additional font effects are: @samp{w} -- wired, @samp{o} -- over-lined, @samp{u} -- underlined.
-Also a parsing of the LaTeX-like syntax is provided. There are commands for the font style changing inside the string (for example, use \b for bold font): \a or \overline -- over-lined, \b or \textbf -- bold, \i or \textit -- italic, \r or \textrm -- roman (disable bold and italic attributes), \u or \underline -- underlined, \w or \wire -- wired, \big -- bigger size, @@ -- smaller size. The lower and upper indexes are specified by @samp{_} and @samp{^} symbols. At this the changed font style is applied only on next symbol or symbols in braces @{@}. The text in braces @{@} are treated as single symbol that allow one to print the index of index. For example, compare the strings @samp{sin (x^@{2^3@})} and @samp{sin (x^2^3)}. You may also change text color inside string by command #? or by \color? where @samp{?} is symbolic id of the color (@pxref{Color styles}). For example, words @samp{blue} and @samp{red} will be colored in the string @samp{#b@{blue@} and \colorr@{red@} text}. The most of functions understand the newline symbol @samp{\n} and allows to print multi-line text. Finally, you can use arbitrary (if it was defined in font-face) UTF codes by command @code{\utf0x????}. For example, @code{\utf0x3b1} will produce
+Also a parsing of the LaTeX-like syntax is provided. There are commands for the font style changing inside the string (for example, use \b for bold font): \a or \overline -- over-lined, \b or \textbf -- bold, \i or \textit -- italic, \r or \textrm -- roman (disable bold and italic attributes), \u or \underline -- underlined, \w or \wire -- wired, \big -- bigger size, @@ -- smaller size. The lower and upper indexes are specified by @samp{_} and @samp{^} symbols. At this the changed font style is applied only on next symbol or symbols in braces @{@}. The text in braces @{@} are treated as single symbol that allow one to print the index of index. For example, compare the strings @samp{sin (x^@{2^3@})} and @samp{sin (x^2^3)}. You may also change text color inside string by command #? or by \color? where @samp{?} is symbolic id of the color (@pxref{Color styles}). For example, words @samp{blue} and @samp{red} will be colored in the string @samp{#b@{blue@} and \colorr@{red@} text}. The most of functions understand the newline symbol @samp{\n} and allows one to print multi-line text. Finally, you can use arbitrary (if it was defined in font-face) UTF codes by command @code{\utf0x????}. For example, @code{\utf0x3b1} will produce
@ifhtml
@html
α symbol.
@end ifset
@ifclear UDAV
-The core of MathGL is @strong{mglGraph} class defined in @code{#include <mgl2/mgl.h>}. It contains a lot of plotting functions for 1D, 2D and 3D data. It also encapsulates parameters for axes drawing. Moreover an arbitrary coordinate transformation can be used for each axis. All plotting functions use data encapsulated in mglData class (see @ref{Data processing}) that allows to check sizes of used arrays easily. Also it have many functions for data handling: modify it by formulas, find momentums and distribution (histogram), apply operator (differentiate, integrate, transpose, Fourier and so on), change data sizes (interpolate, squeeze, crop and so on). Additional information about colors, fonts, formula parsing can be found in @ref{General concepts} and @ref{Other classes}.
+The core of MathGL is @strong{mglGraph} class defined in @code{#include <mgl2/mgl.h>}. It contains a lot of plotting functions for 1D, 2D and 3D data. It also encapsulates parameters for axes drawing. Moreover an arbitrary coordinate transformation can be used for each axis. All plotting functions use data encapsulated in mglData class (see @ref{Data processing}) that allows one to check sizes of used arrays easily. Also it have many functions for data handling: modify it by formulas, find momentums and distribution (histogram), apply operator (differentiate, integrate, transpose, Fourier and so on), change data sizes (interpolate, squeeze, crop and so on). Additional information about colors, fonts, formula parsing can be found in @ref{General concepts} and @ref{Other classes}.
@end ifclear
Some of MathGL features will appear only in novel versions. To test used MathGL version you can use following function.
@deftypefn {Method on @code{mglGraph}} @code{void} WriteSVG (@code{const char *}fname, @code{const char *}descr=@code{""})
@deftypefnx {C function} @code{void} mgl_write_svg (@code{HMGL} gr, @code{const char *}fname, @code{const char *}descr)
-Exports current frame to SVG (Scalable Vector Graphics) file using vector representation. In difference of EPS format, SVG format support transparency that allows to correctly draw semitransparent plot (like @ref{surfa}, @ref{surf3a} or @ref{cloud}). Note, the output file may be too large for graphic of large data array (especially for surfaces). It is better to use bitmap format (for example PNG or JPEG). However, program has no internal limitations for size of output file. Parameter @var{fname} specifies the file name, @var{descr} adds description to file (default is file name). If file name is terminated by @samp{z} (for example, @samp{fname.svgz}) then file will be compressed in gzip format. Note, that SVG format don't support color interpolation, and the resulting plot will look as you use @ref{quality}=1 for plotting.
+Exports current frame to SVG (Scalable Vector Graphics) file using vector representation. In difference of EPS format, SVG format support transparency that allows one to correctly draw semitransparent plot (like @ref{surfa}, @ref{surf3a} or @ref{cloud}). Note, the output file may be too large for graphic of large data array (especially for surfaces). It is better to use bitmap format (for example PNG or JPEG). However, program has no internal limitations for size of output file. Parameter @var{fname} specifies the file name, @var{descr} adds description to file (default is file name). If file name is terminated by @samp{z} (for example, @samp{fname.svgz}) then file will be compressed in gzip format. Note, that SVG format don't support color interpolation, and the resulting plot will look as you use @ref{quality}=1 for plotting.
@end deftypefn
@deftypefn {Method on @code{mglGraph}} @code{void} WriteTEX (@code{const char *}fname, @code{const char *}descr=@code{""})
@deftypefnx {Method on @code{mglData}} @code{mglData} Solve (@code{mreal} val, @code{char} dir, @code{const mglDataA &}idat, @code{bool} norm=@code{true}) @code{const}
@deftypefnx {C function} @code{HMDT} mgl_data_solve (@code{HCDT} dat, @code{mreal} val, @code{char} dir, @code{HCDT} idat, @code{int} norm)
@end ifclear
-Gets array which values is indexes (roots) along given direction @var{dir}, where interpolated values of data @var{dat} are equal to @var{val}. Output data will have the sizes of @var{dat} in directions transverse to @var{dir}. If data @var{idat} is provided then its values are used as starting points. This allows to find several branches by consequentive calls. Indexes are supposed to be normalized in range [0,1] (if @var{norm}=@code{true}) or in ranges [0,nx], [0,ny], [0,nz] correspondingly. Function return NULL or create empty data if data cannot be created for given arguments. @sref{Solve sample}
+Gets array which values is indexes (roots) along given direction @var{dir}, where interpolated values of data @var{dat} are equal to @var{val}. Output data will have the sizes of @var{dat} in directions transverse to @var{dir}. If data @var{idat} is provided then its values are used as starting points. This allows one to find several branches by consequentive calls. Indexes are supposed to be normalized in range [0,1] (if @var{norm}=@code{true}) or in ranges [0,nx], [0,ny], [0,nz] correspondingly. Function return NULL or create empty data if data cannot be created for given arguments. @sref{Solve sample}
@end deftypefn
@anchor{roots}
Table below show plotting time in seconds for all samples in file @uref{http://sourceforge.net/p/mathgl/code/HEAD/tree/mathgl-2x/examples/samples.cpp, examples/samples.cpp}. The test was done in my laptop (i5-2430M) with 64-bit Debian.
-Few words about the speed. Firstly, direct bitmap drawing (Quality=4,5,6) is faster than buffered one (Quality=0,1,2), but sometimes it give incorrect result (see @ref{cloud}) and don't allow to export in vector or 3d formats (like EPS, SVG, PDF ...). Secondly, lower quality is faster than high one generally, i.e. Quality=1 is faster than Quality=2, and Quality=0 is faster than Quality=1. However, if plot contain a lot of faces (like @ref{cloud}, @ref{surf3}, @ref{pipe}, @ref{dew}) then Quality=0 may become slow, especially for small images. Finally, smaller images are drawn faster than larger ones.
+Few words about the speed. Firstly, direct bitmap drawing (Quality=4,5,6) is faster than buffered one (Quality=0,1,2), but sometimes it give incorrect result (see @ref{cloud}) and don't allow one to export in vector or 3d formats (like EPS, SVG, PDF ...). Secondly, lower quality is faster than high one generally, i.e. Quality=1 is faster than Quality=2, and Quality=0 is faster than Quality=1. However, if plot contain a lot of faces (like @ref{cloud}, @ref{surf3}, @ref{pipe}, @ref{dew}) then Quality=0 may become slow, especially for small images. Finally, smaller images are drawn faster than larger ones.
Results for image size 800*600 (default one).
@include time.texi
@subsection Drawing phase plain
@nav{}
-Here I want say a few words of plotting phase plains. Phase plain is name for system of coordinates @math{x}, @math{x'}, i.e. a variable and its time derivative. Plot in phase plain is very useful for qualitative analysis of an ODE, because such plot is rude (it topologically the same for a range of ODE parameters). Most often the phase plain @{@math{x}, @math{x'}@} is used (due to its simplicity), that allows to analyze up to the 2nd order ODE (i.e. @math{x''+f(x,x')=0}).
+Here I want say a few words of plotting phase plains. Phase plain is name for system of coordinates @math{x}, @math{x'}, i.e. a variable and its time derivative. Plot in phase plain is very useful for qualitative analysis of an ODE, because such plot is rude (it topologically the same for a range of ODE parameters). Most often the phase plain @{@math{x}, @math{x'}@} is used (due to its simplicity), that allows one to analyze up to the 2nd order ODE (i.e. @math{x''+f(x,x')=0}).
The simplest way to draw phase plain in MathGL is using @ref{flow} function(s), which automatically select several points and draw flow threads. If the ODE have an integral of motion (like Hamiltonian @math{H(x,x')=const} for dissipation-free case) then you can use @ref{cont} function for plotting isolines (contours). In fact. isolines are the same as flow threads, but without arrows on it. Finally, you can directly solve ODE using @ref{ode} function and plot its numerical solution.
@subsection Drawing phase plain
@nav{}
-Here I want say a few words of plotting phase plains. Phase plain is name for system of coordinates @math{x}, @math{x'}, i.e. a variable and its time derivative. Plot in phase plain is very useful for qualitative analysis of an ODE, because such plot is rude (it topologically the same for a range of ODE parameters). Most often the phase plain @{@math{x}, @math{x'}@} is used (due to its simplicity), that allows to analyze up to the 2nd order ODE (i.e. @math{x''+f(x,x')=0}).
+Here I want say a few words of plotting phase plains. Phase plain is name for system of coordinates @math{x}, @math{x'}, i.e. a variable and its time derivative. Plot in phase plain is very useful for qualitative analysis of an ODE, because such plot is rude (it topologically the same for a range of ODE parameters). Most often the phase plain @{@math{x}, @math{x'}@} is used (due to its simplicity), that allows one to analyze up to the 2nd order ODE (i.e. @math{x''+f(x,x')=0}).
The simplest way to draw phase plain in MathGL is using @ref{flow} function(s), which automatically select several points and draw flow threads. If the ODE have an integral of motion (like Hamiltonian @math{H(x,x')=const} for dissipation-free case) then you can use @ref{cont} function for plotting isolines (contours). In fact. isolines are the same as flow threads, but without arrows on it. Finally, you can directly solve ODE using @ref{ode} function and plot its numerical solution.
QMainWindow *Wnd = new QMainWindow;
Wnd->resize(810,610); // for fill up the QMGL, menu and toolbars
Wnd->setWindowTitle("QMathGL sample");
- // here I allow to scroll QMathGL -- the case
+ // here I allow one to scroll QMathGL -- the case
// then user want to prepare huge picture
QScrollArea *scroll = new QScrollArea(Wnd);
@subsection Drawing phase plain
@nav{}
-Here I want say a few words of plotting phase plains. Phase plain is name for system of coordinates @math{x}, @math{x'}, i.e. a variable and its time derivative. Plot in phase plain is very useful for qualitative analysis of an ODE, because such plot is rude (it topologically the same for a range of ODE parameters). Most often the phase plain @{@math{x}, @math{x'}@} is used (due to its simplicity), that allows to analyze up to the 2nd order ODE (i.e. @math{x''+f(x,x')=0}).
+Here I want say a few words of plotting phase plains. Phase plain is name for system of coordinates @math{x}, @math{x'}, i.e. a variable and its time derivative. Plot in phase plain is very useful for qualitative analysis of an ODE, because such plot is rude (it topologically the same for a range of ODE parameters). Most often the phase plain @{@math{x}, @math{x'}@} is used (due to its simplicity), that allows one to analyze up to the 2nd order ODE (i.e. @math{x''+f(x,x')=0}).
The simplest way to draw phase plain in MathGL is using @ref{flow} function(s), which automatically select several points and draw flow threads. If the ODE have an integral of motion (like Hamiltonian @math{H(x,x')=const} for dissipation-free case) then you can use @ref{cont} function for plotting isolines (contours). In fact. isolines are the same as flow threads, but without arrows on it. Finally, you can directly solve ODE using @ref{ode} function and plot its numerical solution.
QMainWindow *Wnd = new QMainWindow;
Wnd->resize(810,610); // for fill up the QMGL, menu and toolbars
Wnd->setWindowTitle("QMathGL sample");
- // here I allow to scroll QMathGL -- the case
+ // here I allow one to scroll QMathGL -- the case
// then user want to prepare huge picture
QScrollArea *scroll = new QScrollArea(Wnd);
@subsection Drawing phase plain
@nav{}
-Here I want say a few words of plotting phase plains. Phase plain is name for system of coordinates @math{x}, @math{x'}, i.e. a variable and its time derivative. Plot in phase plain is very useful for qualitative analysis of an ODE, because such plot is rude (it topologically the same for a range of ODE parameters). Most often the phase plain @{@math{x}, @math{x'}@} is used (due to its simplicity), that allows to analyze up to the 2nd order ODE (i.e. @math{x''+f(x,x')=0}).
+Here I want say a few words of plotting phase plains. Phase plain is name for system of coordinates @math{x}, @math{x'}, i.e. a variable and its time derivative. Plot in phase plain is very useful for qualitative analysis of an ODE, because such plot is rude (it topologically the same for a range of ODE parameters). Most often the phase plain @{@math{x}, @math{x'}@} is used (due to its simplicity), that allows one to analyze up to the 2nd order ODE (i.e. @math{x''+f(x,x')=0}).
The simplest way to draw phase plain in MathGL is using @ref{flow} function(s), which automatically select several points and draw flow threads. If the ODE have an integral of motion (like Hamiltonian @math{H(x,x')=const} for dissipation-free case) then you can use @ref{cont} function for plotting isolines (contours). In fact. isolines are the same as flow threads, but without arrows on it. Finally, you can directly solve ODE using @ref{ode} function and plot its numerical solution.
Table below show plotting time in seconds for all samples in file @uref{http://sourceforge.net/p/mathgl/code/HEAD/tree/mathgl-2x/examples/samples.cpp, examples/samples.cpp}. The test was done in my laptop (i5-2430M) with 64-bit Debian.
-Few words about the speed. Firstly, direct bitmap drawing (Quality=4,5,6) is faster than buffered one (Quality=0,1,2), but sometimes it give incorrect result (see @ref{cloud}) and don't allow to export in vector or 3d formats (like EPS, SVG, PDF ...). Secondly, lower quality is faster than high one generally, i.e. Quality=1 is faster than Quality=2, and Quality=0 is faster than Quality=1. However, if plot contain a lot of faces (like @ref{cloud}, @ref{surf3}, @ref{pipe}, @ref{dew}) then Quality=0 may become slow, especially for small images. Finally, smaller images are drawn faster than larger ones.
+Few words about the speed. Firstly, direct bitmap drawing (Quality=4,5,6) is faster than buffered one (Quality=0,1,2), but sometimes it give incorrect result (see @ref{cloud}) and don't allow one to export in vector or 3d formats (like EPS, SVG, PDF ...). Secondly, lower quality is faster than high one generally, i.e. Quality=1 is faster than Quality=2, and Quality=0 is faster than Quality=1. However, if plot contain a lot of faces (like @ref{cloud}, @ref{surf3}, @ref{pipe}, @ref{dew}) then Quality=0 may become slow, especially for small images. Finally, smaller images are drawn faster than larger ones.
Results for image size 800*600 (default one).
@include time.texi
@section Utilities for parsing MGL
@nav{}
-MathGL library provides several tools for parsing MGL scripts. There is tools saving it to bitmap or vectorial images (@code{mglconv}). Tool @code{mglview} show MGL script and allow to rotate and setup the image. Another feature of @code{mglview} is loading *.mgld files (see @code{ExportMGLD()}) for quick viewing 3d pictures.
+MathGL library provides several tools for parsing MGL scripts. There is tools saving it to bitmap or vectorial images (@code{mglconv}). Tool @code{mglview} show MGL script and allow one to rotate and setup the image. Another feature of @code{mglview} is loading *.mgld files (see @code{ExportMGLD()}) for quick viewing 3d pictures.
Both tools have similar set of arguments. They can be name of script file or options. You can use @samp{-} as script name for using standard input (i.e. pipes). Options are:
@itemize
@section Utilities for parsing MGL
@nav{}
-MathGL library provides several tools for parsing MGL scripts. There is tools saving it to bitmap or vectorial images (@code{mglconv}). Tool @code{mglview} show MGL script and allow to rotate and setup the image. Another feature of @code{mglview} is loading *.mgld files (see @code{ExportMGLD()}) for quick viewing 3d pictures.
+MathGL library provides several tools for parsing MGL scripts. There is tools saving it to bitmap or vectorial images (@code{mglconv}). Tool @code{mglview} show MGL script and allow one to rotate and setup the image. Another feature of @code{mglview} is loading *.mgld files (see @code{ExportMGLD()}) for quick viewing 3d pictures.
Both tools have similar set of arguments. They can be name of script file or options. You can use @samp{-} as script name for using standard input (i.e. pipes). Options are:
@itemize
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. 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{;} (@pxref{Command options}). 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 (filenames, paths, condition and so on).
+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 one to use the same MGL script for different parameters (filenames, paths, condition and so on).
Argument can be a string, a variable (data arrays) or a number (scalars).
@itemize @bullet
@deftypefnx {Method on @code{mglParse}} @code{int} Parse (@code{mglGraph *}gr, @code{const wchar_t *}str, @code{long} pos=@code{0})
@deftypefnx {C function} @code{int} mgl_parse_line (@code{HMGL} gr, @code{HMPR} p, @code{const char *}str, @code{int} pos)
@deftypefnx {C function} @code{int} mgl_parse_linew (@code{HMGL} gr, @code{HMPR} p, @code{const wchar_t *}str, @code{int} pos)
-Function parses the string @var{str} and executes it by using @var{gr} as a graphics plotter. Returns the value depending on an error presence in the string @var{str}: 0 -- no error, 1 -- wrong command argument(s), 2 -- unknown command, 3 -- string is too long, 4 -- strings is not closed. Optional argument @var{pos} allows to save the string position in the document (or file) for using @code{for|next} command.
+Function parses the string @var{str} and executes it by using @var{gr} as a graphics plotter. Returns the value depending on an error presence in the string @var{str}: 0 -- no error, 1 -- wrong command argument(s), 2 -- unknown command, 3 -- string is too long, 4 -- strings is not closed. Optional argument @var{pos} allows one to save the string position in the document (or file) for using @code{for|next} command.
@end deftypefn
@deftypefn {Method on @code{mglParse}} @code{mglData} Calc (@code{const char *}formula)
@deftypefn {Method on @code{mglParse}} @code{void} AllowSetSize (@code{bool} a)
@deftypefnx {C function} @code{void} mgl_parser_allow_setsize (@code{HMPR} p, @code{int} a)
-Allow to parse @ref{setsize} command or not.
+allow one to parse @ref{setsize} command or not.
@end deftypefn
@deftypefn {Method on @code{mglParse}} @code{void} AllowFileIO (@code{bool} a)
@deftypefn {Method on @code{mglParse}} @code{void} AllowDllCall (@code{bool} a)
@deftypefnx {C function} @code{void} mgl_parser_allow_dll_call (@code{HMPR} p, @code{int} a)
-Allow to parse @ref{load} command or not.
+allow one to parse @ref{load} command or not.
@end deftypefn
@deftypefn {Method on @code{mglParse}} @code{void} Stop ()
@tab Create new window with empty script. Note, all scripts share variables. So, second window can be used to see some additional information of existed variables.
@item @key{Ctrl-O}
-@tab Open and execute/show script or data from file. You may switch off automatic exection in UDAV properties
+@tab Open and execute/show script or data from file. You may switch off automatic execution in UDAV properties
@item @key{Ctrl-S}
@tab Save script to a file.
@tab Create new window with empty script. Note, all scripts share variables. So, second window can be used to see some additional information of existed variables.
@item @key{Ctrl-O}
-@tab Open and execute/show script or data from file. You may switch off automatic exection in UDAV properties
+@tab Open and execute/show script or data from file. You may switch off automatic execution in UDAV properties
@item @key{Ctrl-S}
@tab Save script to a file.
@ufig{udav_cmd,8, New command dialog}
-One of most interesting dialog (hotkey @key{Meta-C} or @key{Win-C}) is dialog which help to enter new command or change arguments of existed one. It allows consequently select the category of command, command name in category and appropriate set of command arguments. At this right side show detailed command description. Required argument(s) are denoted by bold text. Strings are placed in apostrophes, like @code{'txt'}. Buttons below table allow to call dialogs for changing style of command (if argument @code{'fmt'} is present in the list of command arguments); to set variable or expression for argument(s); to add options for command. Note, you can click on a cell to enter value, or double-click to call corresponding dialog.
+One of most interesting dialog (hotkey @key{Meta-C} or @key{Win-C}) is dialog which help to enter new command or change arguments of existed one. It allows consequently select the category of command, command name in category and appropriate set of command arguments. At this right side show detailed command description. Required argument(s) are denoted by bold text. Strings are placed in apostrophes, like @code{'txt'}. Buttons below table allow one to call dialogs for changing style of command (if argument @code{'fmt'} is present in the list of command arguments); to set variable or expression for argument(s); to add options for command. Note, you can click on a cell to enter value, or double-click to call corresponding dialog.
@ufig{udav_pen,5, Style dialog - pen style}
@ufig{udav_sch,5, Style dialog - color scheme}
@ufig{udav_var,3, Variable dialog}
-Dialog for entering variable allow to select variable or expression which can be used as argument of a command. Here you can select the variable name; range of indexes in each directions; operation which will be applied (like, summation, finding minimal/maximal values and so on). Usually it can be called from New command dialog.
+Dialog for entering variable allow one to select variable or expression which can be used as argument of a command. Here you can select the variable name; range of indexes in each directions; operation which will be applied (like, summation, finding minimal/maximal values and so on). Usually it can be called from New command dialog.
@ufig{udav_opt,7.5, Dialog for options of a command}
-Dialog for command options allow to change @ref{Command options}. Usually it can be called from New command dialog.
+Dialog for command options allow one to change @ref{Command options}. Usually it can be called from New command dialog.
@ufig{udav_prop,5, Dialog for UDAV settings}
-Finally, there is dialog for UDAV settings. It allow to change most of things in UDAV appearance and working, including colors of keywords and numbers, default font and image size, and so on (see figure above).
+Finally, there is dialog for UDAV settings. It allow one to change most of things in UDAV appearance and working, including colors of keywords and numbers, default font and image size, and so on (see figure above).
There are also a set of dialogs for data handling, but they are too simple and clear. So, I will not put them here.
@ufig{udav_cmd,8, New command dialog}
-One of most interesting dialog (hotkey @key{Meta-C} or @key{Win-C}) is dialog which help to enter new command or change arguments of existed one. It allows consequently select the category of command, command name in category and appropriate set of command arguments. At this right side show detailed command description. Required argument(s) are denoted by bold text. Strings are placed in apostrophes, like @code{'txt'}. Buttons below table allow to call dialogs for changing style of command (if argument @code{'fmt'} is present in the list of command arguments); to set variable or expression for argument(s); to add options for command. Note, you can click on a cell to enter value, or double-click to call corresponding dialog.
+One of most interesting dialog (hotkey @key{Meta-C} or @key{Win-C}) is dialog which help to enter new command or change arguments of existed one. It allows consequently select the category of command, command name in category and appropriate set of command arguments. At this right side show detailed command description. Required argument(s) are denoted by bold text. Strings are placed in apostrophes, like @code{'txt'}. Buttons below table allow one to call dialogs for changing style of command (if argument @code{'fmt'} is present in the list of command arguments); to set variable or expression for argument(s); to add options for command. Note, you can click on a cell to enter value, or double-click to call corresponding dialog.
@ufig{udav_pen,5, Style dialog - pen style}
@ufig{udav_sch,5, Style dialog - color scheme}
@ufig{udav_var,3, Variable dialog}
-Dialog for entering variable allow to select variable or expression which can be used as argument of a command. Here you can select the variable name; range of indexes in each directions; operation which will be applied (like, summation, finding minimal/maximal values and so on). Usually it can be called from New command dialog.
+Dialog for entering variable allow one to select variable or expression which can be used as argument of a command. Here you can select the variable name; range of indexes in each directions; operation which will be applied (like, summation, finding minimal/maximal values and so on). Usually it can be called from New command dialog.
@ufig{udav_opt,7.5, Dialog for options of a command}
-Dialog for command options allow to change @ref{Command options}. Usually it can be called from New command dialog.
+Dialog for command options allow one to change @ref{Command options}. Usually it can be called from New command dialog.
@ufig{udav_prop,5, Dialog for UDAV settings}
-Finally, there is dialog for UDAV settings. It allow to change most of things in UDAV appearance and working, including colors of keywords and numbers, default font and image size, and so on (see figure above).
+Finally, there is dialog for UDAV settings. It allow one to change most of things in UDAV appearance and working, including colors of keywords and numbers, default font and image size, and so on (see figure above).
There are also a set of dialogs for data handling, but they are too simple and clear. So, I will not put them here.
@strong{Latest news}
@itemize
+@item @strong{12 January 2022}
+New version (v.8.0.1) of @uref{http://sourceforge.net/projects/mathgl, MathGL} is released. There are increase accuracy at line segment skipping, changes in SOVERSION numbering, minor spelling fix (thanks to Rafael Laboissière).
+
@item @strong{1 January 2022.}
New version (v.8.0) of @uref{http://sourceforge.net/projects/mathgl, MathGL} is released. There are change version numbering according Debian rules, and add accurate line segment and quadrangle/triangle face cutting at axis border crossing.
@itemize
+@item @strong{12 January 2022}
+New version (v.8.0.1) of @uref{http://sourceforge.net/projects/mathgl, MathGL} is released.
+@itemize @bullet
+@item Increase accuracy at line segment skipping.
+@item Changes in SOVERSION numbering.
+@item Minor spelling fix (thanks to Rafael Laboissière).
+@end itemize
+
@item @strong{1 January 2022}
New version (v.8.0) of @uref{http://sourceforge.net/projects/mathgl, MathGL} is released.
@itemize @bullet
@itemize @bullet
@item
@uref{http://downloads.sourceforge.net/mathgl/mathgl-@value{VERSION}@value{MINVER}.tar.gz, Source} file with cmake build system.
-@c@item
-@c @uref{http://downloads.sourceforge.net/mathgl/mathgl-@value{VERSION}@value{MINVER}-mingw.win32.7z,GPL} or @uref{http://downloads.sourceforge.net/mathgl/mathgl-@value{VERSION}@value{MINVER}.LGPL-mingw.win32.7z,LGPL} binaries for MinGW, 32-bit build for Pentium IV.
+@item
+@uref{http://downloads.sourceforge.net/mathgl/mathgl-@value{VERSION}@value{MINVER}-mingw.win32.7z,GPL} or @uref{http://downloads.sourceforge.net/mathgl/mathgl-@value{VERSION}@value{MINVER}.LGPL-mingw.win32.7z,LGPL} binaries for MinGW, 32-bit build for Pentium IV.
@item
@uref{http://downloads.sourceforge.net/mathgl/mathgl-@value{VERSION}@value{MINVER}-mingw.win64.7z,GPL} or @uref{http://downloads.sourceforge.net/mathgl/mathgl-@value{VERSION}@value{MINVER}.LGPL-mingw.win64.7z,LGPL} binaries for MinGW, 64-bit build.
@item
-@c MathGL utilities with all required DLL files for @uref{http://downloads.sourceforge.net/mathgl/mgl_scripts-@value{VERSION}.win32.7z,32-bit} and @uref{http://downloads.sourceforge.net/mathgl/mgl_scripts-@value{VERSION}.win64.7z,64-bit} versions of MS Windows.
+MathGL utilities with all required DLL files for @uref{http://downloads.sourceforge.net/mathgl/mgl_scripts-@value{VERSION}.win32.7z,32-bit} and @uref{http://downloads.sourceforge.net/mathgl/mgl_scripts-@value{VERSION}.win64.7z,64-bit} versions of MS Windows.
MathGL utilities with all required DLL files for @uref{http://downloads.sourceforge.net/mathgl/mgl_scripts-@value{VERSION}.win64.7z,64-bit} versions of MS Windows.
@item
@uref{http://downloads.sourceforge.net/mathgl/mathgl-@value{VERSION}@value{MINVER}.eng.pdf,PDF} documentation in English.
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).
+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 one 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
@strong{Latest news}
@itemize
+@item @strong{12 January 2022}
+New version (v.8.0.1) of @uref{http://sourceforge.net/projects/mathgl, MathGL} is released. There are increase accuracy at line segment skipping, changes in SOVERSION numbering, minor spelling fix (thanks to Rafael Laboissière).
+
@item @strong{1 January 2022.}
New version (v.8.0) of @uref{http://sourceforge.net/projects/mathgl, MathGL} is released. There are change version numbering according Debian rules, and add accurate line segment and quadrangle/triangle face cutting at axis border crossing.
@itemize
+@item @strong{12 January 2022}
+New version (v.8.0.1) of @uref{http://sourceforge.net/projects/mathgl, MathGL} is released.
+@itemize @bullet
+@item Increase accuracy at line segment skipping.
+@item Changes in SOVERSION numbering.
+@item Minor spelling fix (thanks to Rafael Laboissière).
+@end itemize
+
@item @strong{1 January 2022}
New version (v.8.0) of @uref{http://sourceforge.net/projects/mathgl, MathGL} is released.
@itemize @bullet
@itemize @bullet
@item
@uref{http://downloads.sourceforge.net/mathgl/mathgl-@value{VERSION}@value{MINVER}.tar.gz, Source} file with cmake build system.
-@c @item
-@c @uref{http://downloads.sourceforge.net/mathgl/mathgl-@value{VERSION}@value{MINVER}-mingw.win32.7z,GPL} or @uref{http://downloads.sourceforge.net/mathgl/mathgl-@value{VERSION}@value{MINVER}.LGPL-mingw.win32.7z,LGPL} binaries for MinGW, 32-bit build for Pentium IV.
+@item
+@uref{http://downloads.sourceforge.net/mathgl/mathgl-@value{VERSION}@value{MINVER}-mingw.win32.7z,GPL} or @uref{http://downloads.sourceforge.net/mathgl/mathgl-@value{VERSION}@value{MINVER}.LGPL-mingw.win32.7z,LGPL} binaries for MinGW, 32-bit build for Pentium IV.
@item
@uref{http://downloads.sourceforge.net/mathgl/mathgl-@value{VERSION}@value{MINVER}-mingw.win64.7z,GPL} or @uref{http://downloads.sourceforge.net/mathgl/mathgl-@value{VERSION}@value{MINVER}.LGPL-mingw.win64.7z,LGPL} binaries for MinGW, 64-bit build.
@item
-@c MathGL utilities with all required DLL files for @uref{http://downloads.sourceforge.net/mathgl/mgl_scripts-@value{VERSION}.win32.7z,32-bit} and @uref{http://downloads.sourceforge.net/mathgl/mgl_scripts-@value{VERSION}.win64.7z,64-bit} versions of MS Windows.
+MathGL utilities with all required DLL files for @uref{http://downloads.sourceforge.net/mathgl/mgl_scripts-@value{VERSION}.win32.7z,32-bit} and @uref{http://downloads.sourceforge.net/mathgl/mgl_scripts-@value{VERSION}.win64.7z,64-bit} versions of MS Windows.
MathGL utilities with all required DLL files for @uref{http://downloads.sourceforge.net/mathgl/mgl_scripts-@value{VERSION}.win64.7z,64-bit} versions of MS Windows.
@item
@uref{http://downloads.sourceforge.net/mathgl/mathgl-@value{VERSION}@value{MINVER}.eng.pdf,PDF} documentation in English.
12. Triangulation in 3d + rewrite crust (test 2d version too). See https://en.wikipedia.org/wiki/Bowyer%E2%80%93Watson_algorithm
13. Algorithm of combining primitives with the same color to the larger one.
+14. Add mgl_setup_paths(MGL_FONT_PATH, MGL_INSTALL_DIR) for replacing default paths
16. Add mgl_set_font_hscale() to MGL
22. Add "map res 'eqs' 'vars' ini ['how' A B C [D E]]" -- like "ode" but just simple mapping + progonka.
aload = a = new QAction(QPixmap(":/png/document-open.png"), _("Open file"), this);
connect(a, SIGNAL(triggered()), this, SLOT(choose()));
- a->setToolTip(_("Open and execute/show script or data from file (Ctrl+O).\nYou may switch off automatic exection in UDAV properties."));
+ a->setToolTip(_("Open and execute/show script or data from file (Ctrl+O).\nYou may switch off automatic execution in UDAV properties."));
a->setShortcut(Qt::CTRL+Qt::Key_O);
asave = a = new QAction(QPixmap(":/png/document-save.png"), _("Save script"), this);