Upstream source 1.11.0.1 imported
authorDimitrios Eftaxiopoulos <eftaxi12@otenet.gr>
Mon, 22 Nov 2010 23:32:34 +0000 (01:32 +0200)
committerDimitrios Eftaxiopoulos <eftaxi12@otenet.gr>
Mon, 22 Nov 2010 23:32:34 +0000 (01:32 +0200)
16 files changed:
ChangeLog.txt
FindMathGL.cmake [new file with mode: 0644]
TODO
examples/full_test.cpp
include/mgl/mgl_define.h
mgl/mgl_data_io.cpp
mgl/mgl_eval.cpp
mgl/mgl_main.cpp
png [deleted symlink]
texinfo/data_en.texi
texinfo/data_ru.texi
texinfo/filter.py
texinfo/overview_en.texi
texinfo/overview_ru.texi
texinfo/png/Makefile.am
texinfo/png/Makefile.in

index d2ad377d6f27110c3d2ab10be272f3c999fbaf6a..a4ae6e16b0c654370b9eaec5fcff8eeaf1815362 100644 (file)
@@ -1,3 +1,7 @@
+1.11.0.1 Released 15 November 2010
+       - Bugfix for reading textual data files (mostly under win32).
+       - Docs update.
+
 1.11 Released 8 November 2010
        - Add new plot Grad() -- gradient of scalar field by flow threads.
        - Add new plot QuadPlot() -- plot of irregular quadrangle mesh (like TriPlot()).
diff --git a/FindMathGL.cmake b/FindMathGL.cmake
new file mode 100644 (file)
index 0000000..79479c6
--- /dev/null
@@ -0,0 +1,80 @@
+# FindMathGL.cmake - Check for the presence of MathGL
+#
+# The following variables are set when MathGL is found:
+#  HAVE_MATHGL       = Set to true, if all components of MathGL have been found.
+#  MATHGL_INCLUDES   = Include path for the header files of MathGL
+#  MATHGL_LIBRARIES  = Link these to use MathGL
+#  MATHGL_LFLAGS     = Linker flags (optional)
+
+## -----------------------------------------------------------------------------
+## Search locations
+
+set (include_locations
+    /usr/include
+    /usr/local/include)
+
+set (lib_locations
+    /usr/local/lib64
+    /usr/local/lib
+    /usr/lib64
+    /usr/lib)
+
+## -----------------------------------------------------------------------------
+## Check for the header files
+
+find_path (MATHGL_INCLUDES mgl/mgl.h mgl/mgl_data.h
+  PATHS ${include_locations}
+  NO_DEFAULT_PATH)
+
+## -----------------------------------------------------------------------------
+## Check for the various libraries
+
+set (MATHGL_LIBRARIES "")
+
+## libmgl
+
+find_library (HAVE_LIBMGL mgl
+  PATHS ${lib_locations}
+  NO_DEFAULT_PATH)
+if (HAVE_LIBMGL)
+  list (APPEND MATHGL_LIBRARIES ${HAVE_LIBMGL})
+endif (HAVE_LIBMGL)
+
+## -----------------------------------------------------------------------------
+## Actions taken when all components have been found
+
+if (MATHGL_INCLUDES AND MATHGL_LIBRARIES)
+  set (HAVE_MATHGL TRUE)
+else (MATHGL_INCLUDES AND MATHGL_LIBRARIES)
+  set (HAVE_MATHGL FALSE)
+  if (NOT MATHGL_FIND_QUIETLY)
+    if (NOT MATHGL_INCLUDES)
+      message (STATUS "Unable to find MATHGL header files!")
+    endif (NOT MATHGL_INCLUDES)
+    if (NOT MATHGL_LIBRARIES)
+      message (STATUS "Unable to find MATHGL library files!")
+    endif (NOT MATHGL_LIBRARIES)
+  endif (NOT MATHGL_FIND_QUIETLY)
+endif (MATHGL_INCLUDES AND MATHGL_LIBRARIES)
+
+if (HAVE_MATHGL)
+  if (NOT MATHGL_FIND_QUIETLY)
+    message (STATUS "Found components for MATHGL")
+    message (STATUS "MATHGL_INCLUDES  = ${MATHGL_INCLUDES}")
+    message (STATUS "MATHGL_LIBRARIES = ${MATHGL_LIBRARIES}")
+  endif (NOT MATHGL_FIND_QUIETLY)
+else (HAVE_MATHGL)
+  if (MATHGL_FIND_REQUIRED)
+    message (FATAL_ERROR "Could not find MATHGL!")
+  endif (MATHGL_FIND_REQUIRED)
+endif (HAVE_MATHGL)
+
+## -----------------------------------------------------------------------------
+## Mark advanced variables
+
+mark_as_advanced (
+  MATHGL_INCLUDES
+  MATHGL_LIBRARIES
+)
+
+# EOF FindMathGL.cmake
diff --git a/TODO b/TODO
index 27449bb45613c16ee710bc7ca12b49099ee00e50..c41c6e36f5d78a4ab30b4e9a2b18e828601ed0c6 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,12 +1,15 @@
-                                       MathGL (for v.1.11.*)
+                                       MathGL for v.1.11.* or v.2.0
 
