aboutsummaryrefslogtreecommitdiffstats
path: root/buch/papers/clifford/3d
diff options
context:
space:
mode:
authorAndreas Müller <andreas.mueller@ost.ch>2021-08-05 12:59:37 +0200
committerAndreas Müller <andreas.mueller@ost.ch>2021-08-05 12:59:37 +0200
commita8138ae8cf5b0bda133b5c5fb077021ac3d59761 (patch)
tree0b44652ed453f4432060fcaf9aaaa8b955980b8b /buch/papers/clifford/3d
parentadd new image stuff (diff)
downloadSeminarMatrizen-a8138ae8cf5b0bda133b5c5fb077021ac3d59761.tar.gz
SeminarMatrizen-a8138ae8cf5b0bda133b5c5fb077021ac3d59761.zip
add images for clifford article
Diffstat (limited to 'buch/papers/clifford/3d')
-rw-r--r--buch/papers/clifford/3d/Makefile23
-rw-r--r--buch/papers/clifford/3d/common.inc59
-rw-r--r--buch/papers/clifford/3d/dq.pov6
-rw-r--r--buch/papers/clifford/3d/drehung.pov120
-rw-r--r--buch/papers/clifford/3d/q23.pov12
-rw-r--r--buch/papers/clifford/3d/q31.pov12
6 files changed, 217 insertions, 15 deletions
diff --git a/buch/papers/clifford/3d/Makefile b/buch/papers/clifford/3d/Makefile
index e6a9be3..70dffe3 100644
--- a/buch/papers/clifford/3d/Makefile
+++ b/buch/papers/clifford/3d/Makefile
@@ -3,11 +3,28 @@
#
# (c) 2021 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule
#
-all: dq.jpg
+all: dq.jpg q23.jpg q31.jpg drehung.jpg
-dq.png: dq.pov common.inc
- povray +A0.1 +W1920 +H1080 -Odq.png dq.pov
+size="+W1920 +H1080"
+size="+W3840 +H2160"
+dq.png: dq.pov common.inc
+ povray +A0.1 $(size) -Odq.png dq.pov
dq.jpg: dq.png
convert dq.png -density 300 -units PixelsPerInch dq.jpg
+q23.png: q23.pov common.inc
+ povray +A0.1 $(size) -Oq23.png q23.pov
+q23.jpg: q23.png
+ convert q23.png -density 300 -units PixelsPerInch q23.jpg
+
+q31.png: q31.pov common.inc
+ povray +A0.1 $(size) -Oq31.png q31.pov
+q31.jpg: q31.png
+ convert q31.png -density 300 -units PixelsPerInch q31.jpg
+
+drehung.png: drehung.pov common.inc
+ povray +A0.1 $(size) -Odrehung.png drehung.pov
+drehung.jpg: drehung.png
+ convert drehung.png -density 300 -units PixelsPerInch drehung.jpg
+
diff --git a/buch/papers/clifford/3d/common.inc b/buch/papers/clifford/3d/common.inc
index 4bc2e7d..54aa7fe 100644
--- a/buch/papers/clifford/3d/common.inc
+++ b/buch/papers/clifford/3d/common.inc
@@ -11,10 +11,11 @@ global_settings {
}
#declare imagescale = 0.14;
-#declare r = 0.04;
+#declare r = 0.02;
+#declare thick = 0.040;
camera {
- location <40, 10, 15>
+ location <40, 12, 15>
look_at <0, 0, 0>
right 16/9 * x * imagescale
up y * imagescale
@@ -70,12 +71,12 @@ arrow(< -3, 0, 0 >, < 3, 0, 0 >, r, White)
arrow(< 0, -3, 0 >, < 0, 3, 0 >, r, White)
arrow(< 0, 0, -3 >, < 0, 0, 3 >, r, White)
-#macro circlearrow0(e1, e2, e3, r1, r2)
+#macro circlearrow0(e1, e2, e3, r1, r2, h, winkel)
mesh {
#declare N = 100;
#declare phi = 0;
- #declare phimax = 1.8 * pi;
+ #declare phimax = winkel - pi / 12;
#declare phistep = (phimax - phi) / N;
#while (phi < phimax - phistep/2)
triangle {
@@ -170,7 +171,7 @@ mesh {
#end
-#macro circlearrow(fromdirection, axis, center, r, h)
+#macro circlearrow(fromdirection, axis, center, r, h, winkel, anzahl)
#declare e1 = vnormalize(fromdirection);
#declare e2 = -vnormalize(vcross(axis, fromdirection));
@@ -179,27 +180,67 @@ mesh {
#declare r1 = 0.4 * r;
#declare r2 = r;
-circlearrow0(e1, e2, e3, r1, r2)
+#declare w = 0;
+#while (w < anzahl)
+ #declare a = 2 * w * pi / anzahl;
+ circlearrow0(e1 * cos(a) - e2 * sin(a), e1 * sin(a) + e2 * cos(a), e3, r1, r2, 1.2 * h, winkel)
+ #declare w = w + 1;
+#end
+
+mesh {
+ #declare vlu = center - r * e1 - r * e2 - h * e3;
+ #declare vlo = center - r * e1 - r * e2 + h * e3;
+ #declare vru = center - r * e1 + r * e2 - h * e3;
+ #declare vro = center - r * e1 + r * e2 + h * e3;
+ #declare hlu = center + r * e1 - r * e2 - h * e3;
+ #declare hlo = center + r * e1 - r * e2 + h * e3;
+ #declare hru = center + r * e1 + r * e2 - h * e3;
+ #declare hro = center + r * e1 + r * e2 + h * e3;
+ triangle { vlu, vru, vro }
+ triangle { vlu, vro, vlo }
+
+ triangle { vru, hru, hro }
+ triangle { vru, hro, vro }
+
+ triangle { hru, hlu, hlo }
+ triangle { hru, hlo, hro }
+
+ triangle { hlu, vlu, vlo }
+ triangle { hlu, vlo, hlo }
+
+ triangle { vlu, vru, hru }
+ triangle { vlu, hru, hlu }
+
+ triangle { vlo, vro, hro }
+ triangle { vlo, hro, hlo }
-box {
- center - r * (e1 + e2) - 0.021 * e3, center + r * (e1 + e2) + 0.021 * e3
pigment {
color rgb<0.6,0.6,1>
}
+ finish {
+ specular 0.96
+ metallic
+ }
}
+#if (vlength(axis) > 0.1)
cone {
- center + 0.02101 * e3, r, center + 2 * r * e3, 0
+ center + 1.19 * h * e3, r, center + 2 * r * e3, 0
pigment {
color rgbt<0.6,0.6,1,0.8>
}
}
+#end
cylinder {
center, center + 2 * r * e3, 0.04*0.2
pigment {
color rgb<1.0,0.6,0.6>
}
+ finish {
+ specular 0.96
+ metallic
+ }
}
#end
diff --git a/buch/papers/clifford/3d/dq.pov b/buch/papers/clifford/3d/dq.pov
index 92b702a..8002129 100644
--- a/buch/papers/clifford/3d/dq.pov
+++ b/buch/papers/clifford/3d/dq.pov
@@ -9,9 +9,9 @@ arrow(<0,0,0>, <1, sqrt(2), 2>, r, Red)
#declare r = 0.2 * r;
-circlearrow(<1,0,0>, <0,0,1>, <1, sqrt(2), 0>, 1, 0.022)
-circlearrow(<1,0,0>, <0,1,0>, <1, 0, 2>, sqrt(2)/2, 0.022)
-circlearrow(<0,0,1>, <1,0,0>, <0, sqrt(2), 2>, 0.5, 0.022)
+circlearrow(<1,0,0>, <0,0,1>, <1, sqrt(2), 0>, 1, thick, 1.8*pi/3, 3)
+circlearrow(<1,0,0>, <0,1,0>, <1, 0, 2>, sqrt(2)/2, thick, 1.8*pi/3, 3)
+circlearrow(<0,0,1>, <1,0,0>, <0, sqrt(2), 2>, 0.5, thick, 1.8*pi/3, 3)
#declare l = 2.8;
#declare h = 0.0001;
diff --git a/buch/papers/clifford/3d/drehung.pov b/buch/papers/clifford/3d/drehung.pov
new file mode 100644
index 0000000..54b5a2e
--- /dev/null
+++ b/buch/papers/clifford/3d/drehung.pov
@@ -0,0 +1,120 @@
+//
+// drehung.pov -- Drehung um (1,1,1)
+//
+// (c) 2021 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule
+//
+#include "common.inc"
+
+#declare n = vnormalize(<1,1,1>);
+#declare V = <0,2.6,0>;
+#declare W = <0,0,2.6>;
+
+#declare Vparallel = vdot(n, V) * n;
+#declare Vperp = V - Vparallel;
+#declare Wparallel = vdot(n, W) * n;
+#declare Wperp = W - Wparallel;
+
+arrow(<0,0,0>, 2*n, thick, Red)
+
+arrow(<0,0,0>, V, thick, rgb<0.0,1.0,1.0>)
+arrow(<0,0,0>, W, thick, rgb<0.0,1.0,1.0>)
+
+circlearrow(vnormalize(vcross(<-1,0,1>,n)), -0.01 * <1,1,1>, <0,0,0>, 1, 0.8*thick, 1.98*pi/3, 3)
+
+arrow(<0,0,0>, Vperp, 0.99*thick, Blue)
+arrow(<0,0,0>, Wperp, 0.99*thick, Blue)
+
+arrow(Vperp, V, thick, Green)
+arrow(Wperp, W, thick, Green)
+
+#declare l = 2.4;
+intersection {
+ box { <-l,-l,-l>, <l,l,l> }
+ //cylinder { -n, n, 3 }
+ plane { n, 0.01 }
+ plane { -n, 0.01 }
+ pigment {
+ color rgbt<0.6,0.6,1.0,0.8>
+ }
+}
+
+#declare e1 = vnormalize(Vperp);
+#declare e3 = n;
+#declare e2 = vnormalize(vcross(e3, e1));
+#declare r = vlength(Vperp);
+
+mesh {
+ #declare phi = 0;
+ #declare phimax = 2*pi/3;
+ #declare phistep = (phimax - phi) / N;
+ #while (phi < phimax - phistep/2)
+ triangle {
+ <0,0,0>,
+ r * (cos(phi ) * e1 + sin(phi ) * e2),
+ r * (cos(phi+phistep) * e1 + sin(phi+phistep) * e2)
+ }
+ #declare phi = phi + phistep;
+ #end
+ pigment {
+ color rgbt<0.2,0.2,1.0,0.4>
+ }
+}
+
+union {
+ #declare phi = 0;
+ #declare phimax = 2*pi/3;
+ #declare phistep = (phimax - phi) / N;
+ #while (phi < phimax - phistep/2)
+ cylinder {
+ r * (cos(phi ) * e1 + sin(phi ) * e2),
+ r * (cos(phi+phistep) * e1 + sin(phi+phistep) * e2),
+ 0.01
+ }
+ sphere { r * (cos(phi ) * e1 + sin(phi ) * e2), 0.01 }
+ #declare phi = phi + phistep;
+ #end
+ pigment {
+ color Blue
+ }
+}
+
+mesh {
+ #declare phi = 0;
+ #declare phimax = 2*pi/3;
+ #declare phistep = (phimax - phi) / N;
+ #while (phi < phimax - phistep/2)
+ triangle {
+ r * (cos(phi ) * e1 + sin(phi ) * e2),
+ r * (cos(phi+phistep) * e1 + sin(phi+phistep) * e2),
+ r * (cos(phi ) * e1 + sin(phi ) * e2) + Vparallel
+ }
+ triangle {
+ r * (cos(phi+phistep) * e1 + sin(phi+phistep) * e2),
+ r * (cos(phi ) * e1 + sin(phi ) * e2) + Vparallel,
+ r * (cos(phi+phistep) * e1 + sin(phi+phistep) * e2) + Vparallel
+ }
+ #declare phi = phi + phistep;
+ #end
+ pigment {
+ color rgbt<0.2,1,0.2,0.4>
+ }
+}
+
+union {
+ #declare phi = 0;
+ #declare phimax = 2*pi/3;
+ #declare phistep = (phimax - phi) / N;
+ #while (phi < phimax - phistep/2)
+ cylinder {
+ r * (cos(phi ) * e1 + sin(phi ) * e2) + Vparallel,
+ r * (cos(phi+phistep) * e1 + sin(phi+phistep) * e2) + Vparallel,
+ 0.01
+ }
+ sphere { r * (cos(phi ) * e1 + sin(phi ) * e2) + Vparallel, 0.01 }
+ #declare phi = phi + phistep;
+ #end
+ pigment {
+ color Green
+ }
+}
+
diff --git a/buch/papers/clifford/3d/q23.pov b/buch/papers/clifford/3d/q23.pov
new file mode 100644
index 0000000..e3e5d49
--- /dev/null
+++ b/buch/papers/clifford/3d/q23.pov
@@ -0,0 +1,12 @@
+//
+// q23.pov -- Drehung und Quaternion
+//
+// (c) 2021 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule
+//
+#include "common.inc"
+
+circlearrow(<1,0,0>, 0.01*<0,0,-1>, <0, 0, 0>, 1.0, thick, 0.98*pi/2, 4)
+
+arrow( <0,0,0>, <-2.0,0,0>, 0.99*thick, Blue)
+arrow( <0,0,0>, <0,2.0,0>, 0.99*thick, Blue)
+arrow( <0,0,0>, <0,0,2.0>, 0.99*thick, Red)
diff --git a/buch/papers/clifford/3d/q31.pov b/buch/papers/clifford/3d/q31.pov
new file mode 100644
index 0000000..901f838
--- /dev/null
+++ b/buch/papers/clifford/3d/q31.pov
@@ -0,0 +1,12 @@
+//
+// q31.pov -- Drehung und Quaternion
+//
+// (c) 2021 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule
+//
+#include "common.inc"
+
+circlearrow(<1,0,0>, 0.01*<0,-1,0>, <0, 0, 0>, 1.0, thick, 0.98*pi/2, 4)
+
+arrow( <0,0,0>, <-2.0,0,0>, 0.99*thick, Blue)
+arrow( <0,0,0>, <0,2.0,0>, 0.99*thick, Red)
+arrow( <0,0,0>, <0,0,2.0>, 0.99*thick, Blue)