From 3d2a9794b454fcf51d734f5a184690f9dfa14af4 Mon Sep 17 00:00:00 2001 From: Neil Toronto Date: Wed, 2 Apr 2014 11:35:17 -0600 Subject: [PATCH] Fixed error in drawing connected lines with axis transforms --- pkgs/plot-pkgs/plot-lib/plot/private/plot3d/plot-area.rkt | 8 ++++---- pkgs/plot-pkgs/plot-test/plot/tests/plot3d-bsp-tests.rkt | 8 +++++++- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/pkgs/plot-pkgs/plot-lib/plot/private/plot3d/plot-area.rkt b/pkgs/plot-pkgs/plot-lib/plot/private/plot3d/plot-area.rkt index 5e28a6613c..3caa75f0fe 100644 --- a/pkgs/plot-pkgs/plot-lib/plot/private/plot3d/plot-area.rkt +++ b/pkgs/plot-pkgs/plot-lib/plot/private/plot3d/plot-area.rkt @@ -1024,10 +1024,10 @@ (map plot->norm vs))))] [else (for ([vs (in-list vss)]) - (define vs (subdivide-lines plot->dc vs)) - (add-shape! plot3d-area-layer - (lines (line-data alpha pen-color pen-width pen-style) - (map plot->norm vs))))]))))) + (let ([vs (subdivide-lines plot->dc vs)]) + (add-shape! plot3d-area-layer + (lines (line-data alpha pen-color pen-width pen-style) + (map plot->norm vs)))))]))))) (define (add-polygon! vs face ls) (let/ec return diff --git a/pkgs/plot-pkgs/plot-test/plot/tests/plot3d-bsp-tests.rkt b/pkgs/plot-pkgs/plot-test/plot/tests/plot3d-bsp-tests.rkt index f752c20641..00ff5ced78 100644 --- a/pkgs/plot-pkgs/plot-test/plot/tests/plot3d-bsp-tests.rkt +++ b/pkgs/plot-pkgs/plot-test/plot/tests/plot3d-bsp-tests.rkt @@ -24,6 +24,12 @@ slow parts profile contract-profile) +#;; Test under crazy transformation +(begin + (plot-x-transform cbrt-transform) + (plot-y-transform cbrt-transform) + (plot-z-transform cbrt-transform)) + #; (plot3d (contour-intervals3d * -1 1 -1 1 #:samples 3 #:line-widths '(2))) @@ -112,7 +118,7 @@ slow parts 0.7) 0.4)) -1 1 -1 1 - #:samples 41 + #:samples 40 ;#:alphas '(0.75) #:alpha 0.95 #:color "plum"