From fbcf8833aef79694e448010520f2253e93f2cd4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Tue, 14 Jun 2022 16:59:48 +0200 Subject: more info about the lemniskate --- .../110-elliptisch/images/torusschnitt.pov | 185 +++++++++++++++++++++ 1 file changed, 185 insertions(+) create mode 100644 buch/chapters/110-elliptisch/images/torusschnitt.pov (limited to 'buch/chapters/110-elliptisch/images/torusschnitt.pov') diff --git a/buch/chapters/110-elliptisch/images/torusschnitt.pov b/buch/chapters/110-elliptisch/images/torusschnitt.pov new file mode 100644 index 0000000..94190be --- /dev/null +++ b/buch/chapters/110-elliptisch/images/torusschnitt.pov @@ -0,0 +1,185 @@ +// +// kegelpara.pov +// +// (c) 2022 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule +// +#version 3.7; +#include "colors.inc" + +#declare O = <0,0,0>; + +global_settings { + assumed_gamma 1 +} + +#declare imagescale = 0.060; + +camera { + location <28, 20, -40> + look_at <0, 0.55, 0> + right (16/9) * x * imagescale + up y * imagescale +} + +light_source { + <30, 10, -40> color White + area_light <1,0,0> <0,0,1>, 10, 10 + adaptive 1 + jitter +} + +sky_sphere { + pigment { + color rgb<1,1,1> + } +} + + +// +// draw an arrow from to with thickness with +// color +// +#macro arrow(from, to, arrowthickness, c) +#declare arrowdirection = vnormalize(to - from); +#declare arrowlength = vlength(to - from); +union { + sphere { + from, 1.1 * arrowthickness + } + cylinder { + from, + from + (arrowlength - 5 * arrowthickness) * arrowdirection, + arrowthickness + } + cone { + from + (arrowlength - 5 * arrowthickness) * arrowdirection, + 2 * arrowthickness, + to, + 0 + } + pigment { + color c + } + finish { + specular 0.9 + metallic + } +} +#end + +arrow(<-2,0,0>,<2,0,0>,0.02,White) +arrow(<0,-1.1,0>,<0,2.2,0>,0.02,White) +arrow(<0,0,-1.6>,<0,0,2.4>,0.02,White) + +#declare epsilon = 0.001; +#declare l = 1.5; + + +#declare a = sqrt(2); +#macro G2(phi,sg) + a * sqrt(cos(2*phi)) * < sg * cos(phi), 0, sin(phi)> +#end + +#macro Lemniskate(s, farbe) +union { + #declare phi = -pi / 4; + #declare phimax = pi / 4; + #declare phisteps = 100; + #declare phistep = phimax / phisteps; + #while (phi < phimax - phistep/2) + sphere { G2(phi,1), s } + cylinder { G2(phi,1), G2(phi+phistep,1), s } + sphere { G2(phi,-1), s } + cylinder { G2(phi,-1), G2(phi+phistep,-1), s } + #declare phi = phi + phistep; + #end + pigment { + color farbe + } + finish { + specular 0.9 + metallic + } +} +#end + +#macro Projektion(s, farbe) +union { + #declare phistep = pi / 16; + #declare phi = -pi / 4 + phistep; + #declare phimax = pi / 4; + #while (phi < phimax - phistep/2) + cylinder { G(phi, 1), G2(phi, 1), s } + cylinder { G(phi, -1), G2(phi, -1), s } + #declare phi = phi + phistep; + #end + pigment { + color farbe + } + finish { + specular 0.9 + metallic + } +} +#end + +#macro Ebene(farbe) +box { + <-1.8, 0, -1.4>, <1.8, 0.001, 1.4> + pigment { + color farbe + } + finish { + specular 0.9 + metallic + } +} +#end + +#declare b = 0.5; +#macro T(phi, theta) + b * < (2 + cos(theta)) * cos(phi), (2 + cos(theta)) * sin(phi) + 1, sin(theta) > +#end + +#macro Torus(farbe) +mesh { + #declare phi = 0; + #declare phimax = 2 * pi; + #declare phisteps = 200; + #declare phistep = phimax/phisteps; + #while (phi < phimax - phistep/2) + #declare theta = 0; + #declare thetamax = 2 * pi; + #declare thetasteps = 200; + #declare thetastep = thetamax / thetasteps; + #while (theta < thetamax - thetastep/2) + triangle { + T(phi, theta), + T(phi + phistep, theta), + T(phi + phistep, theta + thetastep) + } + triangle { + T(phi, theta), + T(phi + phistep, theta + thetastep), + T(phi, theta + thetastep) + } + #declare theta = theta + thetastep; + #end + #declare phi = phi + phistep; + #end + pigment { + color farbe + } + finish { + specular 0.9 + metallic + } +} +#end + +#declare torusfarbe = rgbt<0.2,0.6,0.2,0.2>; +#declare ebenenfarbe = rgbt<0.2,0.6,1.0,0.2>; + +Lemniskate(0.02, Red) +Ebene(ebenenfarbe) +Torus(torusfarbe) -- cgit v1.2.1 From 864b17ee949de5c14ebc3bbf50a90178b4b804f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Wed, 15 Jun 2022 20:25:27 +0200 Subject: fix some minor issues --- .../110-elliptisch/images/torusschnitt.pov | 88 +++++++++++++++++++++- 1 file changed, 84 insertions(+), 4 deletions(-) (limited to 'buch/chapters/110-elliptisch/images/torusschnitt.pov') 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 { , , r } + #declare ll = ll + 1; + #end + #declare bmax = floor(b / s); + #declare bb = -bmax; + #while (bb <= bmax) + cylinder { <-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) -- cgit v1.2.1 From b9af31ecb07acd4d34a13aa99d6170c9ca96af87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Thu, 16 Jun 2022 17:00:34 +0200 Subject: some improvements --- .../110-elliptisch/images/torusschnitt.pov | 55 +++++++++++++++++++--- 1 file changed, 49 insertions(+), 6 deletions(-) (limited to 'buch/chapters/110-elliptisch/images/torusschnitt.pov') diff --git a/buch/chapters/110-elliptisch/images/torusschnitt.pov b/buch/chapters/110-elliptisch/images/torusschnitt.pov index 43d50c6..e5602df 100644 --- a/buch/chapters/110-elliptisch/images/torusschnitt.pov +++ b/buch/chapters/110-elliptisch/images/torusschnitt.pov @@ -67,14 +67,51 @@ union { } #end -arrow(<-2,0,0>,<2,0,0>,0.02,White) -arrow(<0,-1.1,0>,<0,2.2,0>,0.02,White) -arrow(<0,0,-1.6>,<0,0,2.4>,0.02,White) + +#macro Ticks(tl, tr) +union { + #declare s = 1; + #while (s <= 3.1) + cylinder { <-0.5*s-tl, 0, 0>, <-0.5*s+tl, 0, 0>, tr } + cylinder { < 0.5*s-tl, 0, 0>, < 0.5*s+tl, 0, 0>, tr } + #declare s = s + 1; + #end + + #declare s = 1; + #while (s <= 4.1) + cylinder { <0, 0.5*s-tl, 0>, <0, 0.5*s+tl, 0>, tr } + #declare s = s + 1; + #end + #declare s = 1; + #while (s <= 2.1) + cylinder { <0,-0.5*s-tl, 0>, <0,-0.5*s+tl, 0>, tr } + #declare s = s + 1; + #end + + #declare s = 1; + #while (s <= 4) + cylinder { <0, 0, 0.5*s-tl>, <0, 0, 0.5*s+tl>, tr } + #declare s = s + 1; + #end + #declare s = 1; + #while (s <= 3) + cylinder { <0, 0, -0.5*s-tl>, <0, 0, -0.5*s+tl>, tr } + #declare s = s + 1; + #end + + pigment { + color White + } + finish { + specular 0.9 + metallic + } +} +#end #declare epsilon = 0.001; #declare l = 1.5; - #declare a = sqrt(2); #macro G2(phi,sg) a * sqrt(cos(2*phi)) * < sg * cos(phi), 0, sin(phi)> @@ -258,8 +295,14 @@ mesh { #declare torusfarbe = rgbt<0.2,0.6,0.2,0.2>; #declare ebenenfarbe = rgbt<0.2,0.6,1.0,0.2>; +arrow(<-2,0,0>,<2,0,0>,0.02,White) +arrow(<0,-1.1,0>,<0,2.2,0>,0.02,White) +arrow(<0,0,-1.7>,<0,0,2.4>,0.02,White) +Ticks(0.007,0.036) + Lemniskate(0.02, Red) -Ebene(1.8, 1.4, ebenenfarbe) -Ebenengitter(1.8, 1.4, 0.5, 0.005, rgb<0.4,1,1>) +Ebene(1.8, 1.6, ebenenfarbe) +Ebenengitter(1.8, 1.6, 0.5, 0.005, rgb<0.4,1,1>) Torus(torusfarbe) Torusgitter(Yellow, 0.005) + -- cgit v1.2.1