--- /dev/null
- Timestamp=2011,4,26,1,58,58
+[Dolphin]
-
- [Settings]
- ShowDotFiles=true
++Timestamp=2011,4,26,2,6,20
+Version=2
++<<<<<<< HEAD
++=======
+ 1.11.1 Released 18 March 2011
+ - Improve IDTF export
+ - Minor changes and bugfixes
+
++>>>>>>> upstream/1.11.1.1
1.11.0.1 Released 15 November 2010
- Bugfix for reading textual data files (mostly under win32).
- Docs update.
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!!!
++<<<<<<< HEAD
++=======
+ 7. Pipes in mgl2png, mgl2eps, ... (stdin, stdout)
+ 8. Multithreading
+ 9. Number of proc from get_nprocs_conf() (#include <sys/sysinfo.h>)
+ 10.Arbitrary line/curve coordinates if z=nan
+ 11.Add apperture for light (partially is done)
+ 12.Add diffusive light (no dependence of normale but have direction)
+ 13. утилиты (mgl2png и пр.) вылетают, если в коментариях русские буквы
+ 14. Last ' isn't send as call argument!!!
+ 15. MGL docs -- text what formulas are applicable for scalars too.
+ 16. Manual labels in string with '\n' separator
+ 17. Venn() diagram-like -- transparent circles with manual colors and sizes -- may be a variant of Mark()???
++>>>>>>> upstream/1.11.1.1
11. Update STIX fonts (new release) + create PWT fonts
12. Problem with \calB and so on (\calH, ...) -- they are present only in italic font :(.
29. Multithreading by "subplots" -- for parser first of all !!!
30. Sample about pthread using.
++<<<<<<< HEAD
+
++=======
+ 31. Add help about cmake and GIF/JPEG to the "Installation and using"
++>>>>>>> upstream/1.11.1.1
32. Regroup pictures in WWW by big classes + combo plots
=========================
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
++<<<<<<< HEAD
+# Generated by GNU Autoconf 2.67 for mathgl 1.10.
++=======
+ # Generated by GNU Autoconf 2.67 for mathgl 1.11.
++>>>>>>> upstream/1.11.1.1
#
# Report bugs to <mathgl.abalakin@gmail.com>.
#
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
++<<<<<<< HEAD
+mathgl configure 1.10
++=======
+ mathgl configure 1.11
++>>>>>>> upstream/1.11.1.1
generated by GNU Autoconf 2.67
Copyright (C) 2010 Free Software Foundation, Inc.
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
++<<<<<<< HEAD
+It was created by mathgl $as_me 1.10, which was
++=======
+ It was created by mathgl $as_me 1.11, which was
++>>>>>>> upstream/1.11.1.1
generated by GNU Autoconf 2.67. Invocation command line was
$ $0 $@
++<<<<<<< HEAD
+MGL_RELEASE=1.10
++=======
+ MGL_RELEASE=1.11
++>>>>>>> upstream/1.11.1.1
else
lt_cv_nm_interface="BSD nm"
echo "int some_variable = 0;" > conftest.$ac_ext
++<<<<<<< HEAD
+ (eval echo "\"\$as_me:5506: $ac_compile\"" >&5)
+ (eval "$ac_compile" 2>conftest.err)
+ cat conftest.err >&5
+ (eval echo "\"\$as_me:5509: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+ cat conftest.err >&5
+ (eval echo "\"\$as_me:5512: output\"" >&5)
++=======
+ (eval echo "\"\$as_me:5521: $ac_compile\"" >&5)
+ (eval "$ac_compile" 2>conftest.err)
+ cat conftest.err >&5
+ (eval echo "\"\$as_me:5524: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+ cat conftest.err >&5
+ (eval echo "\"\$as_me:5527: output\"" >&5)
++>>>>>>> upstream/1.11.1.1
cat conftest.out >&5
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
lt_cv_nm_interface="MS dumpbin"
;;
*-*-irix6*)
# Find out which ABI we are using.
++<<<<<<< HEAD
+ echo '#line 6715 "configure"' > conftest.$ac_ext
++=======
+ echo '#line 6730 "configure"' > conftest.$ac_ext
++>>>>>>> upstream/1.11.1.1
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
++<<<<<<< HEAD
+ (eval echo "\"\$as_me:8763: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:8767: \$? = $ac_status" >&5
++=======
+ (eval echo "\"\$as_me:8778: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:8782: \$? = $ac_status" >&5
++>>>>>>> upstream/1.11.1.1
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
++<<<<<<< HEAD
+ (eval echo "\"\$as_me:9102: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:9106: \$? = $ac_status" >&5
++=======
+ (eval echo "\"\$as_me:9117: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:9121: \$? = $ac_status" >&5
++>>>>>>> upstream/1.11.1.1
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
++<<<<<<< HEAD
+ (eval echo "\"\$as_me:9207: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:9211: \$? = $ac_status" >&5
++=======
+ (eval echo "\"\$as_me:9222: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:9226: \$? = $ac_status" >&5
++>>>>>>> upstream/1.11.1.1
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
++<<<<<<< HEAD
+ (eval echo "\"\$as_me:9262: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:9266: \$? = $ac_status" >&5
++=======
+ (eval echo "\"\$as_me:9277: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:9281: \$? = $ac_status" >&5
++>>>>>>> upstream/1.11.1.1
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
++<<<<<<< HEAD
+#line 11646 "configure"
++=======
+ #line 11661 "configure"
++>>>>>>> upstream/1.11.1.1
#include "confdefs.h"
#if HAVE_DLFCN_H
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
++<<<<<<< HEAD
+#line 11742 "configure"
++=======
+ #line 11757 "configure"
++>>>>>>> upstream/1.11.1.1
#include "confdefs.h"
#if HAVE_DLFCN_H
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
++<<<<<<< HEAD
+ (eval echo "\"\$as_me:13698: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:13702: \$? = $ac_status" >&5
++=======
+ (eval echo "\"\$as_me:13713: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:13717: \$? = $ac_status" >&5
++>>>>>>> upstream/1.11.1.1
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
++<<<<<<< HEAD
+ (eval echo "\"\$as_me:13797: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:13801: \$? = $ac_status" >&5
++=======
+ (eval echo "\"\$as_me:13812: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:13816: \$? = $ac_status" >&5
++>>>>>>> upstream/1.11.1.1
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
++<<<<<<< HEAD
+ (eval echo "\"\$as_me:13849: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:13853: \$? = $ac_status" >&5
++=======
+ (eval echo "\"\$as_me:13864: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:13868: \$? = $ac_status" >&5
++>>>>>>> upstream/1.11.1.1
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
hdf4=false
fi
++<<<<<<< HEAD
+ac_fn_c_check_header_mongrel "$LINENO" "hdf/mfhdf.h" "ac_cv_header_hdf_mfhdf_h" "$ac_includes_default"
++=======
+ ac_fn_cxx_check_header_mongrel "$LINENO" "hdf/mfhdf.h" "ac_cv_header_hdf_mfhdf_h" "$ac_includes_default"
++>>>>>>> upstream/1.11.1.1
if test "x$ac_cv_header_hdf_mfhdf_h" = x""yes; then :
(test x$all = xtrue || test x$hdf4 = xtrue) && HDF4_FLAGS=-DHAVE_HDF4
else
return 0;
}
_ACEOF
++<<<<<<< HEAD
+if ac_fn_c_try_link "$LINENO"; then :
++=======
+ if ac_fn_cxx_try_link "$LINENO"; then :
++>>>>>>> upstream/1.11.1.1
ac_cv_lib_df_main=yes
else
ac_cv_lib_df_main=no
fi
if test -z "${USE_JPEG_TRUE}" && test -z "${USE_JPEG_FALSE}"; then
as_fn_error $? "conditional \"USE_JPEG\" was never defined.
++<<<<<<< HEAD
++=======
+ Usually this means the macro was only invoked conditionally." "$LINENO" 5
+ fi
+ if test -z "${USE_PDF_TRUE}" && test -z "${USE_PDF_FALSE}"; then
+ as_fn_error $? "conditional \"USE_PDF\" was never defined.
+ Usually this means the macro was only invoked conditionally." "$LINENO" 5
+ fi
+ if test -z "${USE_U3D_TRUE}" && test -z "${USE_U3D_FALSE}"; then
+ as_fn_error $? "conditional \"USE_U3D\" was never defined.
++>>>>>>> upstream/1.11.1.1
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${USE_FLTK_TRUE}" && test -z "${USE_FLTK_FALSE}"; then
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
++<<<<<<< HEAD
+This file was extended by mathgl $as_me 1.10, which was
++=======
+ This file was extended by mathgl $as_me 1.11, which was
++>>>>>>> upstream/1.11.1.1
generated by GNU Autoconf 2.67. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
++<<<<<<< HEAD
+mathgl config.status 1.10
++=======
+ mathgl config.status 1.11
++>>>>>>> upstream/1.11.1.1
configured by $0, generated by GNU Autoconf 2.67,
with options \\"\$ac_cs_config\\"
- AC_INIT([mathgl], [1.10], [mathgl.abalakin@gmail.com])
+ AC_INIT([mathgl], [1.11], [mathgl.abalakin@gmail.com])
+
+ MGL_RELEASE=1.11
+ AC_SUBST(MGL_RELEASE)
+MGL_RELEASE=1.10
+AC_SUBST(MGL_RELEASE)
+
AC_CONFIG_MACRO_DIR([config])
AC_CONFIG_AUX_DIR(config)
AC_CONFIG_SRCDIR(mgl)
//-----------------------------------------------------------------------------
void smgl_sample5(mglGraph *gr) // pen styles
{
++<<<<<<< HEAD
+ if(type==5) gr->Puts(mglPoint(0,1.2),"line styles not supported","rL");
++=======
+ if(type==5 || type==9 || type==10) gr->Puts(mglPoint(0,1.2),"line styles not supported","rL");
++>>>>>>> upstream/1.11.1.1
mreal d,x1,x2,x0,y=0.95;
d=0.3, x0=0.2, x1=0.5, x2=0.6;
gr->Line(mglPoint(x0,1-0*d),mglPoint(x1,1-0*d),"k-"); gr->Puts(mglPoint(x2,y-0*d),"Solid '-'","rL");
gr->Box(); gr->Surf(a);
gr->SubPlot(2,1,1); gr->Rotate(40,60-3);
gr->Box(); gr->Surf(a);
++<<<<<<< HEAD
++=======
+ gr->Rotate(0,0); // for unrotate in IDTF
++>>>>>>> upstream/1.11.1.1
}
//-----------------------------------------------------------------------------
void smgl_tile(mglGraph *gr)
/// Set angle of view indepently from mglGraph::Rotate().\r
virtual void View(mreal tetx,mreal tetz,mreal tety=0);
inline int GetWarn() { return WarnCode; };\r
++<<<<<<< HEAD
+ void DefaultPlotParam(); ///< Set default parameter for plotting\r
++=======
+ virtual void DefaultPlotParam(); ///< Set default parameter for plotting\r
++>>>>>>> upstream/1.11.1.1
/// Zoom in or zoom out (if Zoom(0, 0, 1, 1)) a part of picture\r
void Zoom(mreal x1, mreal y1, mreal x2, mreal y2);\r
/// Clear transformation matrix.\r
bool Alpha(bool enable);\r
bool Light(bool enable);\r
void Light(int n, bool enable);\r
- void Light(int n,mglPoint p, mglColor c=WC, mreal br=0.5, bool infty=true);\r
+ void Light(int n,mglPoint p, mglColor c=WC, mreal br=0.5, bool infty=true, mreal ap=0);\r
\r
++<<<<<<< HEAD
+ void InPlot(mreal x1,mreal x2,mreal y1,mreal y2, bool rel=false);\r
++=======
+ virtual void InPlot(mreal x1,mreal x2,mreal y1,mreal y2, bool rel=false);\r
+ virtual void DefaultPlotParam(); ///< Set default parameter for plotting\r
+ virtual void Rotate(mreal TetX,mreal TetZ,mreal TetY=0);\r
++>>>>>>> upstream/1.11.1.1
void StickPlot(int num, int i, mreal tet, mreal phi);\r
void Aspect(mreal Ax,mreal Ay,mreal Az);\r
void RotateN(mreal Tet,mreal x,mreal y,mreal z);\r
//#ifdef WIN32
#ifdef _MSC_VER
++<<<<<<< HEAD
++=======
+ #define chdir _chdir // BORLAND has chdir
++>>>>>>> upstream/1.11.1.1
#include <float.h>
const unsigned long mgl_nan[2] = {0xffffffff, 0x7fffffff};
#define NANd (*(double*)mgl_nan)
#define NAN NANd
#else
#define NAN NANd
++<<<<<<< HEAD
+#endif
+#ifdef _MSC_VER
+#define chdir _chdir // BORLAND has chdir
++=======
++>>>>>>> upstream/1.11.1.1
#endif
#endif
@USE_HDF5_TRUE@am__append_8 = $(HDF5_LIBS)
@USE_GIF_TRUE@am__append_9 = $(GIF_LIBS)
@USE_JPEG_TRUE@am__append_10 = $(JPEG_LIBS)
++<<<<<<< HEAD
++=======
+ @USE_U3D_TRUE@am__append_11 = $(U3D_LIBS)
++>>>>>>> upstream/1.11.1.1
subdir = mgl
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@USE_HDF5_TRUE@am__DEPENDENCIES_5 = $(am__DEPENDENCIES_1)
@USE_GIF_TRUE@am__DEPENDENCIES_6 = $(am__DEPENDENCIES_1)
@USE_JPEG_TRUE@am__DEPENDENCIES_7 = $(am__DEPENDENCIES_1)
++<<<<<<< HEAD
+libmgl_la_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_3) \
+ $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_5) \
+ $(am__DEPENDENCIES_6) $(am__DEPENDENCIES_7)
++=======
+ @USE_U3D_TRUE@am__DEPENDENCIES_8 = $(am__DEPENDENCIES_1)
+ libmgl_la_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_3) \
+ $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_5) \
+ $(am__DEPENDENCIES_6) $(am__DEPENDENCIES_7) \
+ $(am__DEPENDENCIES_8)
++>>>>>>> upstream/1.11.1.1
am_libmgl_la_OBJECTS = libmgl_la-mgl_data_cf.lo libmgl_la-mgl_axis.lo \
libmgl_la-mgl_data_png.lo libmgl_la-mgl_zb2.lo \
libmgl_la-mgl_c.lo libmgl_la-mgl_eps.lo libmgl_la-mgl_font.lo \
$(am__append_4)
libmgl_la_LIBADD = $(PNG_LIBS) $(GL_LIBS) $(LOPENMP) $(am__append_5) \
$(am__append_6) $(am__append_7) $(am__append_8) \
++<<<<<<< HEAD
+ $(am__append_9) $(am__append_10)
++=======
+ $(am__append_9) $(am__append_10) $(am__append_11)
++>>>>>>> upstream/1.11.1.1
libmgl_la_LDFLAGS = -no-undefined -version-info $(MGL_CURRENT):$(MGL_REVISION):$(MGL_AGE)
libmgl_la_CXXFLAGS = $(WIDGETS) -DMGL_FONT_PATH=\"$(datadir)/$(PACKAGE)/fonts/\" \
-DMOD_LIB_DIR=\"$(libdir)/mgl/\" $(HDF5_FLAGS) $(HDF4_FLAGS) $(GIF_FLAGS) $(JPEG_FLAGS) \
* mgl_ab.cpp is part of Math Graphic Library\r
* Copyright (C) 2007 Alexey Balakin <balakin@appl.sci-nnov.ru> *\r
* *\r
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU Library General Public License as *
- * published by the Free Software Foundation; either version 3 of the *
- * License, or (at your option) any later version. *
- * *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
- * GNU General Public License for more details. *
- * *
- * You should have received a copy of the GNU Library General Public *
- * License along with this program; if not, write to the *
- * Free Software Foundation, Inc., *
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
- ***************************************************************************/
+ * This program is free software; you can redistribute it and/or modify *\r
+ * it under the terms of the GNU Library General Public License as *\r
+ * published by the Free Software Foundation; either version 3 of the *\r
+ * License, or (at your option) any later version. *\r
+ * *\r
+ * This program is distributed in the hope that it will be useful, *\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *\r
+ * GNU General Public License for more details. *\r
+ * *\r
+ * You should have received a copy of the GNU Library General Public *\r
+ * License along with this program; if not, write to the *\r
+ * Free Software Foundation, Inc., *\r
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *\r
+ ***************************************************************************/\r
#include <stdlib.h>\r
#include <time.h>\r
-#include <wchar.h>\r
+#include <wchar.h>
\r
#include "mgl/mgl_ab.h"\r
#define imax(a,b) (a)>(b) ? (a) : (b)\r
//-----------------------------------------------------------------------------\r
mglGraphAB::~mglGraphAB()\r
{ if(G) { delete []G; delete []G4; delete []OI; } }\r
++<<<<<<< HEAD
++=======
+ //-----------------------------------------------------------------------------\r
+ void mglGraphAB::DefaultPlotParam()\r
+ {\r
+ mglGraph::DefaultPlotParam();\r
+ }\r
+ //-----------------------------------------------------------------------------\r
+ void mglGraphAB::Rotate(mreal TetX,mreal TetZ,mreal TetY)\r
+ {\r
+ mglGraph::Rotate( TetX,TetZ,TetY );\r
+ }\r
++>>>>>>> upstream/1.11.1.1
//-----------------------------------------------------------------------------\r
void mglGraphAB::Pop()\r
{\r
}\r
//-----------------------------------------------------------------------------\r
void mglGraphAB::Putsw(mglPoint p, const wchar_t *wcs, const char *font, mreal size, char dir, mreal sh)\r
- {
+ {\r
static int nl_shift = 0;\r
- static int cgid=1; StartGroup("Putsw",cgid++);
+ static int cgid=1; StartGroup("Putsw",cgid++);\r
if(font && strchr(font, 'A')) { Labelw(p.x, p.y, wcs,font,size,false); return; }\r
++<<<<<<< HEAD
+ if(font && strchr(font, 'a')) { Labelw(p.x, p.y, wcs,font,size,true); return; }
+
+ wchar_t *wcl;
+ unsigned wn=0;
+ const wchar_t *wnl=0;
+ for(wn=0;wn<wcslen(wcs);wn++)
+ if(wcs[wn]=='\n' || (wcs[wn]=='\\' && wcs[wn+1]=='n' && strchr(" \t,.{[]1234567890",wcs[wn+2])))
+ { wnl = wcs+wn; break; }
+ if(wnl)
+ {
+ wcl = new wchar_t[wn+1]; memcpy(wcl,wcs,wn*sizeof(wchar_t));
+ wcl[wn]=0; Putsw(p, wcl, font, size, dir, sh);
+ wnl = wcs[wn]=='\n'?wnl+1:wnl+2;
+ if(*wnl<=' ') wnl++;
+ nl_shift++; Putsw(p, wnl, font, size, dir, sh); nl_shift--;
+ return;
+ }
++=======
+ if(font && strchr(font, 'a')) { Labelw(p.x, p.y, wcs,font,size,true); return; }\r
+ \r
+ wchar_t *wcl;\r
+ unsigned wn=0;\r
+ const wchar_t *wnl=0;\r
+ for(wn=0;wn<wcslen(wcs);wn++)\r
+ if(wcs[wn]=='\n' || (wcs[wn]=='\\' && wcs[wn+1]=='n' && strchr(" \t,.{[]1234567890",wcs[wn+2])))\r
+ { wnl = wcs+wn; break; }\r
+ if(wnl)\r
+ {\r
+ wcl = new wchar_t[wn+1]; memcpy(wcl,wcs,wn*sizeof(wchar_t));\r
+ wcl[wn]=0; Putsw(p, wcl, font, size, dir, sh);\r
+ wnl = wcs[wn]=='\n'?wnl+1:wnl+2;\r
+ if(*wnl<=' ') wnl++;\r
+ nl_shift++; Putsw(p, wnl, font, size, dir, sh); nl_shift--;\r
+ return;\r
+ }\r
++>>>>>>> upstream/1.11.1.1
\r
bool upside = ( (((_sx==-1) ^ (Org.y==Max.y || Org.z==Max.z)) && (dir=='x' || dir=='X')) ||\r
(((_sy==-1) ^ (Org.x==Max.x || Org.z==Max.z)) && (dir=='y' || dir=='Y')) ||\r
strcat(font1,ch);\r
}\r
}\r
++<<<<<<< HEAD
+ zoomx1=x1; zoomx2=x2; zoomy1=y1; zoomy2=y2;
++=======
+ zoomx1=x1; zoomx2=x2; zoomy1=y1; zoomy2=y2;\r
++>>>>>>> upstream/1.11.1.1
yPos -= nl_shift*0.11/PlotFactor*fsize;\r
fnt->Puts(wcs,font1,col);\r
Pop(); delete []font1; EndGroup();\r
static int cgid=1; StartGroup("Legend",cgid++);\r
mreal pp[15], r=GetRatio(), rh, rw, s3=PlotFactor;\r
if(size<=0) size = -size*FontSize;\r
++<<<<<<< HEAD
+ if(!font || !(*font)) font="L";
++=======
+ if(!font || !(*font)) font="L";\r
++>>>>>>> upstream/1.11.1.1
char *pA, *ff = new char[strlen(font)+1]; strcpy(ff,font);\r
llen *= 1.5;\r
\r
w = w>j ? w:j;\r
}\r
w = (w + llen*1.1f); // add space for lines\r
++<<<<<<< HEAD
+
+ bool rel = true;
+ if((pA=strchr(ff,'A')))
+ {
+ *pA = 'L';
+ rel = false;
++=======
+ \r
+ bool rel = true;\r
+ if((pA=strchr(ff,'A')))\r
+ {\r
+ *pA = 'L';\r
+ rel = false;\r
++>>>>>>> upstream/1.11.1.1
}\r
Push(); Identity(rel); // memcpy(B,B1,9*sizeof(mreal));\r
if(LegendBox) // draw bounding box\r
// ScalePoint(pp[0],pp[1],pp[2]); ScalePoint(pp[3],pp[4],pp[5]); ScalePoint(pp[6],pp[7],pp[8]);\r
\r
pPos=0; curv_plot(2,pp,0);\r
++<<<<<<< HEAD
+ if(m) for(int j=0;j<LegendMarks;j++)
+ {
+ pp[8] = s3; pp[7] = y+i*h+0.45f*h;\r
+ pp[6] = x+0.1f*llen + (j+1)*0.8f*llen/(1.+LegendMarks);
+// ScalePoint(pp[6],pp[7],pp[8]);
+ Mark(pp[6],pp[7],pp[8],m);
++=======
+ if(m) for(int j=0;j<LegendMarks;j++)\r
+ {\r
+ pp[8] = s3; pp[7] = y+i*h+0.45f*h;\r
+ pp[6] = x+0.1f*llen + (j+1)*0.8f*llen/(1.+LegendMarks);\r
+ // ScalePoint(pp[6],pp[7],pp[8]);\r
+ Mark(pp[6],pp[7],pp[8],m);\r
++>>>>>>> upstream/1.11.1.1
}\r
SelectPen(TranspType!=2 ? "k-1":"w-1");\r
Putsw(mglPoint(x+(style[i][0]!=0?llen:0), y+i*h+0.3f*h, s3), text[i], ff, size);\r
void mglGraph::tricont_line(mreal val, long i, long k1, long k2, long k3, const mglData &x, const mglData &y,
const mglData &z, const mglData &a, mreal zVal)
{
++<<<<<<< HEAD
+ mreal d1,d2,p1[3],p2[3],c1[4],c2[4];
++=======
+ mreal d1,d2,pp[6];
++>>>>>>> upstream/1.11.1.1
mglColor q1,q2,q3;
d1 = _d(val,z.a[k1],z.a[k2]);
d2 = _d(val,z.a[k1],z.a[k3]);
if(d1<0 || d1>1 || d2<0 || d2>1) return;
++<<<<<<< HEAD
+ p1[2] = p2[2] = zVal;
+
+ p1[0] = x.a[k1]*(1-d1)+x.a[k2]*d1;
+ p1[1] = y.a[k1]*(1-d1)+y.a[k2]*d1;
+ if(!ScalePoint(p1[0],p1[1],p1[2])) return;
+ p2[0] = x.a[k1]*(1-d2)+x.a[k3]*d2;
+ p2[1] = y.a[k1]*(1-d2)+y.a[k3]*d2;
+ if(!ScalePoint(p1[0],p1[1],p1[2])) return;
+ if(a.nx==x.nx)
+ {
+ q1 = GetC(a.a[k1]); q2 = GetC(a.a[k2]); q3 = GetC(a.a[k3]);
+ c1[0] = q1.r*(1-d1)+q2.r*d1; c2[0] = q1.r*(1-d2)+q3.r*d2;
+ c1[2] = q1.g*(1-d1)+q2.g*d1; c2[2] = q1.g*(1-d2)+q3.g*d2;
+ c1[3] = q1.b*(1-d1)+q2.b*d1; c2[3] = q1.b*(1-d2)+q3.b*d2;
+ c1[3]=c2[3]=1;\r
+ }
+ else
+ {
+ q1 = GetC(a.a[i]); c1[0]=q1.r; c1[1]=q1.g; c1[2]=q1.b; c1[3]=1;\r
+ memcpy(c2,c1,4*sizeof(mreal));\r
+ }
+ line_plot(p1,p2,c1,c2);
++=======
+ pp[2] = pp[5] = zVal;
+
+ pp[0] = x.a[k1]*(1-d1)+x.a[k2]*d1;
+ pp[1] = y.a[k1]*(1-d1)+y.a[k2]*d1;
+ if(!ScalePoint(pp[0],pp[1],pp[2])) return;
+ pp[3] = x.a[k1]*(1-d2)+x.a[k3]*d2;
+ pp[4] = y.a[k1]*(1-d2)+y.a[k3]*d2;
+ if(!ScalePoint(pp[3],pp[4],pp[5])) return;
+ curv_plot(2,pp,0);
++>>>>>>> upstream/1.11.1.1
}\r
//-----------------------------------------------------------------------------\r
void mglGraph::TriContV(const mglData &v, const mglData &nums, const mglData &x, const mglData &y, const mglData &z, const mglData &a, const char *sch,mreal zVal)\r
k2 = long(nums.a[3*i+1]+0.1); if(k2<0 || k2>=n) continue;\r
k3 = long(nums.a[3*i+2]+0.1); if(k3<0 || k3>=n) continue;
val = isnan(zVal) ? v.a[k] : zVal;
++<<<<<<< HEAD
++=======
+ DefColor(GetC(v.a[k]));
++>>>>>>> upstream/1.11.1.1
tricont_line(v.a[k], i,k1,k2,k3,x,y,z,a,val);\r
tricont_line(v.a[k], i,k2,k1,k3,x,y,z,a,val);\r
tricont_line(v.a[k], i,k3,k2,k1,x,y,z,a,val);\r
}\r
//-----------------------------------------------------------------------------\r
void mglGraph::TriCont(const mglData &nums, const mglData &x, const mglData &y, const mglData &z, const mglData &a, const char *sch, int Num, mreal zVal)\r
++<<<<<<< HEAD
+{\r
++=======
+ {
++>>>>>>> upstream/1.11.1.1
if(Num<1) { SetWarn(mglWarnCnt,"Cont"); return; }\r
mglData v(Num);\r
for(long i=0;i<Num;i++) v.a[i] = Cmin + (Cmax-Cmin)*mreal(i+1)/(Num+1);\r
#include <ctype.h>\r
#include <math.h>\r
#include <string.h>\r
++<<<<<<< HEAD
+#include <zlib.h>\r
++=======
+ #include <zlib.h>
++>>>>>>> upstream/1.11.1.1
#ifdef HAVE_HDF5\r
#include <hdf5.h>\r
#endif\r
#ifdef HAVE_HDF4\r
++<<<<<<< HEAD
+#define intf hdf4_intf\r
+#include <hdf/mfhdf.h>\r
+#undef intf\r
++=======
+ #define intf hdf4_intf
+ #include <hdf/mfhdf.h>
+ #undef intf
++>>>>>>> upstream/1.11.1.1
#endif\r
\r
#ifndef WIN32\r
}\r
fclose(fp);\r
}\r
+ //-----------------------------------------------------------------------------
+ char *mgl_read_gz(gzFile fp)
+ {
+ long size=1024,n=0,m;
+ char *buf=(char*)malloc(size);
+ 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
+char *mgl_read_gz(gzFile fp)\r
+{\r
+ long size=1024,n=0,m;\r
+ char *buf=(char*)malloc(size);\r
+ while((m=gzread(fp,buf+size*n,size))>0)\r
+ {\r
+ if(m<size) { buf[size*n+m]=0; break; }\r
+ n++; buf=(char*)realloc(buf,size*(n+1));\r
+ }\r
+ return buf;\r
+}\r
+//-----------------------------------------------------------------------------\r
bool mglData::Read(const char *fname)\r
{\r
long l=1,m=1,k=1;\r
if(!a) Create(1,1,1);\r
return false;\r
}\r
++<<<<<<< HEAD
+ char *buf = mgl_read_gz(fp);\r
++=======
+ char *buf = mgl_read_gz(fp);
++>>>>>>> upstream/1.11.1.1
nb = strlen(buf); gzclose(fp);\r
\r
bool first=false,com=false;\r
if(buf[i]=='#') while(!isn(buf[i]) && i<nb) i++;\r
ch = buf[i];\r
if(ch>' ' && !first) first=true;\r
++<<<<<<< HEAD
+ if(first && (ch==' ' || ch=='\t') && buf[i+1]>' ') k++;\r
++=======
+ if(first && (ch==' ' || ch=='\t') && buf[i+1]>' ') k++;
++>>>>>>> upstream/1.11.1.1
}\r
first = false;\r
for(i=0;i<nb-1;i++) // determine ny\r
}\r
}\r
else for(i=0;i<nb-1;i++) if(buf[i]=='\f') l++;\r
++<<<<<<< HEAD
+ free(buf);\r
++=======
+ free(buf);
++>>>>>>> upstream/1.11.1.1
return Read(fname,k,m,l);\r
}\r
//-----------------------------------------------------------------------------\r
gzFile fp = gzopen(fname,"r");\r
if(!fp) return false;\r
Create(mx,my,mz);\r
++<<<<<<< HEAD
+ char *buf = mgl_read_gz(fp);\r
++=======
+ char *buf = mgl_read_gz(fp);
++>>>>>>> upstream/1.11.1.1
long nb = strlen(buf); gzclose(fp);\r
\r
register long i=0, j=0, k=0;\r
char *s=buf+j;\r
while(buf[j]>' ' && j<nb) j++;\r
buf[j]=0;\r
++<<<<<<< HEAD
+ a[i] = atof(s);\r
+ i++; if(i>=nx*ny*nz) break;\r
++=======
+ a[i] = atof(s);
+ i++; if(i>=nx*ny*nz) break;
++>>>>>>> upstream/1.11.1.1
}\r
free(buf);\r
return true;\r
gzFile fp = gzopen(fname,"r");\r
if(!fp) return false;\r
nx = ny = nz = 1; NewId();\r
++<<<<<<< HEAD
+ char *buf = mgl_read_gz(fp);\r
++=======
+ char *buf = mgl_read_gz(fp);
++>>>>>>> upstream/1.11.1.1
long nb = strlen(buf); gzclose(fp);\r
\r
register long i=0,j=0;\r
}\r
//-----------------------------------------------------------------------------\r
void mglData::ReadHDF4(const char *fname,const char *data)\r
++<<<<<<< HEAD
+{\r
+#ifdef HAVE_HDF4\r
+ int32 sd = SDstart(fname,DFACC_READ), nn, i;\r
+ if(sd==-1) return; // is not a HDF4 file\r
+ char name[64];\r
+ SDfileinfo(sd,&nn,&i);\r
+ for(i=0;i<nn;i++)\r
+ {\r
+ int32 sds, rank, dims[32], type, attr, in[2]={0,0};\r
+ sds = SDselect(sd,i);\r
+ SDgetinfo(sds,name,&rank,dims,&type,&attr);\r
+ if(!strcmp(name,data)) // as I understand there are possible many datas with the same name\r
+ {\r
+ if(rank==1) Create(dims[0]);\r
+ else if(rank==2) Create(dims[1],dims[0]);\r
+ else if(rank==3) Create(dims[3],dims[1],dims[0]);\r
+ else continue;\r
+ if(type==DFNT_FLOAT32)\r
+ {\r
+ float *b = new float[nx*ny*nz];\r
+ SDreaddata(sds,in,0,dims,b);\r
+ for(long j=0;j<nx*ny*nz;j++) a[j]=b[j];\r
+ delete []b;\r
+ }\r
+ if(type==DFNT_FLOAT64)\r
+ {\r
+ double *b = new double[nx*ny*nz];\r
+ SDreaddata(sds,in,0,dims,b);\r
+ for(long j=0;j<nx*ny*nz;j++) a[j]=b[j];\r
+ delete []b;\r
+ }\r
+ }\r
+ SDendaccess(sds);\r
+ }\r
+ SDend(sd);\r
+#endif\r
++=======
+ {
+ #ifdef HAVE_HDF4
+ int32 sd = SDstart(fname,DFACC_READ), nn, i;
+ if(sd==-1) return; // is not a HDF4 file
+ char name[64];
+ SDfileinfo(sd,&nn,&i);
+ for(i=0;i<nn;i++)
+ {
+ int32 sds, rank, dims[32], type, attr, in[2]={0,0};
+ sds = SDselect(sd,i);
+ SDgetinfo(sds,name,&rank,dims,&type,&attr);
+ if(!strcmp(name,data)) // as I understand there are possible many datas with the same name
+ {
+ if(rank==1) Create(dims[0]);
+ else if(rank==2) Create(dims[1],dims[0]);
+ else if(rank==3) Create(dims[3],dims[1],dims[0]);
+ else continue;
+ if(type==DFNT_FLOAT32)
+ {
+ float *b = new float[nx*ny*nz];
+ SDreaddata(sds,in,0,dims,b);
+ for(long j=0;j<nx*ny*nz;j++) a[j]=b[j];
+ delete []b;
+ }
+ if(type==DFNT_FLOAT64)
+ {
+ double *b = new double[nx*ny*nz];
+ SDreaddata(sds,in,0,dims,b);
+ for(long j=0;j<nx*ny*nz;j++) a[j]=b[j];
+ delete []b;
+ }
+ }
+ SDendaccess(sds);
+ }
+ SDend(sd);
+ #endif
++>>>>>>> upstream/1.11.1.1
}\r
//-----------------------------------------------------------------------------\r
#ifdef HAVE_HDF5\r
{\r
hid_t hf,hd,hs;\r
hsize_t dims[3];\r
++<<<<<<< HEAD
+ long rank, res = H5Fis_hdf5(fname);\r
++=======
+ long rank, res = H5Fis_hdf5(fname);
++>>>>>>> upstream/1.11.1.1
if(res<=0) { ReadHDF4(fname,data); return; }\r
hf = H5Fopen(fname, H5F_ACC_RDONLY, H5P_DEFAULT); if(hf<0) return;\r
#ifndef H5_USE_16_API\r
hd = H5Dopen(hf,data,H5P_DEFAULT);\r
#else\r
hd = H5Dopen(hf,data);\r
++<<<<<<< HEAD
+#endif\r
++=======
+ #endif
++>>>>>>> upstream/1.11.1.1
if(hd<0) return;\r
hs = H5Dget_space(hd);\r
rank = H5Sget_simple_extent_ndims(hs);\r
void mglc_grad(wchar_t out[1024], long , mglArg *a, int k[10])
{
if(k[0]==1 && k[1]==1 && k[2]==1 && k[3]==1)
++<<<<<<< HEAD
+ mglprintf(out,1024,L"gr->Grad(%s, %s, %s, %s, \"%s\", %d, %g);",
+ a[0].s, a[1].s, a[2].s, a[3].s, k[4]==2?a[4].s:"", k[5]==3?iint(a[5].v):5);
+ else if(k[0]==1 && k[1]==1 && k[2]==1)
+ mglprintf(out,1024,L"gr->Grad(%s, %s, %s, \"%s\", %d, %g);",
+ a[0].s, a[1].s, a[2].s, k[3]==2?a[3].s:"", k[4]==3?iint(a[4].v):5, k[5]==3?a[5].v:NAN);
+ else if(k[0]==1)
+ mglprintf(out,1024,L"gr->Grad(%s, \"%s\", %d, %g);",
++=======
+ mglprintf(out,1024,L"gr->Grad(%s, %s, %s, %s, \"%s\", %d, %g);",
+ a[0].s, a[1].s, a[2].s, a[3].s, k[4]==2?a[4].s:"", k[5]==3?iint(a[5].v):5);
+ else if(k[0]==1 && k[1]==1 && k[2]==1)
+ mglprintf(out,1024,L"gr->Grad(%s, %s, %s, \"%s\", %d, %g);",
+ a[0].s, a[1].s, a[2].s, k[3]==2?a[3].s:"", k[4]==3?iint(a[4].v):5, k[5]==3?a[5].v:NAN);
+ else if(k[0]==1)
+ mglprintf(out,1024,L"gr->Grad(%s, \"%s\", %d, %g);",
++>>>>>>> upstream/1.11.1.1
a[0].s, k[1]==2?a[1].s:"", k[2]==3?iint(a[2].v):5, k[3]==3?a[3].v:NAN);
}
//-----------------------------------------------------------------------------
mglprintf(out,1024,L"%s.Fill(%g, %g, '%c');", a[0].s, a[1].v,a[2].v, k[3]==2?a[3].s[0]:'x');
}
//-----------------------------------------------------------------------------
++<<<<<<< HEAD
+int mgls_fillsample(mglGraph *gr, long , mglArg *a, int k[10])
++=======
+ int mgls_fillsample(mglGraph *, long , mglArg *a, int k[10])
++>>>>>>> upstream/1.11.1.1
{
if(k[0]==1 && k[1]==3 && k[2]==2) a[0].d->FillSample(iint(a[1].v), a[2].s);
else return 1;
else if(k[1]!=3) gr->Light(a[0].v!=0);
else if(k[2]==3 && k[3]==3)
gr->Light(iint(a[0].v),mglPoint(a[1].v,a[2].v,a[3].v),
++<<<<<<< HEAD
+ k[4]==2?a[4].s[0]:'w',k[5]==3?a[5].v:0.5,true);
++=======
+ k[4]==2?a[4].s[0]:'w',k[5]==3?a[5].v:0.5,true,k[6]==3?a[6].v:0);
++>>>>>>> upstream/1.11.1.1
else gr->Light(iint(a[0].v),a[1].v!=0);
return 0;
}
else if(k[0]!=3) return;
else if(k[1]!=3) mglprintf(out,1024,L"gr->Light(%s);", a[0].v!=0 ? "true":"false");
else if(k[2]==3 && k[3]==3)
++<<<<<<< HEAD
+ mglprintf(out,1024,L"gr->Light(%d, mglPoint(%g, %g, %g), '%c', %g, true);", iint(a[0].v), a[1].v, a[2].v, a[3].v, k[4]==2?a[4].s[0]:'w', k[5]==3?a[5].v:0.5);
++=======
+ mglprintf(out,1024,L"gr->Light(%d, mglPoint(%g, %g, %g), '%c', %g, true, %g);",
+ iint(a[0].v), a[1].v, a[2].v, a[3].v, k[4]==2?a[4].s[0]:'w', k[5]==3?a[5].v:0.5, k[6]==3?a[6].v:0);
++>>>>>>> upstream/1.11.1.1
else mglprintf(out,1024,L"gr->Light(%d, %s);", iint(a[0].v), a[1].v!=0 ? "true":"false");
}
//-----------------------------------------------------------------------------
void mglc_squeeze(wchar_t out[1024], long , mglArg *a, int k[10])
{
if(k[0]==1 && k[1]==3)
++<<<<<<< HEAD
+ mglprintf(out,1024,L"%s.Squeeze(%d, %d, %d, %s);", a[0].s, iint(a[1].v),
++=======
+ mglprintf(out,1024,L"%s.Squeeze(%d, %d, %d, %s);", a[0].s, iint(a[1].v),
++>>>>>>> upstream/1.11.1.1
k[2]==3?iint(a[2].v):1, k[3]==3?iint(a[3].v):1, k[4]==3 && a[4].v>0 ? "true":"false");
}
//-----------------------------------------------------------------------------
gr->TriContV(*(a[0].d),*(a[1].d),*(a[2].d),*(a[3].d),*(a[4].d),*(a[5].d),k[6]==2?a[6].s:0,k[7]==3?a[7].v:NAN);
else if(k[0]==1 && k[1]==1 && k[2]==1 && k[3]==1 && k[4]==1)
gr->TriContV(*(a[0].d),*(a[1].d),*(a[2].d),*(a[3].d),*(a[4].d),k[5]==2?a[5].s:0,k[6]==3?a[6].v:NAN);
++<<<<<<< HEAD
+ else if(k[0]==1 && k[1]==1 && k[2]==1 && k[5]==1)
+ gr->TriCont(*(a[0].d),*(a[1].d),*(a[2].d),*(a[3].d),k[4]==2?a[4].s:0,k[5]==3?a[5].v:NAN);
++=======
+ else if(k[0]==1 && k[1]==1 && k[2]==1 && k[3]==1)
+ gr->TriCont(*(a[0].d),*(a[1].d),*(a[2].d),*(a[3].d),k[4]==2?a[4].s:0,7,k[5]==3?a[5].v:NAN);
++>>>>>>> upstream/1.11.1.1
else return 1;
return 0;
}
mglprintf(out,1024,L"gr->TriContV(%s, %s, %s, %s, %s, \"%s\", %g);",
a[0].s, a[1].s, a[2].s, a[3].s, a[4].s, k[5]==2?a[5].s:"",k[6]==3?a[6].v:NAN);
else if(k[0]==1 && k[1]==1 && k[2]==1 && k[3]==1)
++<<<<<<< HEAD
+ mglprintf(out,1024,L"gr->TriCont(%s, %s, %s, %s, \"%s\", %g);",
++=======
+ mglprintf(out,1024,L"gr->TriCont(%s, %s, %s, %s, \"%s\", 7, %g);",
++>>>>>>> upstream/1.11.1.1
a[0].s, a[1].s, a[2].s, a[3].s, k[4]==2?a[4].s:"", k[5]==3?a[5].v:NAN);
}
//-----------------------------------------------------------------------------
a[0].s, a[1].s[0], iint(a[2].v));
}
//-----------------------------------------------------------------------------
++<<<<<<< HEAD
++=======
+ int mgls_triangulate(mglGraph *, long , mglArg *a, int k[10])
+ {
+ if(k[0]==1 && k[1]==1 && k[2]==1 && k[3]==1)
+ *(a[0].d) = mglTriangulation(*(a[1].d), *(a[2].d), *(a[3].d), k[4]==3?a[4].v:0);
+ else if(k[0]==1 && k[1]==1 && k[2]==1)
+ *(a[0].d) = mglTriangulation(*(a[1].d), *(a[2].d), k[3]==3?a[3].v:0);
+ else return 1;
+ return 0;
+ }
+ void mglc_triangulate(wchar_t out[1024], long , mglArg *a, int k[10])
+ {
+ if(k[0]==1 && k[1]==1 && k[2]==1 && k[3]==1)
+ mglprintf(out,1024,L"%s = mglTriangulation(%s, %s, %s, %g);",a[0].s, a[1].s, a[2].s, a[3].s, k[4]==3?a[4].v:0);
+ else if(k[0]==1 && k[1]==1 && k[2]==1)
+ mglprintf(out,1024,L"%s = mglTriangulation(%s, %s, %g);",a[0].s, a[1].s, a[2].s, k[3]==3?a[3].v:0);
+ }
+ //-----------------------------------------------------------------------------
++>>>>>>> upstream/1.11.1.1
mglCommand mgls_base_cmd[] = {
{L"addlegend",L"Add legend entry",L"addlegend 'txt' 'fmt'", mgls_addlegend, mglc_addlegend, false, 2},
{L"addto",L"Add data or number",L"addto Var Dat|Var num", mgls_addto, mglc_addto, false, 3},
{L"transparent",L"Switch off transparency",L"transparent val", mgls_transparent, mglc_transparent, false, 2}, //!!! OLD !!!
{L"transpose",L"Transpose data array",L"transpose Dat ['dir']", mgls_transpose, mglc_transpose, false, 3},
{L"transptype",L"Set type transparency",L"transptype val", mgls_transptype, mglc_transptype, false, 2},
++<<<<<<< HEAD
++=======
+ {L"triangulate",L"Find triangles of randomly placed points",L"triangulate Res Xdat Ydat [er]|Res Xdat Ydat Zdat [er]", mgls_triangulate, mglc_triangulate, true, 3},
++>>>>>>> upstream/1.11.1.1
{L"tricont",L"Draw contour lines for surface of triangles",L"tricont Vdat Idat Xdat Ydat ['fmt']|Vdat Idat Xdat Ydat Zdat ['fmt']|Vdat Idat Xdat Ydat Zdat Cdat ['fmt'] ", mgls_tricont, mglc_tricont, false, 0},
{L"triplot",L"Draw surface of triangles",L"triplot Idat Xdat Ydat ['fmt']|Idat Xdat Ydat Zdat ['fmt']|Idat Xdat Ydat Zdat Cdat ['fmt'] ", mgls_triplot, mglc_triplot, false, 0},
{L"tube",L"Draw curve by tube",L"tube Ydat Rdat ['fmt' zval]|Ydat rval ['fmt' zval]|Xdat Ydat Rdat ['fmt' zval]|Xdat Ydat rval ['fmt' zval]|Xdat Ydat Zdat Rdat ['fmt']|Xdat Ydat Zdat rval ['fmt']", mgls_tube, mglc_tube, false, 0},
{\r
case 'P':\r
p[0] = pp[0]-ss; p[1] = pp[1]-ss; p[3] = pp[0]+ss; p[4] = pp[1]-ss;\r
++<<<<<<< HEAD
+ mglGraphAB::line_plot(p,p+3,CDef,CDef);\r
+ p[0] = pp[0]-ss; p[1] = pp[1]-ss; p[3] = pp[0]-ss; p[4] = pp[1]+ss;\r
+ mglGraphAB::line_plot(p,p+3,CDef,CDef);\r
+ p[0] = pp[0]-ss; p[1] = pp[1]+ss; p[3] = pp[0]+ss; p[4] = pp[1]+ss;\r
+ mglGraphAB::line_plot(p,p+3,CDef,CDef);\r
+ p[0] = pp[0]+ss; p[1] = pp[1]-ss; p[3] = pp[0]+ss; p[4] = pp[1]+ss;\r
+ mglGraphAB::line_plot(p,p+3,CDef,CDef);\r
++=======
+ line_plot(p,p+3,CDef,CDef);\r
+ p[0] = pp[0]-ss; p[1] = pp[1]-ss; p[3] = pp[0]-ss; p[4] = pp[1]+ss;\r
+ line_plot(p,p+3,CDef,CDef);\r
+ p[0] = pp[0]-ss; p[1] = pp[1]+ss; p[3] = pp[0]+ss; p[4] = pp[1]+ss;\r
+ line_plot(p,p+3,CDef,CDef);\r
+ p[0] = pp[0]+ss; p[1] = pp[1]-ss; p[3] = pp[0]+ss; p[4] = pp[1]+ss;\r
+ line_plot(p,p+3,CDef,CDef);\r
++>>>>>>> upstream/1.11.1.1
case '+':\r
p[0] = pp[0]-ss; p[1] = pp[1]; p[3] = pp[0]+ss; p[4] = pp[1];\r
- line_plot(p,p+3,CDef,CDef);\r
+ mglGraphAB::line_plot(p,p+3,CDef,CDef);\r
p[0] = pp[0]; p[1] = pp[1]-ss; p[3] = pp[0]; p[4] = pp[1]+ss;\r
- line_plot(p,p+3,CDef,CDef);\r
+ mglGraphAB::line_plot(p,p+3,CDef,CDef);\r
break;\r
case 'X':\r
p[0] = pp[0]-ss; p[1] = pp[1]-ss; p[3] = pp[0]+ss; p[4] = pp[1]-ss;\r
++<<<<<<< HEAD
+ mglGraphAB::line_plot(p,p+3,CDef,CDef);\r
+ p[0] = pp[0]-ss; p[1] = pp[1]-ss; p[3] = pp[0]-ss; p[4] = pp[1]+ss;\r
+ mglGraphAB::line_plot(p,p+3,CDef,CDef);\r
+ p[0] = pp[0]-ss; p[1] = pp[1]+ss; p[3] = pp[0]+ss; p[4] = pp[1]+ss;\r
+ mglGraphAB::line_plot(p,p+3,CDef,CDef);\r
+ p[0] = pp[0]+ss; p[1] = pp[1]-ss; p[3] = pp[0]+ss; p[4] = pp[1]+ss;\r
+ mglGraphAB::line_plot(p,p+3,CDef,CDef);\r
++=======
+ line_plot(p,p+3,CDef,CDef);\r
+ p[0] = pp[0]-ss; p[1] = pp[1]-ss; p[3] = pp[0]-ss; p[4] = pp[1]+ss;\r
+ line_plot(p,p+3,CDef,CDef);\r
+ p[0] = pp[0]-ss; p[1] = pp[1]+ss; p[3] = pp[0]+ss; p[4] = pp[1]+ss;\r
+ line_plot(p,p+3,CDef,CDef);\r
+ p[0] = pp[0]+ss; p[1] = pp[1]-ss; p[3] = pp[0]+ss; p[4] = pp[1]+ss;\r
+ line_plot(p,p+3,CDef,CDef);\r
++>>>>>>> upstream/1.11.1.1
case 'x':\r
p[0] = pp[0]-ss; p[1] = pp[1]-ss; p[3] = pp[0]+ss; p[4] = pp[1]+ss;\r
- line_plot(p,p+3,CDef,CDef);\r
+ mglGraphAB::line_plot(p,p+3,CDef,CDef);\r
p[0] = pp[0]+ss; p[1] = pp[1]-ss; p[3] = pp[0]-ss; p[4] = pp[1]+ss;\r
- line_plot(p,p+3,CDef,CDef);\r
+ mglGraphAB::line_plot(p,p+3,CDef,CDef);\r
break;\r
case 'S':\r
for(i=long(-ss-1);i<=long(ss+1);i++) for(j=long(-ss-1);j<=long(ss+1);j++)\r
pnt_plot(long(pp[0])+i,long(pp[1])+j,zv,cs);\r
case 'd':\r
p[0] = pp[0]; p[1] = pp[1]-ss; p[3] = pp[0]+ss; p[4] = pp[1];\r
- line_plot(p,p+3,CDef,CDef);\r
+ mglGraphAB::line_plot(p,p+3,CDef,CDef);\r
p[0] = pp[0]+ss; p[1] = pp[1]; p[3] = pp[0]; p[4] = pp[1]+ss;\r
- line_plot(p,p+3,CDef,CDef);\r
+ mglGraphAB::line_plot(p,p+3,CDef,CDef);\r
p[0] = pp[0]; p[1] = pp[1]+ss; p[3] = pp[0]-ss; p[4] = pp[1];\r
- line_plot(p,p+3,CDef,CDef);\r
+ mglGraphAB::line_plot(p,p+3,CDef,CDef);\r
p[0] = pp[0]-ss; p[1] = pp[1]; p[3] = pp[0]; p[4] = pp[1]-ss;\r
- line_plot(p,p+3,CDef,CDef);\r
+ mglGraphAB::line_plot(p,p+3,CDef,CDef);\r
+ break;\r
+ case 'Y':\r
+ p[0] = pp[0]; p[1] = pp[1]-ss; p[3] = pp[0]; p[4] = pp[1];\r
+ mglGraphAB::line_plot(p,p+3,CDef,CDef);\r
+ p[0] = pp[0]-0.8*ss; p[1] = pp[1]+0.6*ss; p[3] = pp[0]; p[4] = pp[1];\r
+ mglGraphAB::line_plot(p,p+3,CDef,CDef);\r
+ p[0] = pp[0]+0.8*ss; p[1] = pp[1]+0.6*ss; p[3] = pp[0]; p[4] = pp[1];\r
+ mglGraphAB::line_plot(p,p+3,CDef,CDef);\r
break;\r
+ case 'Y':\r
+ p[0] = pp[0]; p[1] = pp[1]-ss; p[3] = pp[0]; p[4] = pp[1];\r
+ line_plot(p,p+3,CDef,CDef);\r
+ p[0] = pp[0]-0.8*ss; p[1] = pp[1]+0.6*ss; p[3] = pp[0]; p[4] = pp[1];\r
+ line_plot(p,p+3,CDef,CDef);\r
+ p[0] = pp[0]+0.8*ss; p[1] = pp[1]+0.6*ss; p[3] = pp[0]; p[4] = pp[1];\r
+ line_plot(p,p+3,CDef,CDef);\r
+ break;\r
case '*':\r
p[0] = pp[0]-ss; p[1] = pp[1]; p[3] = pp[0]+ss; p[4] = pp[1];\r
- line_plot(p,p+3,CDef,CDef);\r
+ mglGraphAB::line_plot(p,p+3,CDef,CDef);\r
p[0] = pp[0]-0.6*ss; p[1] = pp[1]-0.8*ss; p[3] = pp[0]+0.6*ss; p[4] = pp[1]+0.8*ss;\r
- line_plot(p,p+3,CDef,CDef);\r
+ mglGraphAB::line_plot(p,p+3,CDef,CDef);\r
p[0] = pp[0]-0.6*ss; p[1] = pp[1]+0.8*ss; p[3] = pp[0]+0.6*ss; p[4] = pp[1]-0.8*ss;\r
- line_plot(p,p+3,CDef,CDef);\r
+ mglGraphAB::line_plot(p,p+3,CDef,CDef);\r
break;\r
case 'T':\r
for(i=long(-ss-1);i<=long(ss+1);i++) for(j=long(-ss/2-1);j<=long(ss+1);j++)\r
pnt_plot(long(pp[0])+j,long(pp[1])+i,zv,cs);\r
case '<':\r
p[0] = pp[0]+ss/2; p[1] = pp[1]-ss; p[3] = pp[0]-ss; p[4] = pp[1];\r
++<<<<<<< HEAD
+ mglGraphAB::line_plot(p,p+3,CDef,CDef);\r
+ p[0] = pp[0]+ss/2; p[1] = pp[1]+ss; p[3] = pp[0]-ss; p[4] = pp[1];\r
+ mglGraphAB::line_plot(p,p+3,CDef,CDef);\r
+ p[0] = p[3] = pp[0]+ss/2; p[1] = pp[1]-ss; p[4] = pp[1]+ss;\r
+ mglGraphAB::line_plot(p,p+3,CDef,CDef);\r
++=======
+ line_plot(p,p+3,CDef,CDef);\r
+ p[0] = pp[0]+ss/2; p[1] = pp[1]+ss; p[3] = pp[0]-ss; p[4] = pp[1];\r
+ line_plot(p,p+3,CDef,CDef);\r
+ p[0] = p[3] = pp[0]+ss/2; p[1] = pp[1]-ss; p[4] = pp[1]+ss;\r
+ line_plot(p,p+3,CDef,CDef);\r
++>>>>>>> upstream/1.11.1.1
break;\r
case 'R':\r
for(i=long(-ss-1);i<=long(ss+1);i++) for(j=long(-ss/2-1);j<=long(ss+1);j++)\r
pnt_plot(long(pp[0])+j,long(pp[1])+i,zv,cs);\r
case '>':\r
p[0] = pp[0]-ss/2; p[1] = pp[1]-ss; p[3] = pp[0]+ss; p[4] = pp[1];\r
++<<<<<<< HEAD
+ mglGraphAB::line_plot(p,p+3,CDef,CDef);\r
+ p[0] = pp[0]-ss/2; p[1] = pp[1]+ss; p[3] = pp[0]+ss; p[4] = pp[1];\r
+ mglGraphAB::line_plot(p,p+3,CDef,CDef);\r
+ p[0] = p[3] = pp[0]-ss/2; p[1] = pp[1]-ss; p[4] = pp[1]+ss;\r
+ mglGraphAB::line_plot(p,p+3,CDef,CDef);\r
++=======
+ line_plot(p,p+3,CDef,CDef);\r
+ p[0] = pp[0]-ss/2; p[1] = pp[1]+ss; p[3] = pp[0]+ss; p[4] = pp[1];\r
+ line_plot(p,p+3,CDef,CDef);\r
+ p[0] = p[3] = pp[0]-ss/2; p[1] = pp[1]-ss; p[4] = pp[1]+ss;\r
+ line_plot(p,p+3,CDef,CDef);\r
++>>>>>>> upstream/1.11.1.1
break;\r
case 'O':\r
for(i=long(-ss);i<=long(ss);i++) for(j=long(-ss);j<=long(ss);j++)\r
PostScale(p,3);\r
p[2]+=pw; p[5]+=pw; p[8]+=pw;
bool ul=UseLight; UseLight=false;\r
++<<<<<<< HEAD
+ mglGraphAB::trig_plot(p,p+3,p+6,c,c,c);
++=======
+ mglGraphAB::trig_plot(p,p+3,p+6,c,c,c);\r
++>>>>>>> upstream/1.11.1.1
UseLight=ul;\r
}\r
}\r
SUBDIRS = png .
CLEANFILES = mathgl_en.info mathgl_en.info-1 mathgl_en.info-2 mathgl_en.info-3 mgl_en.info \
++<<<<<<< HEAD
+mathgl_ru.info mathgl_ru.info-1 mathgl_ru.info-2 mathgl_ru.info-3 mathgl_ru.info-4 mgl_ru.info \
+mgl_ru.info-*
++=======
+ mathgl_ru.info mathgl_ru.info-1 mathgl_ru.info-2 mathgl_ru.info-3 mathgl_ru.info-4 mgl_ru.info
++>>>>>>> upstream/1.11.1.1
MAKEINFOHTML = texi2html
TEXI2PDF = texi2pdf
top_srcdir = @top_srcdir@
SUBDIRS = png .
CLEANFILES = mathgl_en.info mathgl_en.info-1 mathgl_en.info-2 mathgl_en.info-3 mgl_en.info \
++<<<<<<< HEAD
+mathgl_ru.info mathgl_ru.info-1 mathgl_ru.info-2 mathgl_ru.info-3 mathgl_ru.info-4 mgl_ru.info \
+mgl_ru.info-*
++=======
+ mathgl_ru.info mathgl_ru.info-1 mathgl_ru.info-2 mathgl_ru.info-3 mathgl_ru.info-4 mgl_ru.info
++>>>>>>> upstream/1.11.1.1
MAKEINFOHTML = texi2html
TEXI2PDF = texi2pdf
@end quotation
@end copying
++<<<<<<< HEAD
+@dircategory MathGL documentation system
+@direntry
+* MathGL: (mathgl). The library for scientific graphics.
+@end direntry
++=======
+ @c @dircategory MathGL documentation system
+ @c @direntry
+ @c * MathGL: (mathgl). The library for scientific graphics.
+ @c @end direntry
++>>>>>>> upstream/1.11.1.1
@titlepage
@title MGL script language
@end quotation
@end copying
++<<<<<<< HEAD
+@dircategory MathGL documentation system
+@direntry
+* MathGL: (mathgl). The library for scientific graphics.
+@end direntry
++=======
+ @c @dircategory MathGL documentation system
+ @c @direntry
+ @c * MathGL: (mathgl). The library for scientific graphics.
+ @c @end direntry
++>>>>>>> upstream/1.11.1.1
@titlepage
@title Язык MGL