-1. Colorbar: print more digits for manual arrays ... but avoid overlapping ???
 
+1. Colorbar: print more digits for manual arrays ... but avoid overlapping ???
 2. Miss MAJOR labels or decrease its fontsize if labels too close.
        Also check that enough digits is printed to distingush the labels
        Also allow "time"-labels
        Also allow rotate labels if they too dense
-5. Legend in OpenGL mode
+3. Legend in OpenGL mode
+4. Add plot Circle() as Error() but with marks instead of error boxes (default 'o') + alpha-transpared if filled
+5. Export to LaTeX formats - (pgf/tikz) or metapost if possible (like EPS).
+6. Use '~' for old style textual arguments!!!
 
 11. Update STIX fonts (new release) + create PWT fonts
 12. Problem with \calB and so on (\calH, ...) -- they are present only in italic font :(.
@@ -30,7 +33,7 @@
                        
 1. Plot for isolines of vector fields ???
 2. Named arguments in MGL ???
-3. \dfrac for normal size and centering ???
+3. \dfrac for normal size and centering  (sample \big\big{\frac{1}{2}}) ???
 4. "Chaos" in area.png (near axis) ???
 5. save data coordinates in picture??? -- NO -- slow + a lot of memory!
 6. "Cut off" curves if text is printed along it (for contour labels) ?!?
index 6fb97d597cee3afd314d4feae48873304d593ab4..df3af66326ffafa99331d357137e6823f7c4fa1f 100644 (file)
 extern mglTeXsymb mgl_tex_symb[];
 int test(mglGraphAB *gr)
 {
-  int N[5] = {0, 28, 52, 73, 85};
-  char text[256];      
-  float tmin = -900, tmax = -400, dt = 100;
-  double amp[5] = {1., 1.62, 3.98, 5.53, 8.54};
-  double z0 = 0.031;//0.063
-  gr->SetSize(2400,800);
-  gr->Clf();           gr->RotatedText = false;        gr->TuneTicks = false;
-  gr->InPlot(0,0.3,0.15,1);
-  gr->Axis(mglPoint(tmin,-1,-0.65),mglPoint(tmax,1,1),mglPoint(tmin,0,0));
-  gr->CAxis(0,1);              gr->Light(true);                gr->Alpha(true);        gr->AlphaDef = 0.6;
-  gr->Rotate(75-7*1*0-5*1,365);        
-  sprintf(text,"\\i z = %g z_R",N[0]*z0);
-  gr->Puts(mglPoint(0.5*(tmin+tmax),-1,-0.8),text,"rC");
-  sprintf(text,"\\i I_{max}=%g",amp[0]);
-  gr->Puts(mglPoint(0.5*(tmax+tmin),0,1.1),text,"rC");
-  gr->Light(false);    gr->Alpha(false);
-  gr->Line(mglPoint(tmin,-1,0),mglPoint(tmax,-1,0),"r5");
-  gr->dz = 0.2;        gr->dx = dt;
-  gr->Min.z = 0;
-  //gr->Axis("_yz");
-  float size = gr->FontSize;                   gr->FontSize = 4;
-  gr->Axis("_y");              gr->Axis("z");
-  gr->Org = mglPoint(tmin,-1,0);               gr->Axis("x");  gr->FontSize = size;
-  gr->Min.z = -0.65;
-  gr->Org = mglPoint(tmin,0,-0.65);    gr->Axis("_xy");
-  //------------------------------------------------------------------------------------
-  //-----------------------------Второй график-----------------------------------------
-  gr->InPlot(0.172,0.472,0.135,0.985);
-  gr->Axis(mglPoint(tmin,-1,-0.65),mglPoint(tmax,1,1),mglPoint(tmin,0,0));
-  gr->CAxis(0,1);              gr->Light(true);                gr->Alpha(true);        gr->AlphaDef = 0.6;
-  gr->Rotate(75-7*1*0-5*1,365);        
-  sprintf(text,"\\i z = %g z_R",N[1]*z0);
-  gr->Puts(mglPoint(0.5*(tmin+tmax),-1,-0.8),text,"rC");
-  sprintf(text,"\\i I_{max}=%g",amp[1]);
-  gr->Puts(mglPoint(0.5*(tmax+tmin),0,1.1),text,"rC");
-  gr->Light(false);    gr->Alpha(false);
-  gr->Line(mglPoint(tmin,-1,0),mglPoint(tmax,-1,0),"r5");
-  gr->Min.z = 0;
-  gr->Axis("_xyz");
-  gr->Min.z = -0.65;
-  gr->Org = mglPoint(tmin,0,-0.65);                    gr->Axis("_xy");
-/*  //------------------------------------------------------------------------------------
-  //-----------------------------Третий график-----------------------------------------
-  u->ReadHDF(_sprintf("%d.h5",N[2]),"/Real(E)");       u->Transpose();
-  intensity( Nt, Nr, k, w0, u->a );            (V+2)->Set(u->a,Nt,Nr); 
-  std::cout<<"Max = "<<V[2].Maximal()/max<<std::endl;
-  (V+2)->Norm(0,1);    (V+5)->Set((V+2)->a,Nt,1);
-  gr->InPlot(0.344,0.644,0.12,0.97);
-  gr->Axis(mglPoint(tmin,-1,-0.65),mglPoint(tmax,1,1),mglPoint(tmin,0,0));
-  gr->CAxis(0,1);              gr->Light(true);                gr->Alpha(true);        gr->AlphaDef = 0.6;
-  gr->Rotate(75-7*1*0-5*1,365);        
-  sprintf(text,"\\i z = %g z_R",N[2]*z0);
-  gr->Puts(mglPoint(0.5*(tmin+tmax),-1,-0.8),text,"rC");
-  sprintf(text,"\\i I_{max}=%g",amp[2]);
-  gr->Puts(mglPoint(0.5*(tmax+tmin),0,1.1),text,"rC");
-  gr->Surf(V[0],V[1],V[2],"wyrRk");                    gr->Surf(V[0],V[3],V[2],"wyrRk");
-  gr->Plot(V[0],V[4],V[5],"b3");
-  gr->Cont(V[0],V[1],V[2],"wyrRk",20);         gr->Cont(V[0],V[3],V[2],"wyrRk",20);
-  gr->Light(false);    gr->Alpha(false);
-  (V+2)->Norm(0,1);
-  gr->Dens(V[0],V[1],V[2],"wyrRk");                    gr->Dens(V[0],V[3],V[2],"wyrRk");
-  gr->Line(mglPoint(tmin,-1,0),mglPoint(tmax,-1,0),"r5");
-  gr->Min.z = 0;
-  gr->Axis("_xyz");
-  gr->Min.z = -0.65;
-  gr->Org = mglPoint(tmin,0,-0.65);                    gr->Axis("_xy");
-  //------------------------------------------------------------------------------------
-  //-----------------------------Четвертый график-----------------------------------------
-  u->ReadHDF(_sprintf("%d.h5",N[3]),"/Real(E)");       u->Transpose();
-  intensity( Nt, Nr, k, w0, u->a );            (V+2)->Set(u->a,Nt,Nr); 
-  std::cout<<"Max = "<<V[2].Maximal()/max<<std::endl;
-  (V+2)->Norm(0,1);    (V+5)->Set((V+2)->a,Nt,1);
-  gr->InPlot(0.516,0.816,0.105,0.955);
-  gr->Axis(mglPoint(tmin,-1,-0.65),mglPoint(tmax,1,1),mglPoint(tmin,0,0));
-  gr->CAxis(0,1);              gr->Light(true);                gr->Alpha(true);        gr->AlphaDef = 0.6;
-  gr->Rotate(75-7*1*0-5*1,365);        
-  sprintf(text,"\\i z = %g z_R",N[3]*z0);
-  gr->Puts(mglPoint(0.5*(tmin+tmax),-1,-0.8),text,"rC");
-  sprintf(text,"\\i I_{max}=%g",amp[3]);
-  gr->Puts(mglPoint(0.5*(tmax+tmin),0,1.1),text,"rC");
-  gr->Surf(V[0],V[1],V[2],"wyrRk");                    gr->Surf(V[0],V[3],V[2],"wyrRk");
-  gr->Plot(V[0],V[4],V[5],"b3");
-  gr->Cont(V[0],V[1],V[2],"wyrRk",20);         gr->Cont(V[0],V[3],V[2],"wyrRk",20);
-  gr->Light(false);    gr->Alpha(false);
-  (V+2)->Norm(0,1);
-  gr->Dens(V[0],V[1],V[2],"wyrRk");                    gr->Dens(V[0],V[3],V[2],"wyrRk");
-  gr->Line(mglPoint(tmin,-1,0),mglPoint(tmax,-1,0),"r5");
-  gr->Min.z = 0;
-  gr->Axis("_xyz");
-  gr->Min.z = -0.65;
-  gr->Org = mglPoint(tmin,0,-0.65);                    gr->Axis("_xy");
-  //------------------------------------------------------------------------------------
-  //-----------------------------Пятый график-----------------------------------------
-  u->ReadHDF(_sprintf("%d.h5",N[4]),"/Real(E)");       u->Transpose();
-  intensity( Nt, Nr, k, w0, u->a );            (V+2)->Set(u->a,Nt,Nr); 
-  std::cout<<"Max = "<<V[2].Maximal()/max<<std::endl;
-  (V+2)->Norm(0,1);    (V+5)->Set((V+2)->a,Nt,1);
-  gr->InPlot(0.688,0.988,0.09,0.94);
-  gr->Axis(mglPoint(tmin,-1,-0.65),mglPoint(tmax,1,1),mglPoint(tmin,0,0));
-  gr->CAxis(0,1);              gr->Light(true);                gr->Alpha(true);        gr->AlphaDef = 0.6;
-  gr->Rotate(75-7*1*0-5*1,365);        
-  sprintf(text,"\\i z = %g z_R",N[4]*z0);
-  gr->Puts(mglPoint(0.5*(tmin+tmax),-1,-0.8),text,"rC");
-  sprintf(text,"\\i I_{max}=%g",amp[4]);
-  gr->Puts(mglPoint(0.5*(tmax+tmin),0,1.1),text,"rC");
-  gr->Surf(V[0],V[1],V[2],"wyrRk");                    gr->Surf(V[0],V[3],V[2],"wyrRk");
-  gr->Plot(V[0],V[4],V[5],"b3");
-  gr->Cont(V[0],V[1],V[2],"wyrRk",20);         gr->Cont(V[0],V[3],V[2],"wyrRk",20);
-  gr->Light(false);    gr->Alpha(false);
-  (V+2)->Norm(0,1);
-  gr->Dens(V[0],V[1],V[2],"wyrRk");                    gr->Dens(V[0],V[3],V[2],"wyrRk");
-  gr->Line(mglPoint(tmin,-1,0),mglPoint(tmax,-1,0),"r5A");
-  gr->Puts(mglPoint(1.1*tmax,-1,-0.15),"\\tau","rR",-1.6);
-  gr->Puts(mglPoint(0.9*tmax,0,-0.1),"\\rho","rR",-1.6);
-  gr->Min.z = 0;
-  gr->Axis("_xyz");
-  gr->Min.z = -0.65;
-  gr->Org = mglPoint(tmin,0,-0.65);                    gr->Axis("_xy");
-*/
-       return 0;
-
-
-
-
-
-
-
-
        mglParse par;
        par.AllowSetSize = true;
        FILE *fp=fopen("test.mgl","rt");
@@ -1893,7 +1765,11 @@ int main(int argc,char **argv)
        else    gr->SetSize(width,height);
 
        if(dotest)
-       {       test(gr);       gr->WriteEPS("test.eps");       gr->WritePNG("test.png","",false);      return 0;       }
+       {
+               mglTestMode=true;       test(gr);
+               gr->WriteEPS("test.eps");       gr->WritePNG("test.png","",false);
+               return 0;
+       }
 
        if(srnd)        mgl_srnd(1);
        gr->VertexColor(false); gr->TextureColor(true); gr->Compression(false);
index 8b4fcb718566eac71f180303d2439c0f60950196..6c85c13f48a8a2343f6e16312ee7488d4c91eafd 100644 (file)
@@ -148,6 +148,9 @@ struct mglThread
 };
 /// Start several thread for the task
 mreal mglStartThread(void *(*func)(void *), mreal (*fres)(mreal,mreal), int n, mreal *z, long *p, void *v);
+/// write testing messages
+extern bool mglTestMode;
+void mglTest(const char *str, ...);
 #ifndef MGL_NTH_DEF
 #define MGL_NTH_DEF            2
 #endif
index 0c5d845d64367a45699306a33a7b7e1ca6cd78bb..caf525c7823bc1bfae7bd098b46fe161e6791da2 100644 (file)
@@ -26,7 +26,9 @@
 #include <hdf5.h>\r
 #endif\r
 #ifdef HAVE_HDF4\r
-#include <hdf/mfhdf.h>\r
+#define intf hdf4_intf
+#include <hdf/mfhdf.h>
+#undef intf
 #endif\r
 \r
 #ifndef WIN32\r
@@ -303,10 +305,13 @@ void mglData::Save(const char *fname,int ns) const
 //-----------------------------------------------------------------------------
 char *mgl_read_gz(gzFile fp)
 {
-       long size=1024,n=0;
+       long size=1024,n=0,m;
        char *buf=(char*)malloc(size);
-       while(gzread(fp,buf+size*n,size)>0)
-       {       n++;    buf=(char*)realloc(buf,size*(n+1));     }
+       while((m=gzread(fp,buf+size*n,size))>0)
+       {
+               if(m<size)      {       buf[size*n+m]=0;        break;  }
+               n++;            buf=(char*)realloc(buf,size*(n+1));
+       }
        return buf;
 }\r
 //-----------------------------------------------------------------------------\r
@@ -357,7 +362,7 @@ bool mglData::Read(const char *fname)
                }\r
        }\r
        else    for(i=0;i<nb-1;i++)     if(buf[i]=='\f')        l++;\r
