From 5388a7aad33813f7795d601ce7a2ae21fddd9590 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Sun, 26 Sep 2021 20:03:41 +0200 Subject: torus perfektioniert --- buch/chapters/95-homologie/torus/Makefile | 2 +- buch/chapters/95-homologie/torus/torus.jpg | Bin 168494 -> 506467 bytes buch/chapters/95-homologie/torus/torus.m | 25 ++++++++++++++++++++----- buch/chapters/95-homologie/torus/torus.png | Bin 272544 -> 1440868 bytes buch/chapters/95-homologie/torus/torus.pov | 23 +++++++++++++++++------ 5 files changed, 38 insertions(+), 12 deletions(-) (limited to 'buch/chapters/95-homologie/torus') diff --git a/buch/chapters/95-homologie/torus/Makefile b/buch/chapters/95-homologie/torus/Makefile index 4eb1381..8671ede 100644 --- a/buch/chapters/95-homologie/torus/Makefile +++ b/buch/chapters/95-homologie/torus/Makefile @@ -12,4 +12,4 @@ torus.png: torus.pov torus.inc povray +A0.1 -W1920 -H1080 -Otorus.png torus.pov torus.jpg: torus.png Makefile - convert -extract 1624x970+150+78 torus.png torus.jpg + convert -extract 1624x978+147+75 torus.png torus.jpg diff --git a/buch/chapters/95-homologie/torus/torus.jpg b/buch/chapters/95-homologie/torus/torus.jpg index eaa92d9..d5f8ca7 100644 Binary files a/buch/chapters/95-homologie/torus/torus.jpg and b/buch/chapters/95-homologie/torus/torus.jpg differ diff --git a/buch/chapters/95-homologie/torus/torus.m b/buch/chapters/95-homologie/torus/torus.m index 00134d7..64a615e 100644 --- a/buch/chapters/95-homologie/torus/torus.m +++ b/buch/chapters/95-homologie/torus/torus.m @@ -5,9 +5,9 @@ # global n; -n = 24; +n = 32; global m; -m = 12; +m = 18; global R; R = 3; global r; @@ -51,10 +51,10 @@ coordinates function insert_edges(ll, lr, ul, ur) global edges; k = 3 * ll + 1; - edges(k,1) = ll; - edges(k,2) = lr; edges(k+1,1) = ll; - edges(k+1,2) = ur; + edges(k+1,2) = lr; + edges(k+0,1) = ll; + edges(k+0,2) = ur; edges(k+2,1) = ll; edges(k+2,2) = ul; endfunction @@ -330,5 +330,20 @@ endfor fprintf(fn, " }\n"); fprintf(fn, "#end\n"); +fprintf(fn, "#macro triangulation()\n"); +fprintf(fn, " union {\n"); +for i = (1:nvertices) + punkt = coordinates(i,:); + fprintf(fn, "\tsphere { <%.4f,%.4f,%.4f>, r/3 }\n", punkt(1,1), punkt(1,3), punkt(1,2)); +endfor +for i = (1:nedges) + punkt1 = coordinates(edges(i,1)+1,:); + punkt2 = coordinates(edges(i,2)+1,:); + fprintf(fn, "\tcylinder { <%.4f,%.4f,%.4f>, ", punkt1(1,1), punkt1(1,3), punkt1(1,2)); + fprintf(fn, "<%.4f,%.4f,%.4f>, r/3 }\n", punkt2(1,1), punkt2(1,3), punkt2(1,2)); +endfor +fprintf(fn, " }\n"); +fprintf(fn, "#end\n"); + fclose(fn); diff --git a/buch/chapters/95-homologie/torus/torus.png b/buch/chapters/95-homologie/torus/torus.png index 814c466..bcd28bc 100644 Binary files a/buch/chapters/95-homologie/torus/torus.png and b/buch/chapters/95-homologie/torus/torus.png differ diff --git a/buch/chapters/95-homologie/torus/torus.pov b/buch/chapters/95-homologie/torus/torus.pov index 292ad00..1c507f8 100644 --- a/buch/chapters/95-homologie/torus/torus.pov +++ b/buch/chapters/95-homologie/torus/torus.pov @@ -11,17 +11,17 @@ global_settings { } #declare imagescale = 0.1; -#declare r = 0.03; +#declare r = 0.04; camera { - location <43, 25, -20> + location <43, 25, 20> look_at <0, 0, 0> right 16/9 * x * imagescale up y * imagescale } light_source { - <10, 20, -40> color White + <10, 20, 0> color White area_light <1,0,0> <0,0,1>, 10, 10 adaptive 1 jitter @@ -38,7 +38,7 @@ sky_sphere { object { torusflaeche() pigment { - color rgbt<0.8,0.8,0.8,0.5> + color rgbt<0.8,0.8,0.8,0.3> } finish { specular 0.9 @@ -49,7 +49,7 @@ object { object { zyklus1() pigment { - color Red + color rgb<1.0,0.2,0.2> } finish { specular 0.9 @@ -60,7 +60,18 @@ object { object { zyklus2() pigment { - color Blue + color rgb<0.2,0.2,1.0> + } + finish { + specular 0.9 + metallic + } +} + +object { + triangulation() + pigment { + color rgb<0.8,0.6,0.4> } finish { specular 0.9 -- cgit v1.2.1