From: Mario R. R. <rio...@us...> - 2011-10-03 11:23:01
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Maxima, A Computer Algebra System". The branch, master has been updated via 51f3427db546637582b23dd5d454aaee42a52ea8 (commit) from a998528c3b19578e766f544e8c372838a060980a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 51f3427db546637582b23dd5d454aaee42a52ea8 Author: Mario Rodriguez <rio...@us...> Date: Mon Oct 3 07:21:13 2011 -0400 * Add documentation for option draw_realpart * Extend draw_realpart to other objects diff --git a/doc/info/draw.texi b/doc/info/draw.texi index d3c3384..207b6c3 100644 --- a/doc/info/draw.texi +++ b/doc/info/draw.texi @@ -922,6 +922,38 @@ We want an eps file with A4 portrait dimensions. +@defvr {Graphic option} draw_realpart +Default value: @code{true} + +When @code{true}, functions to be drawn are considered as complex functions whose +real part value should be plotted; when @code{false}, nothing will be plotted when +the function does not give a real value. + +This option affects objects @code{explicit} and @code{parametric} in 2D and 3D, and +@code{parametric_surface}. + +Example: + +Option @code{draw_realpart} affects objects @code{explicit} and @code{parametric}. + +@example +(%i1) load(draw)$ +(%i2) draw2d( + draw_realpart = false, + explicit(sqrt(x^2 - 4*x) - x, x, -1, 5), + color = red, + draw_realpart = true, + parametric(x,sqrt(x^2 - 4*x) - x + 1, x, -1, 5) ); +@end example + +@opencatbox +@category{Package draw} +@closecatbox + +@end defvr + + + @defvr {Graphic option} enhanced3d Default value: @code{none} @@ -3823,7 +3855,7 @@ Draws explicit functions in 2D and 3D. with variable @var{var} taking values from @var{minval} to @var{maxval}. This object is affected by the following @i{graphic options}: @code{nticks}, -@code{adapt_depth}, @code{line_width}, @code{line_type}, @code{key}, +@code{adapt_depth}, @code{draw_realpart}, @code{line_width}, @code{line_type}, @code{key}, @code{filled_func}, @code{fill_color} and @code{color}. Example: @@ -3845,7 +3877,7 @@ Example: variable @var{var1} taking values from @var{minval1} to @var{maxval1} and variable @var{var2} taking values from @var{minval2} to @var{maxval2}. -This object is affected by the following @i{graphic options}: @code{xu_grid}, +This object is affected by the following @i{graphic options}: @code{draw_realpart}, @code{xu_grid}, @code{yv_grid}, @code{line_type}, @code{line_width}, @code{key}, @code{enhanced3d}, and @code{color}. @@ -4214,7 +4246,7 @@ The command @code{parametric_surface(@var{xfun}, @var{yfun}, @var{zfun}, @var{par1max} and parameter @var{par2} taking values from @var{par2min} to @var{par2max}. -This object is affected by the following @i{graphic options}: @code{xu_grid}, +This object is affected by the following @i{graphic options}: @code{draw_realpart}, @code{xu_grid}, @code{yv_grid}, @code{line_type}, @code{line_width}, @code{key}, @code{enhanced3d}, and @code{color}. diff --git a/doc/info/es/draw.texi b/doc/info/es/draw.texi index 30d1e48..bc92f85 100644 --- a/doc/info/es/draw.texi +++ b/doc/info/es/draw.texi @@ -1,4 +1,4 @@ -@c version 1.58 +@c English version 2011-10-03 @menu * Introducci@'on a draw:: * Funciones y variables para draw:: @@ -835,6 +835,34 @@ En este caso queremos un fichero eps con dimensiones A4. +@defvr {Opci@'on gr@'afica} draw_realpart +Valor por defecto: @code{true} + +Cuando vale @code{true}, las funciones a dibujar se consideran funciones complejas cuyas +partes reales se deben dibujar; cuando la opci@'on vale @code{false}, no se dibujar@'a +nada en caso de que la funci@'on no devuelve valores reales. + +Esta opci@'on afecta a los objetos @code{explicit} y @code{parametric} en 2D y 3D, y al +objeto @code{parametric_surface}. + +Ejemplo: + +La opci@'on @code{draw_realpart} afecta a los objetos @code{explicit} y @code{parametric}. + +@example +(%i1) load(draw)$ +(%i2) draw2d( + draw_realpart = false, + explicit(sqrt(x^2 - 4*x) - x, x, -1, 5), + color = red, + draw_realpart = true, + parametric(x,sqrt(x^2 - 4*x) - x + 1, x, -1, 5) ); +@end example + +@end defvr + + + @defvr {Opci@'on gr@'afica} enhanced3d Valor por defecto: @code{none} @@ -3393,7 +3421,7 @@ Dibuja funciones expl@'{@dotless{i}}citas en 2D y 3D. con la variable @var{var} tomando valores desde @var{minval} hasta @var{maxval}. Este objeto se ve afectado por las siguientes @i{opciones gr@'aficas}: @code{nticks}, -@code{adapt_depth}, @code{line_width}, @code{line_type}, @code{key}, +@code{adapt_depth}, @code{draw_realpart}, @code{line_width}, @code{line_type}, @code{key}, @code{filled_func}, @code{fill_color} y @code{color}. Ejemplo: @@ -3415,7 +3443,7 @@ dibuja la funci@'on expl@'{@dotless{i}}cita @var{fcn}, con la variable @code{var1} tomando valores desde @var{minval1} hasta @var{maxval1} y la variable @var{var2} tomando valores desde @var{minval2} hasta @var{maxval2}. -Este objeto se ve afectado por las siguientes @i{opciones gr@'aficas}: @code{xu_grid}, +Este objeto se ve afectado por las siguientes @i{opciones gr@'aficas}: @code{draw_realpart}, @code{xu_grid}, @code{yv_grid}, @code{line_type}, @code{line_width}, @code{key}, @code{enhanced3d} y @code{color}. @@ -3761,7 +3789,7 @@ dibuja la superficie param@'etrica @code{[@var{xfun},@var{yfun},@var{zfun}]}, con el par@'ametro @var{par1} tomando valores desde @var{par1min} hasta @var{par1max} y el par@'ametro @var{par2} tomando valores desde @var{par2min} hasta @var{par2max}. -Este objeto se ve afectado por las siguientes @i{opciones gr@'aficas}: @code{xu_grid}, +Este objeto se ve afectado por las siguientes @i{opciones gr@'aficas}: @code{draw_realpart}, @code{xu_grid}, @code{yv_grid}, @code{line_type}, @code{line_width}, @code{key}, @code{enhanced3d} y @code{color}. diff --git a/share/draw/draw.lisp b/share/draw/draw.lisp index c82c7ee..c12860d 100755 --- a/share/draw/draw.lisp +++ b/share/draw/draw.lisp @@ -113,10 +113,30 @@ (when (> yy ymax) (setf ymax yy)))) (defmacro check-extremes-z () - '(let () + '(when (numberp zz) (when (< zz zmin) (setf zmin zz)) (when (> zz zmax) (setf zmax zz)))) + + + +; zzz +;(defmacro check-extremes-z () +; '(let () +; (when (< zz zmin) (setf zmin zz)) +; (when (> zz zmax) (setf zmax zz)))) + + + + + + + + + + + + ;; Controls whether the actual graphics object must ;; be plotted against the primary or the secondary axes, ;; both horizontal and vertical. Secondary axes in 3D @@ -1697,11 +1717,13 @@ (ymax most-negative-double-float) (zmin most-positive-double-float) (zmax most-negative-double-float) + (*plot-realpart* *plot-realpart*) (nx (+ xu_grid 1)) (ny (+ yv_grid 1)) ($numer t) (count -1) ncols result) + (setq *plot-realpart* (get-option '$draw_realpart)) (check-enhanced3d-model "explicit" '(0 2 3 99)) (when (= *draw-enhanced3d-type* 99) (update-enhanced3d-expression (list '(mlist) par1 par2))) @@ -2027,9 +2049,11 @@ (xmax most-negative-double-float) (ymin most-positive-double-float) (ymax most-negative-double-float) + (*plot-realpart* *plot-realpart*) (tt ($float parmin)) (eps (/ (- tmax tmin) (- nticks 1))) result f1 f2 xx yy) + (setq *plot-realpart* (get-option '$draw_realpart)) (if (< tmax tmin) (merror "draw2d (parametric): illegal range")) (setq f1 (coerce-float-fun xfun `((mlist), par))) @@ -2173,10 +2197,12 @@ (ymax most-negative-double-float) (zmin most-positive-double-float) (zmax most-negative-double-float) + (*plot-realpart* *plot-realpart*) (tt tmin) (eps (/ (- tmax tmin) (- nticks 1))) (count -1) ncols result f1 f2 f3 xx yy zz) + (setq *plot-realpart* (get-option '$draw_realpart)) (check-enhanced3d-model "parametric" '(0 1 3 99)) (when (= *draw-enhanced3d-type* 99) (update-enhanced3d-expression (list '(mlist) par1))) @@ -2251,12 +2277,14 @@ (ymax most-negative-double-float) (zmin most-positive-double-float) (zmax most-negative-double-float) + (*plot-realpart* *plot-realpart*) (ueps (/ (- umax umin) (- ugrid 1))) (veps (/ (- vmax vmin) (- vgrid 1))) (nu (+ ugrid 1)) (nv (+ vgrid 1)) (count -1) ncols result f1 f2 f3 xx yy zz uu vv) + (setq *plot-realpart* (get-option '$draw_realpart)) (check-enhanced3d-model "parametric_surface" '(0 2 3 99)) (when (= *draw-enhanced3d-type* 99) (update-enhanced3d-expression (list '(mlist) par1 par2))) @@ -2843,6 +2871,7 @@ (format nil "set xlabel '~a'~%" (get-option '$xlabel)) (format nil "set ylabel '~a'~%" (get-option '$ylabel)) (format nil "set zlabel '~a'~%" (get-option '$zlabel)) + (format nil "set datafile missing 'NIL'~%") (if (get-option '$logx) (format nil "set logscale x~%") (format nil "unset logscale x~%")) @@ -3009,7 +3038,6 @@ (setf isanimatedgif (equal (get-option '$terminal) '$animated_gif)) - (setf gfn (plot-temp-file (get-option '$gnuplot_file_name)) dfn (plot-temp-file (get-option '$data_file_name))) @@ -3177,27 +3205,28 @@ (ncol (caar glis)) (l 0) (m (cadar glis)) - (non-numeric-interval nil) - pair) + (non-numeric-region nil) + coordinates) (cond ((= m 0) ; no blank lines (do ((cont 0 (+ cont ncol))) ((= cont k) 'done) - (setf pair (subseq vect cont (+ cont ncol))) + (setf coordinates (subseq vect cont (+ cont ncol))) ; control of non numeric y values, ; code related to draw_realpart (cond - (non-numeric-interval - (when (numberp (aref pair 1)) - (setf non-numeric-interval nil) - (write-subarray pair datastorage) )) + (non-numeric-region + (when (numberp (aref coordinates 1)) + (setf non-numeric-region nil) + (write-subarray coordinates datastorage) )) (t (cond - ((numberp (aref pair 1)) - (write-subarray pair datastorage)) + ((numberp (aref coordinates 1)) + (write-subarray coordinates datastorage)) (t - (setf non-numeric-interval t) + (setf non-numeric-region t) (format datastorage "~%")))))) ) + (t ; blank lines every m lines (do ((cont 0 (+ cont ncol))) ((= cont k) 'done) ----------------------------------------------------------------------- Summary of changes: doc/info/draw.texi | 38 ++++++++++++++++++++++++++++++++-- doc/info/es/draw.texi | 36 +++++++++++++++++++++++++++++--- share/draw/draw.lisp | 53 +++++++++++++++++++++++++++++++++++++----------- 3 files changed, 108 insertions(+), 19 deletions(-) hooks/post-receive -- Maxima, A Computer Algebra System |