-       free(buf);\r
+       free(buf);
        return Read(fname,k,m,l);\r
 }\r
 //-----------------------------------------------------------------------------\r
@@ -403,7 +408,8 @@ bool mglData::Read(const char *fname,int mx,int my,int mz)
                char *s=buf+j;\r
                while(buf[j]>' ' && j<nb)       j++;\r
                buf[j]=0;\r
-               a[i] = atof(s); i++;    if(i>=nx*ny*nz) break;\r
+               a[i] = atof(s);
+               i++;    if(i>=nx*ny*nz) break;
        }\r
        free(buf);\r
        return true;\r
index 0170cdb53836ce7b7cb5990d659081394ae3f335..11dcc6607f363292a9bc32f845f77fc73c236425 100644 (file)
@@ -124,7 +124,9 @@ EQ_CL,              // Clausen function
 #define M_PI       3.14159265358979323846
 #endif
 //-----------------------------------------------------------------------------
+#ifndef NO_GSL
 gsl_rng *mgl_rng=0;
+#endif
 void mgl_srnd(long seed)
 {
 #ifndef NO_GSL
@@ -150,7 +152,7 @@ double mgl_rnd()
        return gsl_rng_uniform(mgl_rng);
 //     gsl_rng_free(r);
 #else
-       return rand()/(RND_MAX-1.);
+       return rand()/(RAND_MAX-1.);
 #endif
 }
 //-----------------------------------------------------------------------------
