From 2180deab391444f58ce2a2f20d13f01c0cb69be7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Thu, 18 Aug 2022 20:09:42 +0200 Subject: new images --- buch/papers/parzyl/images/Makefile | 16 +++ buch/papers/parzyl/images/common.inc | 64 ++++++++++ buch/papers/parzyl/images/halfplane.jpg | Bin 0 -> 200681 bytes buch/papers/parzyl/images/halfplane.pdf | Bin 0 -> 208606 bytes buch/papers/parzyl/images/halfplane.png | Bin 0 -> 473623 bytes buch/papers/parzyl/images/halfplane.pov | 201 ++++++++++++++++++++++++++++++++ buch/papers/parzyl/images/halfplane.tex | 41 +++++++ 7 files changed, 322 insertions(+) create mode 100644 buch/papers/parzyl/images/Makefile create mode 100644 buch/papers/parzyl/images/common.inc create mode 100644 buch/papers/parzyl/images/halfplane.jpg create mode 100644 buch/papers/parzyl/images/halfplane.pdf create mode 100644 buch/papers/parzyl/images/halfplane.png create mode 100644 buch/papers/parzyl/images/halfplane.pov create mode 100644 buch/papers/parzyl/images/halfplane.tex (limited to 'buch/papers/parzyl/images') diff --git a/buch/papers/parzyl/images/Makefile b/buch/papers/parzyl/images/Makefile new file mode 100644 index 0000000..4bd13ec --- /dev/null +++ b/buch/papers/parzyl/images/Makefile @@ -0,0 +1,16 @@ +# +# Makefile to build 3d images +# +# (c) 2022 Prof Dr Andreas Müller +# + +all: halfplane.pdf + +halfplane.pdf: halfplane.tex halfplane.jpg + pdflatex halfplane.tex +halfplane.png: halfplane.pov + povray +A0.1 -W1920 -H1080 -Ohalfplane.png halfplane.pov +halfplane.jpg: halfplane.png Makefile + convert -extract 1280x1080+340+0 halfplane.png \ + -density 300 -units PixelsPerInch halfplane.jpg + diff --git a/buch/papers/parzyl/images/common.inc b/buch/papers/parzyl/images/common.inc new file mode 100644 index 0000000..28aed2b --- /dev/null +++ b/buch/papers/parzyl/images/common.inc @@ -0,0 +1,64 @@ +// +// common.inc -- some common useful tools for drawing 3d images +// +// (c) 2018 Prof Dr Andreas Müller, Hochschule Rapperswil +// + +// +// draw a right angle quarter circle at point with legs and and +// color +// +#declare rechterwinkelradius = 0.5; +#declare rechterwinkelthickness = 0.01; +#macro rechterwinkel(o, v1, v2, c) +intersection { + sphere { o, rechterwinkelradius } + #declare rnormale = vnormalize(vcross(v1, v2)); + plane { rnormale, vdot(o, rnormale) + rechterwinkelthickness * rechterwinkelradius / 0.5 } + plane { -rnormale, -vdot(o, rnormale) + rechterwinkelthickness * rechterwinkelradius / 0.5 } + plane { -v1, -vdot(o, v1) } + plane { -v2, -vdot(o, v2) } + pigment { + color c + } +} +sphere { o + 0.45 * (vnormalize(v1) +vnormalize(v2)) * rechterwinkelradius, + 0.05 * rechterwinkelradius / 0.5 + pigment { + color c + } +} +#end + +// +// 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 + diff --git a/buch/papers/parzyl/images/halfplane.jpg b/buch/papers/parzyl/images/halfplane.jpg new file mode 100644 index 0000000..8cb5ae3 Binary files /dev/null and b/buch/papers/parzyl/images/halfplane.jpg differ diff --git a/buch/papers/parzyl/images/halfplane.pdf b/buch/papers/parzyl/images/halfplane.pdf new file mode 100644 index 0000000..7275810 Binary files /dev/null and b/buch/papers/parzyl/images/halfplane.pdf differ diff --git a/buch/papers/parzyl/images/halfplane.png b/buch/papers/parzyl/images/halfplane.png new file mode 100644 index 0000000..5beefa0 Binary files /dev/null and b/buch/papers/parzyl/images/halfplane.png differ diff --git a/buch/papers/parzyl/images/halfplane.pov b/buch/papers/parzyl/images/halfplane.pov new file mode 100644 index 0000000..419bb67 --- /dev/null +++ b/buch/papers/parzyl/images/halfplane.pov @@ -0,0 +1,201 @@ +// +// 3dimage.pov +// +// (c) 2022 Prof Dr Andreas Müller +// +#version 3.7; +#include "colors.inc" +#include "skies.inc" +#include "common.inc" + +global_settings { + assumed_gamma 1 +} + +#declare imagescale = 0.63; +#declare ar = 0.02; + +#declare Cameracenter = <5,3,-4>; +#declare Worldpoint = <0,-0.80, 0>; +#declare Lightsource = < 7,10,-3>; +#declare Lightdirection = vnormalize(Lightsource - Worldpoint); +#declare Lightaxis1 = vnormalize(vcross(Lightdirection, <0,1,0>)); +#declare Lightaxis2 = vnormalize(vcross(Lightaxis1, Lightdirection)); + +camera { + location Cameracenter + look_at Worldpoint + right 16/9 * x * imagescale + up y * imagescale +} + +light_source { + Lightsource color White + area_light Lightaxis1 Lightaxis2, 10, 10 + adaptive 1 + jitter +} + +sky_sphere { + pigment { + color White + } +} + +arrow( <-2.1, 0, 0 >, < 2.2, 0, 0 >, ar, White) +arrow( < 0, -1.1, 0 >, < 0, 1.3, 0 >, ar, White) +arrow( < 0, 0, -2 >, < 0, 0, 2.2 >, ar, White) + +#declare planecolor = rgb<0.2,0.6,1.0>; +#declare r = 0.01; + +#macro planebox() + box { <-2.1,-1.1,-2.1>, <0,1.1,2.1> } +#end + +intersection { + plane { <0, 0, 1>, 0.001 } + plane { <0, 0, -1>, 0.001 } + planebox() + pigment { + color planecolor transmit 0.3 + } + finish { + metallic + specular 0.95 + } +} + +#declare Xstep = 0.2; + +intersection { + union { + #declare X = 0; + #while (X > -2.5) + cylinder { , , r } + #declare X = X - Xstep; + #end + + #declare Y = Xstep; + #while (Y < 2.5) + cylinder { <-3, Y, 0>, <0, Y, 0>, r } + cylinder { <-3, -Y, 0>, <0, -Y, 0>, r } + #declare Y = Y + Xstep; + #end + } + planebox() + pigment { + color planecolor + } + finish { + metallic + specular 0.95 + } +} + +#declare parammin = -4; +#declare parammax = 4; +#declare paramsteps = 100; +#declare paramstep = (parammax - parammin) / paramsteps; + +#macro punkt(sigma, tau, Z) + < + 0.5 * (tau*tau - sigma*sigma) + Z, + sigma * tau, + > +#end + +#macro sigmasurface(sigma, farbe) + #declare taumin1 = 2/sigma; + #declare taumin2 = sqrt(4+sigma*sigma); + #if (taumin1 > taumin2) + #declare taumin = -taumin2; + #else + #declare taumin = -taumin1; + #end + + mesh { + #declare tau = taumin; + #declare taumax = -taumin; + #declare taustep = (taumax - taumin) / paramsteps; + #while (tau < taumax - taustep/2) + triangle { + punkt(sigma, tau, -1), + punkt(sigma, tau, 0), + punkt(sigma, tau + taustep, -1) + } + triangle { + punkt(sigma, tau + taustep, -1), + punkt(sigma, tau + taustep, 0), + punkt(sigma, tau, 0) + } + #declare tau = tau + taustep; + #end + pigment { + color farbe + } + finish { + specular 0.9 + metallic + } + } + + union { + #declare tau = taumin; + #declare taumax = -taumin; + #declare taustep = (taumax - taumin) / paramsteps; + #while (tau < taumax - taustep/2) + sphere { punkt(sigma, tau, 0), r } + cylinder { + punkt(sigma, tau, 0), + punkt(sigma, tau + taustep, 0), + r + } + #declare tau = tau + taustep; + #end + sphere { punkt(sigma, tau, 0), r } + pigment { + color farbe + } + finish { + specular 0.9 + metallic + } + + } +#end + +#declare greensurfacecolor = rgb<0.6,1.0,0.6>; +#declare redsurfacecolor = rgb<1.0,0.6,0.6>; + +sigmasurface(0.25, greensurfacecolor) +sigmasurface(0.5, greensurfacecolor) +sigmasurface(0.75, greensurfacecolor) +sigmasurface(1, greensurfacecolor) +sigmasurface(1.25, greensurfacecolor) +sigmasurface(1.5, greensurfacecolor) +sigmasurface(1.75, greensurfacecolor) +sigmasurface(2, greensurfacecolor) + +union { + sigmasurface(0.25, redsurfacecolor) + sigmasurface(0.5, redsurfacecolor) + sigmasurface(0.75, redsurfacecolor) + sigmasurface(1.00, redsurfacecolor) + sigmasurface(1.25, redsurfacecolor) + sigmasurface(1.5, redsurfacecolor) + sigmasurface(1.75, redsurfacecolor) + sigmasurface(2, redsurfacecolor) + rotate <0, 180, 0> +} + +box { <-2,-1,-2>, <2,-0.99,2> + pigment { + color rgb<1.0,0.8,0.6> transmit 0.8 + } + finish { + specular 0.9 + metallic + } +} diff --git a/buch/papers/parzyl/images/halfplane.tex b/buch/papers/parzyl/images/halfplane.tex new file mode 100644 index 0000000..e470057 --- /dev/null +++ b/buch/papers/parzyl/images/halfplane.tex @@ -0,0 +1,41 @@ +% +% halfplane.tex +% +% (c) 2021 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule +% +\documentclass[tikz]{standalone} +\usepackage{times} +\usepackage{amsmath} +\usepackage{txfonts} +\usepackage[utf8]{inputenc} +\usepackage{graphics} +\usetikzlibrary{arrows,intersections,math} +\usepackage{ifthen} +\begin{document} + +\newboolean{showgrid} +\setboolean{showgrid}{false} +\def\breite{5} +\def\hoehe{4} + +\begin{tikzpicture}[>=latex,thick] + +% Povray Bild +\node at (0,0) {\includegraphics[width=10cm]{halfplane.jpg}}; + +% Gitter +\ifthenelse{\boolean{showgrid}}{ +\draw[step=0.1,line width=0.1pt] (-\breite,-\hoehe) grid (\breite, \hoehe); +\draw[step=0.5,line width=0.4pt] (-\breite,-\hoehe) grid (\breite, \hoehe); +\draw (-\breite,-\hoehe) grid (\breite, \hoehe); +\fill (0,0) circle[radius=0.05]; +}{} + +\node at (0,3.7) {$z$}; +\node at (3.3,-0.3) {$x$}; +\node at (2.7,2.5) {$y$}; + +\end{tikzpicture} + +\end{document} + -- cgit v1.2.1