aboutsummaryrefslogtreecommitdiffstats
path: root/buch/chapters/110-elliptisch/images/torusschnitt.pov
diff options
context:
space:
mode:
authorAndreas Müller <andreas.mueller@ost.ch>2022-06-15 20:25:27 +0200
committerAndreas Müller <andreas.mueller@ost.ch>2022-06-15 20:25:27 +0200
commit864b17ee949de5c14ebc3bbf50a90178b4b804f3 (patch)
treebf43dfb50e5874e6b0bd083d71c77171517554a6 /buch/chapters/110-elliptisch/images/torusschnitt.pov
parentMerge pull request #19 from enezerdem/master (diff)
downloadSeminarSpezielleFunktionen-864b17ee949de5c14ebc3bbf50a90178b4b804f3.tar.gz
SeminarSpezielleFunktionen-864b17ee949de5c14ebc3bbf50a90178b4b804f3.zip
fix some minor issues
Diffstat (limited to 'buch/chapters/110-elliptisch/images/torusschnitt.pov')
-rw-r--r--buch/chapters/110-elliptisch/images/torusschnitt.pov88
1 files changed, 84 insertions, 4 deletions
diff --git a/buch/chapters/110-elliptisch/images/torusschnitt.pov b/buch/chapters/110-elliptisch/images/torusschnitt.pov
index 94190be..43d50c6 100644
--- a/buch/chapters/110-elliptisch/images/torusschnitt.pov
+++ b/buch/chapters/110-elliptisch/images/torusschnitt.pov
@@ -123,9 +123,34 @@ union {
}
#end
-#macro Ebene(farbe)
-box {
- <-1.8, 0, -1.4>, <1.8, 0.001, 1.4>
+#macro Ebene(l, b, farbe)
+mesh {
+ triangle { <-l, 0, -b>, < l, 0, -b>, < l, 0, b> }
+ triangle { <-l, 0, -b>, < l, 0, b>, <-l, 0, b> }
+ pigment {
+ color farbe
+ }
+ finish {
+ specular 0.9
+ metallic
+ }
+}
+#end
+
+#macro Ebenengitter(l, b, s, r, farbe)
+union {
+ #declare lmax = floor(l / s);
+ #declare ll = -lmax;
+ #while (ll <= lmax)
+ cylinder { <ll * s, 0, -b>, <ll * s, 0, b>, r }
+ #declare ll = ll + 1;
+ #end
+ #declare bmax = floor(b / s);
+ #declare bb = -bmax;
+ #while (bb <= bmax)
+ cylinder { <-l, 0, bb * s>, <l, 0, bb * s>, r }
+ #declare bb = bb + 1;
+ #end
pigment {
color farbe
}
@@ -141,6 +166,59 @@ box {
b * < (2 + cos(theta)) * cos(phi), (2 + cos(theta)) * sin(phi) + 1, sin(theta) >
#end
+#macro breitenkreis(theta, r)
+ #declare phi = 0;
+ #declare phimax = 2 * pi;
+ #declare phisteps = 200;
+ #declare phistep = phimax / phisteps;
+ #while (phi < phimax - phistep/2)
+ cylinder { T(phi, theta), T(phi + phistep, theta), r }
+ sphere { T(phi, theta), r }
+ #declare phi = phi + phistep;
+ #end
+#end
+
+#macro laengenkreis(phi, r)
+ #declare theta = 0;
+ #declare thetamax = 2 * pi;
+ #declare thetasteps = 200;
+ #declare thetastep = thetamax / thetasteps;
+ #while (theta < thetamax - thetastep/2)
+ cylinder { T(phi, theta), T(phi, theta + thetastep), r }
+ sphere { T(phi, theta), r }
+ #declare theta = theta + thetastep;
+ #end
+#end
+
+#macro Torusgitter(farbe, r)
+union {
+ #declare phi = 0;
+ #declare phimax = 2 * pi;
+ #declare phistep = pi / 6;
+ #while (phi < phimax - phistep/2)
+ laengenkreis(phi, r)
+ #declare phi = phi + phistep;
+ #end
+ #declare thetamax = pi;
+ #declare thetastep = pi / 6;
+ #declare theta = thetastep;
+ #while (theta < thetamax - thetastep/2)
+ breitenkreis(theta, r)
+ breitenkreis(thetamax + theta, r)
+ #declare theta = theta + thetastep;
+ #end
+ breitenkreis(0, 1.5 * r)
+ breitenkreis(pi, 1.5 * r)
+ pigment {
+ color farbe
+ }
+ finish {
+ specular 0.9
+ metallic
+ }
+}
+#end
+
#macro Torus(farbe)
mesh {
#declare phi = 0;
@@ -181,5 +259,7 @@ mesh {
#declare ebenenfarbe = rgbt<0.2,0.6,1.0,0.2>;
Lemniskate(0.02, Red)
-Ebene(ebenenfarbe)
+Ebene(1.8, 1.4, ebenenfarbe)
+Ebenengitter(1.8, 1.4, 0.5, 0.005, rgb<0.4,1,1>)
Torus(torusfarbe)
+Torusgitter(Yellow, 0.005)