diff --git a/asymptote/topology-r-spiral-covering-s/Makefile b/asymptote/topology-r-spiral-covering-s/Makefile index 5fdec9a..8a31234 100644 --- a/asymptote/topology-r-spiral-covering-s/Makefile +++ b/asymptote/topology-r-spiral-covering-s/Makefile @@ -4,6 +4,7 @@ DENSITY = 300 WIDTH = 512 make: + make clean pdflatex $(SOURCE).tex -output-format=pdf asy $(SOURCE)-*.asy asy $(SOURCE)-*.asy @@ -11,7 +12,7 @@ make: make clean clean: - rm -rf $(TARGET) *.class *.html *.log *.aux *.data *.gnuplot *.out *.prc *.pre *.asy + rm -rf $(TARGET) *.class *.html *.log *.aux *.data *.gnuplot *.out *.prc *.pre *.asy topology-r-spiral-covering-s-1_0.pdf topology-r-spiral-covering-s-1+0_0.pdf topology-r-spiral-covering-s-1.tex gif: pdfcrop $(SOURCE).pdf diff --git a/asymptote/topology-r-spiral-covering-s/topology-r-spiral-covering-s.tex b/asymptote/topology-r-spiral-covering-s/topology-r-spiral-covering-s.tex index 931eec4..610382d 100644 --- a/asymptote/topology-r-spiral-covering-s/topology-r-spiral-covering-s.tex +++ b/asymptote/topology-r-spiral-covering-s/topology-r-spiral-covering-s.tex @@ -26,8 +26,10 @@ real phix = 0.1; real phim = 6.7; // spiral -path3 spiral = graph(x,y,z,1,phim,operator ..); -draw(spiral,Arrow3); +path3 spiral1 = graph(x,y,z,0.9,1,operator ..); +draw(spiral1,dotted); +path3 spiral2 = graph(x,y,z,1,phim,operator ..); +draw(spiral2,Arrow3); // blue circle draw(unitcircle3, blue); @@ -46,9 +48,9 @@ dot(px); label("$x$",px,S); // axes and labels -xaxis3("",red); -yaxis3("",red); -zaxis3("",red); +xaxis3("",red,Arrow3); +yaxis3("",red,Arrow3); +zaxis3("",red,Arrow3); label("$\mathbb{R}$",(1,-1,4)); diff --git a/asymptote/torus-three-paths/Makefile b/asymptote/torus-three-paths/Makefile new file mode 100644 index 0000000..f94ceb3 --- /dev/null +++ b/asymptote/torus-three-paths/Makefile @@ -0,0 +1,35 @@ +SOURCE = torus-three-paths +DELAY = 80 +DENSITY = 300 +WIDTH = 512 + +make: + make clean + pdflatex $(SOURCE).tex -output-format=pdf + asy $(SOURCE)-*.asy + asy $(SOURCE)-*.asy + pdflatex $(SOURCE).tex -output-format=pdf + make clean + +clean: + rm -rf $(TARGET) *.class *.html *.log *.aux *.data *.gnuplot *.out *.prc *.pre *.asy $(SOURCE)-1_0.pdf $(SOURCE)1+0_0.pdf $(SOURCE)-1.tex + +gif: + pdfcrop $(SOURCE).pdf + convert -verbose -delay $(DELAY) -loop 0 -density $(DENSITY) $(SOURCE)-crop.pdf $(SOURCE).gif + make clean + +png: + make + make svg + inkscape $(SOURCE).svg -w $(WIDTH) --export-png=$(SOURCE).png + +transparentGif: + convert $(SOURCE).pdf -transparent white result.gif + make clean + +svg: + #inkscape $(SOURCE).pdf --export-plain-svg=$(SOURCE).svg + pdf2svg $(SOURCE).pdf $(SOURCE).svg + # Necessary, as pdf2svg does not always create valid svgs: + inkscape $(SOURCE).svg --export-plain-svg=$(SOURCE).svg diff --git a/asymptote/torus-three-paths/Readme.md b/asymptote/torus-three-paths/Readme.md new file mode 100644 index 0000000..21b5717 --- /dev/null +++ b/asymptote/torus-three-paths/Readme.md @@ -0,0 +1,8 @@ +Compiled example +---------------- +![Example](topology-r-spiral-covering-s.png) + +Credits +------- + +This graph was created by [Alex](http://tex.stackexchange.com/users/22467/alex) ([source](http://tex.stackexchange.com/a/149706/5645)) diff --git a/asymptote/torus-three-paths/torus-three-paths.tex b/asymptote/torus-three-paths/torus-three-paths.tex new file mode 100644 index 0000000..61355c1 --- /dev/null +++ b/asymptote/torus-three-paths/torus-three-paths.tex @@ -0,0 +1,51 @@ +\documentclass[margin=1cm]{standalone} +\usepackage{asymptote} +\begin{document} +\begin{asy} +settings.render = 8; +settings.prc = false; + +import graph3; +import contour; +size3(8cm); + +currentprojection = orthographic(10,1,4); +defaultrender = render(merge = true); + +// create torus as surface of rotation +int umax = 40; +int vmax = 40; +surface torus = surface(Circle(c=2Y, r=0.6, normal=X, n=vmax), c=O, axis=Z, n=umax); +torus.ucyclic(true); +torus.vcyclic(true); + +pen meshpen = 0.3pt + gray; + +draw(torus, surfacepen=material(diffusepen=white+opacity(0.6), emissivepen=white)); +for (int u = 0; u < umax; ++u) + draw(torus.uequals(u), p=meshpen); +for (int v = 0; v < vmax; ++v) + draw(graph(new triple(real u) {return torus.point(u,v); }, 0, umax, operator ..), + p=meshpen); + +pair a = (floor(umax/2) + 2, 3); +dot(torus.point(a.x, a.y), L="$a$", align=W); +pair b = (5, floor(vmax/2)); +dot(torus.point(b.x, b.y), L="$b$", align=2Z + X); + +path3 abpath(int ucycles, int vcycles) { + pair bshift = (ucycles*umax, vcycles*vmax); + triple f(real t) { + pair uv = (1-t)*a + t*(b+bshift); + return torus.point(uv.x, uv.y); + } + return graph(f, 0, 1, operator ..); +} + +real linewidth = 0.8pt; + +draw(abpath(0,0), p=linewidth + orange); +draw(abpath(1,0), p=linewidth + red); +draw(abpath(1,-1), p=linewidth + darkgreen); +\end{asy} +\end{document}