From: Mario R. R. <rio...@us...> - 2012-03-14 21:29:49
|
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 ec9bc97ed5a6d4a2fe72b96c7eb2e80402129393 (commit) from 578fd635a3f7933a8d7e01f0d0ed75d295b8f898 (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 ec9bc97ed5a6d4a2fe72b96c7eb2e80402129393 Author: Mario Rodriguez <rio...@us...> Date: Wed Mar 14 22:29:40 2012 +0100 Fix problem with small ranges diff --git a/share/draw/draw.lisp b/share/draw/draw.lisp index 92be34b..ab84d9b 100644 --- a/share/draw/draw.lisp +++ b/share/draw/draw.lisp @@ -2672,16 +2672,16 @@ (x2f (second (get-option '$xrange_secondary))) (y2i (first (get-option '$yrange_secondary))) (y2f (second (get-option '$yrange_secondary))) ) - (when (and (get-option '$xrange) (= xi xf)) + (when (and (get-option '$xrange) (near-equal xi xf)) (setf xi (- xi 0.01) xf (+ xf 0.01))) - (when (and (get-option '$xrange_secondary) (= x2i x2f)) + (when (and (get-option '$xrange_secondary) (near-equal x2i x2f)) (setf x2i (- x2i 0.01) x2f (+ x2f 0.01))) - (when (and (get-option '$yrange) (= yi yf)) + (when (and (get-option '$yrange) (near-equal yi yf)) (setf yi (- yi 0.01) yf (+ yf 0.01))) - (when (and (get-option '$yrange_secondary) (= y2i y2f)) + (when (and (get-option '$yrange_secondary) (near-equal y2i y2f)) (setf y2i (- y2i 0.01) y2f (+ y2f 0.01))) (format nil "~a~a~a~a" @@ -2834,13 +2834,13 @@ (yf (second (get-option '$yrange))) (zi (first (get-option '$zrange))) (zf (second (get-option '$zrange)))) - (when (= xi xf) + (when (near-equal xi xf) (setf xi (- xi 0.01) xf (+ xf 0.01))) - (when (= yi yf) + (when (near-equal yi yf) (setf yi (- yi 0.01) yf (+ yf 0.01))) - (when (= zi zf) + (when (near-equal zi zf) (setf zi (- zi 0.01) zf (+ zf 0.01))) (format nil "set xrange [~a:~a]~%set yrange [~a:~a]~%set zrange [~a:~a]~%" diff --git a/share/draw/grcommon.lisp b/share/draw/grcommon.lisp index 96a4872..8aa834a 100644 --- a/share/draw/grcommon.lisp +++ b/share/draw/grcommon.lisp @@ -188,7 +188,7 @@ -;; Returns optio value +;; Returns option value (defun get-option (opt) (gethash opt *gr-options*)) @@ -1002,6 +1002,10 @@ ;;; COMMON GNUPLOT - VTK AUXILIARY FUNCTIONS +(defun near-equal (a b) + (let ((eps 10.0d-14)) + (< (abs (- a b)) eps))) + ;; Transforms arguments to make-scene-2d, make-scene-3d, ;; draw, and vtk3d to a unique list. With this piece of code, ;; gr2d, gr3d, draw, and model3d admit as arguments nested lists @@ -1015,10 +1019,6 @@ 'list #'(lambda (z) (if ($listp z) z (list '(mlist) z))) args)))))) - - - - ;; The following functions implement the marching cubes algorithm ;; for implicit functions in 3d. (simplify ($load "implicit3d.lisp")) ----------------------------------------------------------------------- Summary of changes: share/draw/draw.lisp | 14 +++++++------- share/draw/grcommon.lisp | 10 +++++----- 2 files changed, 12 insertions(+), 12 deletions(-) hooks/post-receive -- Maxima, A Computer Algebra System |