aboutsummaryrefslogtreecommitdiffstats
path: root/buch
diff options
context:
space:
mode:
authorAndreas Müller <andreas.mueller@ost.ch>2021-08-04 20:24:32 +0200
committerAndreas Müller <andreas.mueller@ost.ch>2021-08-04 20:24:32 +0200
commit100898f1bdf1f00e3f8ba8ddb68703bcbed1e77e (patch)
tree940badf859e78612708f3cfbd5f545f0bbc9bb7e /buch
parentMerge branch 'master' of github.com:AndreasFMueller/SeminarMatrizen (diff)
downloadSeminarMatrizen-100898f1bdf1f00e3f8ba8ddb68703bcbed1e77e.tar.gz
SeminarMatrizen-100898f1bdf1f00e3f8ba8ddb68703bcbed1e77e.zip
add new image stuff
Diffstat (limited to '')
-rw-r--r--buch/papers/clifford/3d/Makefile13
-rw-r--r--buch/papers/clifford/3d/common.inc206
-rw-r--r--buch/papers/clifford/3d/dq.pov25
3 files changed, 244 insertions, 0 deletions
diff --git a/buch/papers/clifford/3d/Makefile b/buch/papers/clifford/3d/Makefile
new file mode 100644
index 0000000..e6a9be3
--- /dev/null
+++ b/buch/papers/clifford/3d/Makefile
@@ -0,0 +1,13 @@
+#
+# Makefile
+#
+# (c) 2021 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule
+#
+all: dq.jpg
+
+dq.png: dq.pov common.inc
+ povray +A0.1 +W1920 +H1080 -Odq.png dq.pov
+
+dq.jpg: dq.png
+ convert dq.png -density 300 -units PixelsPerInch dq.jpg
+
diff --git a/buch/papers/clifford/3d/common.inc b/buch/papers/clifford/3d/common.inc
new file mode 100644
index 0000000..4bc2e7d
--- /dev/null
+++ b/buch/papers/clifford/3d/common.inc
@@ -0,0 +1,206 @@
+//
+// common.inc
+//
+// (c) 2021 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule
+//
+#version 3.7;
+#include "colors.inc"
+
+global_settings {
+ assumed_gamma 1
+}
+
+#declare imagescale = 0.14;
+#declare r = 0.04;
+
+camera {
+ location <40, 10, 15>
+ look_at <0, 0, 0>
+ right 16/9 * x * imagescale
+ up y * imagescale
+}
+
+light_source {
+ <40, 20, 20> 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 <from> to <to> with thickness <arrowthickness> with
+// color <c>
+//
+#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(< -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)
+
+mesh {
+ #declare N = 100;
+ #declare phi = 0;
+ #declare phimax = 1.8 * pi;
+ #declare phistep = (phimax - phi) / N;
+ #while (phi < phimax - phistep/2)
+ triangle {
+ center + r1 * (cos(phi ) * e1 + sin(phi ) * e2) - h * e3,
+ center + r2 * (cos(phi ) * e1 + sin(phi ) * e2) - h * e3,
+ center + r1 * (cos(phi+phistep) * e1 + sin(phi+phistep) * e2) - h * e3
+ }
+ triangle {
+ center + r1 * (cos(phi+phistep) * e1 + sin(phi+phistep) * e2) - h * e3,
+ center + r2 * (cos(phi ) * e1 + sin(phi ) * e2) - h * e3,
+ center + r2 * (cos(phi+phistep) * e1 + sin(phi+phistep) * e2) - h * e3
+ }
+ triangle {
+ center + r1 * (cos(phi ) * e1 + sin(phi ) * e2) + h * e3,
+ center + r2 * (cos(phi ) * e1 + sin(phi ) * e2) + h * e3,
+ center + r1 * (cos(phi+phistep) * e1 + sin(phi+phistep) * e2) + h * e3
+ }
+ triangle {
+ center + r1 * (cos(phi+phistep) * e1 + sin(phi+phistep) * e2) + h * e3,
+ center + r2 * (cos(phi ) * e1 + sin(phi ) * e2) + h * e3,
+ center + r2 * (cos(phi+phistep) * e1 + sin(phi+phistep) * e2) + h * e3
+ }
+ triangle {
+ center + r1 * (cos(phi ) * e1 + sin(phi ) * e2) - h * e3,
+ center + r1 * (cos(phi+phistep) * e1 + sin(phi+phistep) * e2) - h * e3,
+ center + r1 * (cos(phi+phistep) * e1 + sin(phi+phistep) * e2) + h * e3
+ }
+ triangle {
+ center + r1 * (cos(phi ) * e1 + sin(phi ) * e2) - h * e3,
+ center + r1 * (cos(phi+phistep) * e1 + sin(phi+phistep) * e2) + h * e3,
+ center + r1 * (cos(phi ) * e1 + sin(phi ) * e2) + h * e3
+ }
+ triangle {
+ center + r2 * (cos(phi ) * e1 + sin(phi ) * e2) - h * e3,
+ center + r2 * (cos(phi+phistep) * e1 + sin(phi+phistep) * e2) - h * e3,
+ center + r2 * (cos(phi+phistep) * e1 + sin(phi+phistep) * e2) + h * e3
+ }
+ triangle {
+ center + r2 * (cos(phi ) * e1 + sin(phi ) * e2) - h * e3,
+ center + r2 * (cos(phi+phistep) * e1 + sin(phi+phistep) * e2) + h * e3,
+ center + r2 * (cos(phi ) * e1 + sin(phi ) * e2) + h * e3
+ }
+ #declare phi = phi + phistep;
+ #end
+
+ triangle {
+ center + r1 * e1 - h * e3,
+ center + r1 * e1 + h * e3,
+ center + r2 * e1 + h * e3
+ }
+ triangle {
+ center + r2 * e1 - h * e3,
+ center + r2 * e1 + h * e3,
+ center + r1 * e1 - h * e3
+ }
+ triangle {
+ center + r1 * cos(phi) * e1 + r1 * sin(phi) * e2 - h * e3,
+ center + r2 * cos(phi) * e1 + r2 * sin(phi) * e2 - h * e3,
+ center + 0.5*(r1+r2) * (cos(phi + pi/12) * e1 + sin(phi + pi/12) * e2) - h * e3
+ }
+ triangle {
+ center + r1 * cos(phi) * e1 + r1 * sin(phi) * e2 + h * e3,
+ center + r2 * cos(phi) * e1 + r2 * sin(phi) * e2 + h * e3,
+ center + 0.5*(r1+r2) * (cos(phi + pi/12) * e1 + sin(phi + pi/12) * e2) + h * e3
+ }
+ triangle {
+ center + r1 * cos(phi) * e1 + r1 * sin(phi) * e2 - h * e3,
+ center + 0.5*(r1+r2) * (cos(phi + pi/12) * e1 + sin(phi + pi/12) * e2) - h * e3
+ center + r1 * cos(phi) * e1 + r1 * sin(phi) * e2 + h * e3
+ }
+ triangle {
+ center + 0.5*(r1+r2) * (cos(phi + pi/12) * e1 + sin(phi + pi/12) * e2) - h * e3
+ center + r1 * cos(phi) * e1 + r1 * sin(phi) * e2 + h * e3,
+ center + 0.5*(r1+r2) * (cos(phi + pi/12) * e1 + sin(phi + pi/12) * e2) + h * e3
+ }
+ triangle {
+ center + 0.5*(r1+r2) * (cos(phi + pi/12) * e1 + sin(phi + pi/12) * e2) - h * e3,
+ center + r2 * cos(phi) * e1 + r2 * sin(phi) * e2 - h * e3,
+ center + r2 * cos(phi) * e1 + r2 * sin(phi) * e2 + h * e3
+ }
+ triangle {
+ center + 0.5*(r1+r2) * (cos(phi + pi/12) * e1 + sin(phi + pi/12) * e2) - h * e3,
+ center + r2 * cos(phi) * e1 + r2 * sin(phi) * e2 + h * e3,
+ center + 0.5*(r1+r2) * (cos(phi + pi/12) * e1 + sin(phi + pi/12) * e2) + h * e3
+ }
+
+ pigment {
+ color rgb<1, 0.4, 0.4>
+ }
+}
+
+#end
+
+
+#macro circlearrow(fromdirection, axis, center, r, h)
+
+#declare e1 = vnormalize(fromdirection);
+#declare e2 = -vnormalize(vcross(axis, fromdirection));
+#declare e3 = vnormalize(axis);
+
+#declare r1 = 0.4 * r;
+#declare r2 = r;
+
+circlearrow0(e1, e2, e3, r1, r2)
+
+box {
+ center - r * (e1 + e2) - 0.021 * e3, center + r * (e1 + e2) + 0.021 * e3
+ pigment {
+ color rgb<0.6,0.6,1>
+ }
+}
+
+cone {
+ center + 0.02101 * e3, r, center + 2 * r * e3, 0
+ pigment {
+ color rgbt<0.6,0.6,1,0.8>
+ }
+}
+
+cylinder {
+ center, center + 2 * r * e3, 0.04*0.2
+ pigment {
+ color rgb<1.0,0.6,0.6>
+ }
+}
+
+#end
+
diff --git a/buch/papers/clifford/3d/dq.pov b/buch/papers/clifford/3d/dq.pov
new file mode 100644
index 0000000..92b702a
--- /dev/null
+++ b/buch/papers/clifford/3d/dq.pov
@@ -0,0 +1,25 @@
+//
+// dq.pov -- Drehung und Quaternion
+//
+// (c) 2021 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule
+//
+#include "common.inc"
+
+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)
+
+#declare l = 2.8;
+#declare h = 0.0001;
+union {
+ box { <-l,-l,-h>, <l,l,-h> }
+ box { <-l,-h,-l>, <l,-h,l> }
+ box { <-h,-l,-l>, <-h,l,l> }
+ pigment {
+ color rgbt<0.6,0.6,0.6,0.0>
+ }
+}