index eeeac509ac7a6db96a3140aa99454747fd8310ac..095210f85b9280b6e7ca125d30f50d0119d6d209 100644 (file)
@@ -62,6 +62,21 @@ mglColorID mglColorIds[] = {{'k', mglColor(0,0,0)},
        {' ', mglColor(-1,-1,-1)},      {0, mglColor(-1,-1,-1)} // the last one MUST have id=0
 };
 //-----------------------------------------------------------------------------
+bool mglTestMode=false;
+void mglTest(const char *str, ...)
+{
+       if(mglTestMode)
+       {
+               char buf[256];
+               va_list lst;
+               va_start(lst,str);
+               vsprintf(buf,str,lst);
+               va_end(lst);
+               printf("TEST: %s\n",buf);
+               fflush(stdout);
+       }
+}
+//---------------------------------------------------------------------------
 void mglGraph::RecalcBorder()
 {
        if(!fx &&       !fy &&  !fz)
diff --git a/png b/png
deleted file mode 120000 (symlink)
index 8077efa..0000000
--- a/png
+++ /dev/null
@@ -1 +0,0 @@
-texinfo/png/
\ No newline at end of file
index ffc8eeb2405d481d7495e9a68179c83328c3fa32..272c4581530565690d4940881d92d6d9bebed7bb 100644 (file)
@@ -1,7 +1,7 @@
 @c ------------------------------------------------------------------
 @chapter mglData class
 
-Class for working with data array. This class is defined in @code{#include <mgl/mgl_data.h>}. The class has functions for easy and safe allocation, resizing, loading and saving, modifying of data arrays. Also it can numerically differentiate and integrate data, interpolate, fill data by formula and so on. Class supports data with dimensions up to 3 (like function of 3 variables -- x,y,z). The internal representation of numbers is float. Float type was chosen because it has smaller size in memory and usually it has enough precision in plotting purposes.
+Class for working with data array. This class is defined in @code{#include <mgl/mgl_data.h>}. The class has functions for easy and safe allocation, resizing, loading and saving, modifying of data arrays. Also it can numerically differentiate and integrate data, interpolate, fill data by formula and so on. Class supports data with dimensions up to 3 (like function of 3 variables -- x,y,z). The internal representation of numbers is float. Float type was chosen because it has smaller size in memory and usually it has enough precision in plotting purposes. You can change it by selecting option @code{--enable-double} at the library configuring (@pxref{Installation and usage}).
 
 @menu
 * Public variables::            
index 7d050044e3e9ea387e81dc479e2694b89eda607b..56cbecf6a68ea43a516e9b3e9f47b8e4eeb76158 100644 (file)
@@ -1,7 +1,7 @@
 @c ------------------------------------------------------------------
 @chapter Класс mglData
 
-Это класс для работы с массивами данных, определенный в @code{#include <mgl/mgl_data.h>}. Он содержит функции для выделения памяти и изменения размера данных, чтения данных из файла, численного дифференцирования/интегрирования/интерполяции и пр., заполнения по текстовой формуле и т.д. Класс позволяет работать с данными размерности не более 3 (как функции от трех переменных -- x,y,z). По умолчанию внутреннее представление данных -- float, выбранный в силу меньшего размера занимаемой памяти и достаточной для построения графиков точности. Базовый тип можно сменить на этапе установки (@pxref{Installation and using}) указав опцию @code{--enable-double}. Однако, в дальнейшем в документации будет использован тип @code{float}.
+Это класс для работы с массивами данных, определенный в @code{#include <mgl/mgl_data.h>}. Он содержит функции для выделения памяти и изменения размера данных, чтения данных из файла, численного дифференцирования/интегрирования/интерполяции и пр., заполнения по текстовой формуле и т.д. Класс позволяет работать с данными размерности не более 3 (как функции от трех переменных -- x,y,z). По умолчанию внутреннее представление данных -- float, выбранный в силу меньшего размера занимаемой памяти и достаточной для построения графиков точности. Базовый тип можно сменить на этапе установки (@pxref{Installation and usage}) указав опцию @code{--enable-double}. Однако, в дальнейшем в документации будет использован тип @code{float}.
 
 @menu
 * Public variables::            
index ad255fce2cf2d516d6eb7c74bc86c4fb13488f49..b7bfa288d613db8e7f4c9bdd0548f15cd07fbbe0 100755 (executable)
@@ -14,6 +14,8 @@ for filename in glob.glob('./*ru.html/*html'):
             fpout.write(line)
             continue
         if re.search('<head>',line): beginskip=0
+        if re.search('<meta name=\"keywords"\"',line): continue
+        if re.search('<meta name=\"description\"',line): continue
         if re.search('<meta name=\"distribution\" content=\"global\">',line): continue
         if re.search('<meta name=\"Generator\" content=\"texi2html',line): continue
         if beginskip==0 : fpout.write(line)
index feb038ea9435d0ec492d798b86fc99e0e241ceb7..05aec1ebc34197c049b6693226414aa386914870 100644 (file)
@@ -65,14 +65,19 @@ The mglFormula class allows a fast evaluation of a textual mathematical expressi
 @node Installation and usage, General concepts, MathGL features, Overview
 @section Installation and usage
 
-MathGL can be installed in 3 different ways.
+MathGL can be installed in 4 different ways.
 @enumerate
 @item
 Compile from sources. The standard script for autoconf/automake tool is included in the library beginning from version 1.2.1. To run it, one should execute 3 commands: @code{./configure} after it @code{make} and @code{make install} with root/sudo rights. Sometimes after installation you may need to update the library list -- just execute @code{ldconfig} with root/sudo rights.
 
 Script @code{./configure} have several additional options which are switched off by default. They are: @code{--enable-fltk, --enable-glut, --enable-qt} for ebabling FLTK, GLUT and/or Qt windows; @code{--enable-jpeg, --enable-tiff, --enable-hdf5} for enabling corresponding file formats; @code{--enable-all} for enabling all additional features. For using @code{double} as base internal data type use option @code{--enable-double}. For enabling language interfaces use @code{--enable-python, --enable-octave} or @code{--enable-langall} for all languages. The full list of options can be viewed by command @code{./configure --help}.
+
+@item
+One can use cmake for building MathGL library if autoconf/automake tools are absent. For example, it is the typical situation for Windows, MacOS and/or using of non-GNU compilers. However the making of MathGL documentation is switched off for this case. You can use WYSIWYG tools to change cmake build options.
+
 @item
-Use a precompiled binary. There are binaries for MinGW (platform Win32). For a precompiled variant one needs only to unpack the archive to the location of the compiler (or in any other folder and setup paths). By default, precompiled versions include the support of GSL (www.gsl.org) and PNG. So, one needs to have these libraries installed on system.
+Use a precompiled binary. There are binaries for MinGW (platform Win32). For a precompiled variant one needs only to unpack the archive to the location of the compiler (or in any other folder and setup paths). By default, precompiled versions include the support of GSL (www.gsl.org) and PNG. So, one needs to have these libraries installed on system (it can be found, for example, at @uref{http://gnuwin32.sourceforge.net/packages.html})..
+
 @item
 Install precompiled versions from standard packages (RPM, deb, DevPak and so on, see @uref{http://mathgl.sf.net/download.html, Download} section at homepage).
 @end enumerate
index 7e6277b6809683864f229a4affcb2697f5b984ae..31c4652bbf3e33d57a976f5c6c2295e73518f657 100644 (file)
@@ -18,7 +18,7 @@ MathGL это ...
 @menu
 * Why I have written MathGL?::  
 * MathGL features::
-* Installation and using::
+* Installation and usage::
 * General concepts::
 * FAQ::
 * Interfaces::
@@ -32,7 +32,7 @@ MathGL это ...
 
 На данный момент (версия @value{VERSION}) MathGL это более 20000 строк кода, более 40 основных типов графиков для одно-, двух- и трехмерных массивов, возможность экспорта в растровые и векторные (EPS или SVG) файлы, интерфейс для OpenGL и возможность запуска в консольном режиме, функции для обработки данных и даже простейший командный (интерпретируемый) язык MGL для упрощения построения графиков. Кроме того, есть несколько типов прозрачности, гладкое освещение, векторные шрифты, TeX-ие команды в надписях, произвольные криволинейные системы координат и прочие полезные мелочи (см. раздел pictures на @uref{http://mathgl.sf.net/, домашней странице}). Ну, и, естественно, полная переносимость библиотеки и ее свободное распространение под лицензией GPL v.2.0 или более поздней.
 
-@node MathGL features, Installation and using, Why I have written MathGL?, Overview
+@node MathGL features, Installation and usage, Why I have written MathGL?, Overview
 @section Возможности MathGL
 
 Библиотека MathGL позволяет строить широкий класс графиков, включая:
@@ -63,24 +63,28 @@ MathGL это ...
 
 Для @emph{быстрого} вычисления значения выражения, заданного текстовой строкой, используется класс mglFormula (@pxref{mglFormula class}). Он основан на компиляции строки в древоподобную структуру при создании экземпляра класса. На этапе вычисления происходит быстрый обход дерева с выдачей результата для конкретных значений переменных. Помимо изменения значений массива данных, текстовые формулы используются для рисования в @emph{произвольной} криволинейной системе координат. Набор таких координат ограничивается только фантазией пользователя, а не фиксированным числом (типа полярной, параболической, цилиндрической и т.д.).
 
-@node Installation and using, General concepts, MathGL features, Overview
+@node Installation and usage, General concepts, MathGL features, Overview
 @section Установка MathGL
 
-Установка библиотеки возможна тремя способами.
+Установка библиотеки возможна 4-мя способами.
 @enumerate
 @item
 Скомпилировать библиотеку непосредственно из исходных файлов. С библиотекой поставляется стандартный скрипт для autoconf/automake. Для его запуска достаточно в командной строке выполнить 3 команды: сначала @code{./configure} далее @code{make} и, наконец, с правами суперпользователя @code{make install}. Иногда после компиляции библиотеки может потребоваться обновление списка библиотека в системе -- выполните команду @code{ldconfig} с правами суперпользователя.
 
 Скрипт @code{./configure} имеет несколько дополнительных опций, которые по умолчанию отключены. К их числу относятся: @code{--enable-fltk, --enable-glut, --enable-qt} для поддержки FLTK, GLUT и/или Qt окон; @code{--enable-jpeg, --enable-tiff, --enable-hdf5} для поддержки соответствующих форматов; @code{--enable-all} для включения всех возможностей. Для использования типа @code{double} для внутреннего хранения данных используйте опцию @code{--enable-double}. Для создания интерфейсов к другим языкам (кроме С/Фортран/MGL) используйте опции @code{--enable-python, --enable-octave} или @code{--enable-langall} для всех поддерживаемых языков. Полный список опций можно увидеть, выполнив @code{./configure --help}.
+
+@item
+В случае если инструменты autoconf/automake не доступны (например, при компиляции под Windows или MacOS), то можно воспользоваться системой сборки cmake. В данном случае будет недоступна сборка документации, но сборка самой библиотеки и утилит возможна и не на GNU компиляторах.
+
 @item
-Использовать предварительно скомпилированные файлы -- с библиотекой поставляются файлы для MinGW (платформа Win32). В скомпилированной версии достаточно распаковать заголовочные файлы в папку с заголовочными файлами и библиотеку libmgl.a в папку с библиотеками. По умолчанию, скомпилированная версия включают поддержку GSL (www.gsl.org) и PNG. Соответственно, при сборке программы эти библиотеки должны быть установлены (их можно найти на @uref{http://gnuwin32.sf.net}).
+Использовать предварительно скомпилированные файлы -- с библиотекой поставляются файлы для MinGW (платформа Win32). В скомпилированной версии достаточно распаковать заголовочные файлы в папку с заголовочными файлами и библиотеку libmgl.a в папку с библиотеками. По умолчанию, скомпилированная версия включают поддержку GSL (www.gsl.org), PNG, GIF и JPEG. Соответственно, при сборке программы эти библиотеки должны быть установлены (их можно найти на @uref{http://gnuwin32.sourceforge.net/packages.html}).
 @item
 Установить из стандартных пакетов (RPM, deb, DevPak и пр.). 
 @end enumerate
 
 При сборке пользовательской программы достаточно указать ключ @code{-lmgl} для компиляции в консольной программе или с использованием внешней графической библиотеки. При использовании окон FLTK или GLUT надо указать/добавить ключи, включающие соответствующие библиотеки -- @code{-lmgl-fltk} или @code{-lmgl-glut}. Для использования в Фортране дополнительно надо указать опцию @code{-lstdc++} для библиотек C++.
 
-@node General concepts, FAQ, Installation and using, Overview
+@node General concepts, FAQ, Installation and usage, Overview
 @section Основные принципы
 
 Возможности библиотеки MathGL довольно богаты -- число только основных типов графиков превышает 50 видов. Кроме того, есть функции для обработки данных, настройки вида графика и пр. и пр. Тем не менее, я старался придерживаться единого стиля в порядке аргументов функций и способе их ``настройки''. В основном все ниже сказанное относится к функциям рисования различных графиков.
index 8acbe2ec3510d503bc3329e74ef513a3499faf9c..80e51434070da5ec177111993f9a70563ae73ffc 100644 (file)
@@ -7,4 +7,5 @@ CLEANFILES = $(png_images)
 
 $(png_images): hotdogs.pts # $(top_builddir)/examples/mgl_example
        $(top_builddir)/examples/mgl_example -kind=${@:.png=}
+       cp ${@} ../../png/
        touch $(srcdir)/../mathgl.texi
index 07439f3c09330101b48c6149cfa0cd35330c33ef..b4d2d2919535c104a1126dc1580002c120aa6040 100644 (file)
@@ -461,6 +461,7 @@ uninstall-am: uninstall-pngDATA
 
 $(png_images): hotdogs.pts # $(top_builddir)/examples/mgl_example
        $(top_builddir)/examples/mgl_example -kind=${@:.png=}
+       cp ${@} ../../png/
        touch $(srcdir)/../mathgl.texi
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.