diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /graphics/asymptote/examples/spiral3.asy |
Initial commit
Diffstat (limited to 'graphics/asymptote/examples/spiral3.asy')
-rw-r--r-- | graphics/asymptote/examples/spiral3.asy | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/graphics/asymptote/examples/spiral3.asy b/graphics/asymptote/examples/spiral3.asy new file mode 100644 index 0000000000..727ca3f6d3 --- /dev/null +++ b/graphics/asymptote/examples/spiral3.asy @@ -0,0 +1,20 @@ +import graph3; +import palette; + +size3(10cm); + +currentprojection=orthographic(5,4,2); +viewportmargin=(2cm,0); + +real r(real t) {return 3exp(-0.1*t);} +real x(real t) {return r(t)*cos(t);} +real y(real t) {return r(t)*sin(t);} +real z(real t) {return t;} + +path3 p=graph(x,y,z,0,6*pi,50,operator ..); + +tube T=tube(p,2); +surface s=T.s; +s.colors(palette(s.map(zpart),BWRainbow())); +draw(s,render(merge=true)); +draw(T.center,thin()); |