Ein Spaziergang durch die heutigen Grafik-Fähigkeiten - TeX ...tex.world/grafik.pdfGrundlagen:...

Post on 14-Mar-2021

0 views 0 download

Transcript of Ein Spaziergang durch die heutigen Grafik-Fähigkeiten - TeX ...tex.world/grafik.pdfGrundlagen:...

Grafik mit LATEXEin Spaziergang durch die heutigen Grafik-Fähigkeiten

Stefan KottwitzPassau, April 6, 2018

Quellen:Eigenes, LaTeX-Cookbook.net, TeXample.net, TikZ.de, PGFplots.net,tex.stackexchange.com

Inhalt

1. Grundlagen: Knoten und Kanten

2. Farbige Diagramme und Charts

3. Trees

4. Mathematik: Klassische Geometrie

5. Mathematik: Funktionen und Flächen plotten

6. Chemie

7. Nur ein paar weitere Beispiele als Demo der Vielfalt

1

Grundlagen: Knoten und Kanten

Einfaches Diagramm

1

2

3

4

Knoten zeichnen2

Einfaches Diagramm - Code

\begintikzpicture [auto ,node distance = 3cm,

every node/.style = circle , draw ,

font = \sffamily \Large \bfseries ]

\node (1) 1;

\node (2) [below left of = 1] 2;

\node (3) [below right of = 2] 3;

\node (4) [below right of = 1] 4;

\endtikzpicture

3

Einfaches Diagramm

1

2

3

4

Knoten zeichnen2

Einfaches Diagramm

1

2

3

4

0.60.4

0.3

0.8 0.2

Knoten und Kanten zeichnen4

Einfaches Diagramm - Code

\path[every node/.style = font = \sffamily \small ]

(1) edge node [left] 0.6 (4)

(2) edge node [right] 0.4 (1)

edge node 0.3 (4)

(3) edge node [right] 0.8 (2)

(4) edge node [left] 0.2 (3);

5

Einfaches Diagramm

1

2

3

4

0.60.4

0.3

0.8 0.2

Knoten und Kanten zeichnen4

Einfaches Positionieren

Ft(x) F (x)

At A

BX

Bt

BT

∃BT

Matrix verwenden6

Einfaches Positionieren mit Matrix - Code

\begintikzpicture

\matrix (m) [matrix of math nodes ,

row sep = 3em,

column sep = 4em,

minimum width = 2em]

F_t(x) & F(x) \\

A_t & A \\

;

\path[-stealth]

(m-1-1) edge node [left] $B_X$ (m-2-1)

edge [double] node [below] $B_t$ (m-1-2)

(m-2-1. east|-m-2-2)

edge node [below] $B_T$

node [above] $ \exists $ (m-2-2)

(m-1-2) edge node [right] $B_T$ (m-2-2)

edge [dashed ,-] (m-2-1);

\endtikzpicture 7

Einfaches Positionieren

Ft(x) F (x)

At A

BX

Bt

BT

∃BT

Matrix verwenden6

Einfacher Flowchart

Edit LATEX BibTEX/biber

make-index

LATEX

Allgemeiner TeX Workflow, mit smartdiagram-Paket

8

Einfacher Flowchart - Code

\documentclass[border =10pt] standalone

\usepackagesmartdiagram

\begindocument

\smartdiagram[flow diagram:horizontal ]

Edit , \LaTeX , Bib \TeX/ biber , make\-index , \LaTeX

\enddocument

9

Einfacher Flowchart

Edit LATEX BibTEX/biber

make-index

LATEX

Allgemeiner TeX Workflow, mit smartdiagram-Paket

8

Kreis-Diagramm

Edit

pdfLATEX

BibTEX/biber

make-index

pdfLATEX

Wähle Uhrzeiger- oder gegen Uhrzeigersinn und eine Zahl von Knoten10

Kreis-Diagramm - Code

\documentclass[border =10pt] standalone

\usepackagesmartdiagram

\begindocument

\smartdiagram[circular diagram:clockwise ]

Edit ,

pdf\LaTeX ,

Bib \TeX/ biber ,

make\-index ,

pdf \LaTeX

\enddocument

11

Kreis-Diagramm

Edit

pdfLATEX

BibTEX/biber

make-index

pdfLATEX

Wähle Uhrzeiger- oder gegen Uhrzeigersinn und eine Zahl von Knoten10

Blasen-Diagramm

TEX engines

TEX (dvi)

pdfTEX

XƎTEX

LuaTEX

ConTEXt

Transparente überlappende Kreis-Scheiben12

Blasen-Diagramm - Code

\usepackagesmartdiagram

\usepackagemetalogo ,dtk -logos

...

\smartdiagram[bubble diagram ]\TeX\ engines ,

\TeX\ (dvi),

pdf\TeX ,

\XeTeX ,

\LuaTeX ,

Con \TeX t

13

Blasen-Diagramm

TEX engines

TEX (dvi)

pdfTEX

XƎTEX

LuaTEX

ConTEXt

Transparente überlappende Kreis-Scheiben12

Konstellations-Diagramm

TEXsoftware

Editor

Compiler

Con-verter

PDFReader

Vom Zentrum nach außen in alle Richtungen14

Konstellations-Diagramm - Code

\usepackagesmartdiagram

...

\smartdiagram[constellation diagram ]

\TeX\ software ,

Editor ,

Compiler ,

Converter ,

PDF Reader

15

Konstellations-Diagramm

TEXsoftware

Editor

Compiler

Con-verter

PDFReader

Vom Zentrum nach außen in alle Richtungen14

Beschreibendes Diagramm

StyleDefine shapes, colors, shading, and

line styles for nodes and arrows

PositionPlace nodes using a matrix,

relative or absolute positioning

RelationInsert edges or arrowsbetween selected nodes

Label Add labels on edges or arrows

Schick angeordnete Texte mit Erklärungen16

Beschreibendes Diagramm - Code

\usepackagesmartdiagram

...

\smartdiagram[descriptive diagram ]

Style , Define shapes , colors , shading ,

and line styles for nodes and arrows,

Position , Place nodes using a matrix ,

relative or absolute positioning ,

Relation , Insert edges or arrows

between selected nodes,

Label , Add labels on edges or arrows

17

Beschreibendes Diagramm

StyleDefine shapes, colors, shading, and

line styles for nodes and arrows

PositionPlace nodes using a matrix,

relative or absolute positioning

RelationInsert edges or arrowsbetween selected nodes

Label Add labels on edges or arrows

Schick angeordnete Texte mit Erklärungen16

Geordnetes beschreibendes Diagramm

Develop a document structure

Choose a document class

Select suitable packages

Setup the document preamble

Write your document

Finetune the layout

Wenn das beschreibende Diagramm eine bestimmte Reihenfolge hat18

Geordnetes beschreibendes Diagramm - Code

\usepackagesmartdiagram

...

\smartdiagram[priority descriptive diagram ]

Develop a document structure ,

Choose a document class ,

Select suitable packages ,

Setup the document preamble ,

Write your document ,

Finetune the layout

19

Geordnetes beschreibendes Diagramm

Develop a document structure

Choose a document class

Select suitable packages

Setup the document preamble

Write your document

Finetune the layout

Wenn das beschreibende Diagramm eine bestimmte Reihenfolge hat18

Summary

• Einfache Eingabe, schicke Ausgabe• Einfach Stil wählen und Liste angeben• Automatisch angeordnet, mit Symmetrie und gleichen Abständen• Farben, Pfeilspitzen und Stile können angepasst werden

20

FlowchartsFormula

single-line? equation

centered? gather

aligned atrelationsign?

align,

flalign

alignedat severalplaces?

alignat

first left,centered,last right?

multline

numbered?

Add a * Done

no

no

no

no

yes

yes

yes

yes

yes

no

no,re

consi

der

yes

Selbst gemachte Flowcharts sind auch nicht schwer. 21

Stile definieren, Stile erben

\usetikzlibrarymatrix ,calc ,shapes

\tikzset

treenode /.style = shape=rectangle , rounded corners ,

draw , anchor=center ,

text width=5em, align=center ,

top color=white , bottom color=blue

!20,

inner sep=1ex,

decision /.style = treenode , diamond , inner sep=0pt,

root/.style = treenode , font=\Large , bottom color

=red!30,

env/.style = treenode , font=\ttfamily \normalsize

,

finish /.style = root , bottom color=green !40,

dummy/.style = circle ,draw

22

In Matrix anordnen

column 1/. style = nodes= decision,

column 2/. style = nodes=env

]

|[root]| Formula & \\

single -line? & equation \\

centered? & gather \\

aligned at relation sign? & align , flalign \\

aligned at several places? & alignat \\

first left , centered ,

last right? & multline \\

& & |[ decision ]| numbered? \\

& & |[ treenode ]| Add a \texttt * & |[ finish ]|

Done \\

;

23

Kanten kann man einfach mit Schleifen zeichnen.

\newcommand\yesedge node [above] yes

\newcommand\no edge node [left] no

\draw

(chart -1-1) edge (chart -2-1)

\foreach \x/\y in 2/3, 3/4, 4/5, 5/6

(chart -\x -1) \no (chart -\y -1)

\foreach \x in 2,...,6

(chart -\x -1) \yes (chart -\x -2)

(chart -7-3) \no (chart -8-3)

(chart -8-3) edge (chart -8-4);

\draw

(chart -6-1) -- +(-2,0) |- (chart -1-1)

node[near start ,sloped ,above] no, reconsider ;

24

FlowchartsFormula

single-line? equation

centered? gather

aligned atrelationsign?

align,

flalign

alignedat severalplaces?

alignat

first left,centered,last right?

multline

numbered?

Add a * Done

no

no

no

no

yes

yes

yes

yes

yes

no

no,re

consi

der

yes

Selbst gemachte Flowcharts sind auch nicht schwer. 21

Torten-Diagramme

TEX Live and MacTEX

62%

MiKTEX and ProTEXt

32%

Other TEX

6%

Populär, um Anteile zu zeigen. Alles zusammen ergibt 100%. Dargestellt alsTeile einer Kreis-Scheibe. 25

Torten-Diagramme - ganz einfach

\documentclass[border =10pt] standalone

\usepackagepgf -pie

\begindocument

\begintikzpicture

\pie [rotate = 180]

62/ \TeX\ Live and Mac\TeX ,

32/MiK \TeX\ and Pro \TeX t,

6/Other \TeX

\endtikzpicture

\enddocument

26

Torten-Diagramme

TEX Live and MacTEX

62%

MiKTEX and ProTEXt

32%

Other TEX

6%

Populär, um Anteile zu zeigen. Alles zusammen ergibt 100%. Dargestellt alsTeile einer Kreis-Scheibe. 25

Polar-Diagramm

62%

32%

6%

TEX Live and MacTEX

MiKTEX and ProTEXt

Other TEX

Polar-Diagramm mit selbem Paket

27

Polar-Diagramm - Code

\documentclass[border = 10pt] standalone

\usepackagepgf -pie

\begindocument

\begintikzpicture

\pie [polar , explode =0.1, text=legend]

62/ \TeX\ Live and Mac\TeX ,

32/MiK \TeX\ and Pro \TeX t,

6/Other \TeX

\endtikzpicture

\enddocument

28

Polar-Diagramm

62%

32%

6%

TEX Live and MacTEX

MiKTEX and ProTEXt

Other TEX

Polar-Diagramm mit selbem Paket

27

Cloud-Diagramm

TEX Live and MacTEX62%

MiKTEX and ProTEXt32%

Other TEX6%

Selbes Paket29

Cloud-Diagramm - Code

\documentclass[border = 10pt] standalone

\usepackagepgf -pie

\begindocument

\begintikzpicture

\pie [cloud , text=inside , scale font , radius =6]

62/ \TeX\ Live and Mac\TeX ,

32/MiK \TeX\ and Pro \TeX t,

6/Other \TeX

\endtikzpicture

\enddocument

30

Cloud-Diagramm

TEX Live and MacTEX62%

MiKTEX and ProTEXt32%

Other TEX6%

Selbes Paket29

Quadratisches Diagramm

62%

TEX Live and MacTEX

32% MiKTEX and ProTEXt

6%

Other TEX

Selbes Paket, andere Darstellung31

Quadratisches Diagramm - Code

\documentclass[border = 10pt] standalone

\usepackagepgf -pie

\begindocument

\begintikzpicture

\pie [square , scale font ,

color = blue!10, blue!20, blue !40]

62/ \TeX\ Live and Mac\TeX ,

32/MiK \TeX\ and Pro \TeX t,

6/Other \TeX

\endtikzpicture

\enddocument

32

Quadratisches Diagramm

62%

TEX Live and MacTEX

32% MiKTEX and ProTEXt

6%

Other TEX

Selbes Paket, andere Darstellung31

Balken-Diagramm

LaTeX

Tools

Distributions

Editors

57,727

5,672

2,193

11,106

14,320

1,615

560

3,075

Contributions per category at LaTeX-Community.org

Topics

Posts

Auf Daten basierender Plot33

Balken-Diagramm - Code

\begintikzpicture

\beginaxis[title = Contributions per category

at LaTeX -Community.org ,

xbar , nodes near coords ,

y axis line style = opacity = 0 ,

axis x line = none ,

tickwidth = 0pt,

symbolic y coords = LaTeX , Tools , Distributions ,

Editors,

]

\addplot coordinates (57727 , LaTeX) (5672, Tools)

(2193, Distributions) (11106 , Editors) ;

\addplot coordinates (14320 , LaTeX) (1615, Tools)

(560, Distributions) (3075, Editors);

\legendTopics , Posts

\endaxis

\endtikzpicture

34

Balken-Diagramm

LaTeX

Tools

Distributions

Editors

57,727

5,672

2,193

11,106

14,320

1,615

560

3,075

Contributions per category at LaTeX-Community.org

Topics

Posts

Auf Daten basierender Plot33

3D Torten-Diagramm

Corporate

26%

Plastique

28%

Rhodia

12.5%

Chimique

43.5%

Via \piechartthreed macro by Alain Matthes (code weggelassen)

35

Mindmaps

Computer Science practical

algorithms

datastructures

pro-gramminglanguages

softwareengineering

applied

databases

WWW

technical

theoretical

Einfach und schnell36

Mindmap - Code

\path[mindmap ,concept color=black ,text=white]

node[concept] Computer Science [clockwise from =0]

child[concept color=green !50! black]

node[concept] practical [clockwise from =90]

child node[concept] algorithms

child node[concept] data structures

child node[concept] pro\-gramming languages

child node[concept] software engineer\-ing

child[concept color=blue]

node[concept] applied [clockwise from =-30]

child node[concept] databases

child node[concept] WWW

child[concept color=red] node[concept] technical

child[concept color=orange] node[concept]

theoretical ;

37

Mindmaps

Computer Science practical

algorithms

datastructures

pro-gramminglanguages

softwareengineering

applied

databases

WWW

technical

theoretical

Einfach und schnell36

Es kann auch umfangreicher werden.

Wir können auch Notizen hinzufügen, hier als rechteckige Knoten mit Textenoder Listen 38

Mit 3d Aussehen

TEX Engines

TEX

pdfTEX

X ETEX

LuaTEX

Formats

LATEXConTEXt

Systems

TEXLive

MacTEX

MiKTEX

ProTEXt

Editors

Ein 3d Kugel-Stil für anderes Aussehen39

Farbige Diagramme und Charts

Transparente Überschneidungen

Typography

Design Coding

LATEX

Venn-Diagram40

Transparente Überschneidungen - Code

\begintikzpicture

\beginscope[blend group = soft light]

\fill[red !30! white] ( 90:1.2) circle (2);

\fill[green !30! white] (210:1.2) circle (2);

\fill[blue !30! white] (330:1.2) circle (2);

\endscope

\node at ( 90:2) Typography ;

\node at ( 210:2) Design ;

\node at ( 330:2) Coding ;

\node [font=\Large] \LaTeX ;

\endtikzpicture

41

Transparente Überschneidungen

Typography

Design Coding

LATEX

Venn-Diagram40

Trees

Vertikaler Baum

Formulas

single-line multi-line

aligned at

relation sign several places center

first left,centered,last right

Abgerundeter Knoten-Stil mit Farbverlauf

42

Vertikaler Baum

\begintikzpicture [ sibling distance =10em,

every node/.style = shape=rectangle , rounded corners ,

draw , align=center ,

top color=white , bottom color=blue !20]]

\node Formulas

child node single -line

child node multi -line

child node aligned at

child node relation sign

child node several places

child node center

child node first left ,\\centered ,\\last right

;

\endtikzpicture

43

Vertikaler Baum

Formulas

single-line multi-line

aligned at

relation sign several places center

first left,centered,last right

Abgerundeter Knoten-Stil mit Farbverlauf

42

Horizontaler Baum

Formula

equation

single-line?

align

flalign

at relation sign?

alignatat several

places?

gather

center

ed?

aligned?

multlinefirst left,

centered,

lastrigh

t

multi-line?

Entscheidungs-Baum

44

Horizontaler Baum

\tikzset

treenode /.style = shape = rectangle , rounded corners ,

draw , align = center ,

top color = white , bottom color = blue !20

\begintikzpicture

[

grow = right ,

sibling distance = 6em,

level distance = 10em,

edge from parent /.style = draw , -latex,

every node/.style = font=\footnotesize,

sloped

]

\node [root] Formula

child node [env] equation

edge from parent node [below] single -line?

45

Horizontaler Baum

Formula

equation

single-line?

align

flalign

at relation sign?

alignatat several

places?

gather

center

ed?

aligned?

multlinefirst left,

centered,

lastrigh

t

multi-line?

Entscheidungs-Baum

44

Mathematik: KlassischeGeometrie

Geometrische Konstruktionen

A

M

a

c

B

C

b

N

Das tkz-euclide-Paket basiert auf TikZ, für klassische Euklidische Geometrie46

Geometrische Konstruktionen - Code

\usepackagetkz -euclide

\begintikzpicture

\tkzDefPoints 0/0/A, 5/0/B, 1/4/C

\tkzDefCircle[in](A,B,C)

\tkzGetPointM

\tkzGetLengthr

\tkzDefCircle[circum ](A,B,C)

\tkzGetPointN

\tkzGetLengthR

\tkzDefPointBy[projection=onto A--B](M)

\tkzGetPointa

\tkzDefPointBy[projection=onto B--C](M)

\tkzGetPointb

\tkzDefPointBy[projection=onto A--C](M)

\tkzDrawCircle[R](M,\r pt)

\tkzDrawCircle[R](N,\R pt)

\tkzDrawPolygon[very thick](A,B,C)

\tkzDrawLines[dotted ](N,A N,B N,C)

\endtikzpicture 47

Geometrische Konstruktionen

A

M

a

c

B

C

b

N

Das tkz-euclide-Paket basiert auf TikZ, für klassische Euklidische Geometrie46

Releux-Dreieck

A

B

D

C

E

α

β

90

Reuleauxtriangle

hypotenuse

oppo

site

adjacent Thales circle

Ein weiteres tkz-euclide Beispiel48

Releux triangle - Code

\usepackagetkz -euclide

\begintikzpicture

\tkzDefPoint (0,0)A

\tkzDefPoint (4,1)B

\tkzInterCC(A,B)(B,A)

\tkzGetPointsCD

\tkzLabelPoints[below left](A)

\tkzLabelPoints(B,D)

\tkzDrawPolygon(A,B,C)

\tkzDrawCircle[dotted ](A,B)

\tkzDrawArc[fill=blue!10,thick](A,B)(C)

\tkzLabelSegment[below =0.6cm, align=center ,

font=\small ](A,B)Reuleaux \\triangle

\endtikzpicture

49

Releux-Dreieck

A

B

D

C

E

α

β

90

Reuleauxtriangle

hypotenuse

oppo

site

adjacent Thales circle

Ein weiteres tkz-euclide Beispiel48

Mathematik: Funktionen undFlächen plotten

Funktionen plotten

a ζ b

f(ζ)

Auch Füllen zwischen Funktionen ist einfach.50

Funktionen plotten - Code

\beginaxis [

axis y line = left , axis x line = bottom ,

xtick = -1.2,2,4.2, ytick = 3,

xticklabels = $a$,$\zeta$,$b$,

yticklabels = $f(\zeta)$,

domain = -1.2:4.2,

xmin = -2, xmax = 5,

ymin = -5, ymax = 10,

]

\addplot[name path=poly , black , thick , mark=none]

-x^3+5*(x^2) -3*x-3;

\addplot[name path=line , gray , no markers ,

line width=1pt] 3;

\addplot fill between[

of = poly and line , split ,

every even segment /.style = orange !70,

every odd segment /.style = gray !60

];

\endaxis 51

Funktionen plotten

a ζ b

f(ζ)

Auch Füllen zwischen Funktionen ist einfach.50

Polar-Plot

0

30

6090

120

150

180

210

240270

300

330

0 1 2 3

Eine Sinus-Funktion52

Polar plot - Code

\documentclass[border =10pt] standalone

\usepackagepgfplots

\usepgfplotslibrarypolar

\begindocument

\begintikzpicture

\beginpolaraxis [

domain = -3600:3600 ,

samples = 4000

]

\addplot[blue !50! black] 1-sin (50*x/49) - sin(8*x);

\endpolaraxis

\endtikzpicture

\enddocument

53

Polar-Plot

0

30

6090

120

150

180

210

240270

300

330

0 1 2 3

Eine Sinus-Funktion52

Polar-Plot in 3d

−20

2 −2

0

2−20

0

20

Die gleiche Funktion in 3d54

Polar-Plot in 3d - Code

\documentclass[border =10pt] standalone

\usepackagepgfplots

\begindocument

\begintikzpicture

\beginaxis[

domain = -180:180,

y domain = -19:19,

samples y = 39,

samples = 100,

z buffer = sort ,

colormap/cool ,

grid

]

\addplot 3[data cs = polar , surf]

( x, 1 - sin (50*(x+360*y)/49) - sin (8*(x+360*y)

), y );

\endaxis

\endtikzpicture

\enddocument 55

Polar-Plot in 3d

−20

2 −2

0

2−20

0

20

Die gleiche Funktion in 3d54

Oberflächen-Plot

−2 −1 0 1 2 −1

0

1−0.5

0

0.5

xy

x exp(−x2 − y2)

Oberflächen-Plot einer Funktion56

Oberflächen-Plot - Code

\documentclass[border =10pt] standalone

\usepackagepgfplots

\pgfplotssetwidth =7cm,compat =1.8

\begindocument

\begintikzpicture

\beginaxis[

title =$x \exp(-x^2-y^2)$,

xlabel =$x$, ylabel =$y$,

small ,

]

\addplot 3[

surf ,

domain =-2:2,

domain y= -1.3:1.3 ,

]

exp(-x^2-y^2)*x;

\endaxis

\endtikzpicture

\enddocument 57

Oberflächen-Plot

−2 −1 0 1 2 −1

0

1−0.5

0

0.5

xy

x exp(−x2 − y2)

Oberflächen-Plot einer Funktion56

Beispiel: reduzierte Achsen

0

100

200

3000 50 100

150200

250300

350

−1

0

1

Christian Feuersänger, http://pgfplots.net/tikz/examples/tufte-3d-axes/

58

Beispiel: Oberflächen-Plots und Kontur-Plots

http://pgfplots.net/tikz/examples/contour-and-surface/59

Mandelbrot-Menge

−1.5 −1 −0.5 0 0.5−1

−0.5

0

0.5

1

0

10

20

30

2d Fraktale Struktur, iterierte Berechnung, Lua zur Berechnunghttp://pgfplots.net/tikz/examples/mandelbrot/ 60

Mandelbrot-Menge - Codestück

\beginluacode

function mandelbrot(cx,cy, max_iter , max)

while (squaresum <= max) and (iter < max_iter) do

xtemp = x * x - y * y + cx ...

squaresum = x * x + y * y

...

tex.print(result);

\endluacode

\beginaxis[

colorbar ,

point meta max=30,

tick label style=font=\tiny,

view =090]

\addplot3 [surf ,domain = -1.5:0.5 , shader=interp ,domain

y=-1:1, samples =300]

\directluamandelbrot(\pgfmathfloatvalueof\x,

\pgfmathfloatvalueof\y ,10000 ,4) ;

\endaxis61

Mandelbrot-Menge

−1.5 −1 −0.5 0 0.5−1

−0.5

0

0.5

1

0

10

20

30

2d Fraktale Struktur, iterierte Berechnung, Lua zur Berechnunghttp://pgfplots.net/tikz/examples/mandelbrot/ 60

Julia-Menge

−1 0 1

−1

0

1

0

20

40

Christian Feuersänger, http://pgfplots.net/tikz/examples/julia/62

Oberfläche verdrehen

Konstruktions-Schritte: http://tex-talk.net/2017/07/twisted-surface/63

Oberfläche verdrehen - Codestück

\beginaxis[axis equal , hide axis ,

/tikz/background rectangle /.style =

left color = black ,

right color = black!20,

shading angle = 135 ,

show background rectangle ]

\addplot 3[

surf , shader = flat ,

miter limit = 1,

domain = 0:360,

y domain = 0:360,

samples = 100,

samples y = 70,

z buffer = sort ,

colormap/hot2 ]

( (6+( sin (3*(x+3*y))+1.25)*cos(x))*cos(y),

(6+( sin (3*(x+3*y))+1.25)*cos(x))*sin(y),

((sin (3*(x+3*y))+1.25)*sin(x)) );

\endaxis 64

Oberfläche verdrehen

Konstruktions-Schritte: http://tex-talk.net/2017/07/twisted-surface/63

Blume

3d Parameter-Plot: http://tikz.de/pgfplots-grad-radiant/65

Blume - Code snippet

\def\r(sin(4*u)^3+cos(2*u)^3+sin(6*v)^2+cos(6*v)^4)

\beginaxis[

view = 120310 , hide axis ,

colormap = flower

color(0cm) = (yellow);

color(4cm) = (yellow !70! red);

color(8cm) = (red !60! black);

color (12cm) = (red !90! black);

color (16cm) = (green);

color (20cm) = (green !20! black) ]

\addplot3 [ surf ,

z buffer = sort , point meta = u,

domain = 0:180, domain y = 0:360,

samples = 80, samples y = 80,

variable = \u , variable y = \v ]

( \r*sin(u)*cos(v) ,

\r*cos(u) ,

\r*sin(u)*sin(v) );

\endaxis 66

Blume

3d Parameter-Plot: http://tikz.de/pgfplots-grad-radiant/65

Weitere Blume

3d Parameter-Plot: http://tikz.de/pgfplots-grad-radiant/ 67

Chemie

Moleküle

C

H C

H

C

H

C

HC

H

C

H

Benzene

Benzene-Ring

68

Benzene-Ring - Code

\documentclass[border =10pt] standalone

\usepackagechemfig

\begindocument

\chemfigC*6((-H)-C(-H)=C(-H)-C(-H)=C(-H)-C(-H)=)

\hspace 2cm

\chemname\chemfig *6(=-=-=-) Benzene

\enddocument

69

Moleküle

C

H C

H

C

H

C

HC

H

C

H

Benzene

Benzene-Ring

68

Moleküle

C

OH

C OHH

COH H

C OHH

C OHH

C OHH

H

O

OH

OH

OH

OH

OH

OH

OH

O

OH

OH

OH

OH

O

OH

OH

OH

OH

OH

O

OHOH

OH

OH

Glukose-Modelle70

Glukose-Modelle - Code

\documentclass[varwidth ,border =20pt] standalone

\usepackagecarbohydrates

\begindocument

\centering

\glucose[model=fischer ,chain]

\hspace 2cm

\glucose[model= fischer=skeleton,chain]

\vspace 1cm

\glucose[model=haworth ,chain]~

\glucose[model=haworth ,ring]~

\glucose[model=chair ,ring]

\enddocument

71

Moleküle

C

OH

C OHH

COH H

C OHH

C OHH

C OHH

H

O

OH

OH

OH

OH

OH

OH

OH

O

OH

OH

OH

OH

O

OH

OH

OH

OH

OH

O

OHOH

OH

OH

Glukose-Modelle70

Atome

F Na+

Fluor und Sodium-Ion

72

Atome - Code

\documentclass[border =-370pt 10pt 10pt 10pt]

standalone

\usepackagebohr

\begindocument

\bohr 10F

\setbohrnucleus -radius =1.5em

\bohr [3]10$ \mathrmNa^+$

\enddocument

Mehr ist nicht nötig.

73

Atome

F Na+

Fluor und Sodium-Ion

72

Example: Verrostendes Eisen

2-

2-

3+

3+

2-

2-

2-

Jason Waskiewicz, http://texample.net/tikz/examples/rusting-iron/

74

Example: Gruppierung von Atomen

potent perimeter sites

Non−metallic molecule

extra electron

single metal atom

Agustin E. Bolzan,http://texample.net/tikz/examples/clusters-of-atoms/

75

Example: Periodische Tabelle der Chemischen Elemente

1 1.0079

H

Hydrogen

3 6.941

Li

Lithium

11 22.990

Na

Sodium

19 39.098

K

Potassium

37 85.468

Rb

Rubidium

55 132.91

Cs

Caesium

87 223

Fr

Francium

4 9.0122

Be

Beryllium

12 24.305

Mg

Magnesium

20 40.078

Ca

Calcium

38 87.62

Sr

Strontium

56 137.33

Ba

Barium

88 226

Ra

Radium

21 44.956

Sc

Scandium

39 88.906

Y

Yttrium

57-71

La-Lu

Lanthanide

89-103

Ac-Lr

Actinide

22 47.867

Ti

Titanium

40 91.224

Zr

Zirconium

72 178.49

Hf

Halfnium

104 261

Rf

Rutherfordium

23 50.942

V

Vanadium

41 92.906

Nb

Niobium

73 180.95

Ta

Tantalum

105 262

Db

Dubnium

24 51.996

Cr

Chromium

42 95.94

Mo

Molybdenum

74 183.84

W

Tungsten

106 266

Sg

Seaborgium

25 54.938

Mn

Manganese

43 96

Tc

Technetium

75 186.21

Re

Rhenium

107 264

Bh

Bohrium

26 55.845

Fe

Iron

44 101.07

Ru

Ruthenium

76 190.23

Os

Osmium

108 277

Hs

Hassium

27 58.933

Co

Cobalt

45 102.91

Rh

Rhodium

77 192.22

Ir

Iridium

109 268

Mt

Meitnerium

28 58.693

Ni

Nickel

46 106.42

Pd

Palladium

78 195.08

Pt

Platinum

110 281

Ds

Darmstadtium

29 63.546

Cu

Copper

47 107.87

Ag

Silver

79 196.97

Au

Gold

111 280

Rg

Roentgenium

30 65.39

Zn

Zinc

48 112.41

Cd

Cadmium

80 200.59

Hg

Mercury

112 285

Uub

Ununbium

31 69.723

Ga

Gallium

13 26.982

Al

Aluminium

5 10.811

B

Boron

49 114.82

In

Indium

81 204.38

Tl

Thallium

113 284

Uut

Ununtrium

6 12.011

C

Carbon

14 28.086

Si

Silicon

32 72.64

Ge

Germanium

50 118.71

Sn

Tin

82 207.2

Pb

Lead

114 289

Uuq

Ununquadium

7 14.007

N

Nitrogen

15 30.974

P

Phosphorus

33 74.922

As

Arsenic

51 121.76

Sb

Antimony

83 208.98

Bi

Bismuth

115 288

Uup

Ununpentium

8 15.999

O

Oxygen

16 32.065

S

Sulphur

34 78.96

Se

Selenium

52 127.6

Te

Tellurium

84 209

Po

Polonium

116 293

Uuh

Ununhexium

9 18.998

F

Flourine

17 35.453

Cl

Chlorine

35 79.904

Br

Bromine

53 126.9

I

Iodine

85 210

At

Astatine

117 292

Uus

Ununseptium

10 20.180

Ne

Neon

2 4.0025

He

Helium

18 39.948

Ar

Argon

36 83.8

Kr

Krypton

54 131.29

Xe

Xenon

86 222

Rn

Radon

118 294

Uuo

Ununoctium

1

2

3

4

5

6

7

1 IA

2 IIA

3 IIIA 4 IVB 5 VB 6 VIB 7 VIIB 8 VIIIB 9 VIIIB 10 VIIIB 11 IB 12 IIB

13 IIIA 14 IVA 15 VA 16 VIA 17 VIIA

18 VIIIA

57 138.91

La

Lanthanum

58 140.12

Ce

Cerium

59 140.91

Pr

Praseodymium

60 144.24

Nd

Neodymium

61 145

Pm

Promethium

62 150.36

Sm

Samarium

63 151.96

Eu

Europium

64 157.25

Gd

Gadolinium

65 158.93

Tb

Terbium

66 162.50

Dy

Dysprosium

67 164.93

Ho

Holmium

68 167.26

Er

Erbium

69 168.93

Tm

Thulium

70 173.04

Yb

Ytterbium

71 174.97

Lu

Lutetium

89 227

Ac

Actinium

90 232.04

Th

Thorium

91 231.04

Pa

Protactinium

92 238.03

U

Uranium

93 237

Np

Neptunium

94 244

Pu

Plutonium

95 243

Am

Americium

96 247

Cm

Curium

97 247

Bk

Berkelium

98 251

Cf

Californium

99 252

Es

Einsteinium

100 257

Fm

Fermium

101 258

Md

Mendelevium

102 259

No

Nobelium

103 262

Lr

Lawrencium

Alkali Metal

Alkaline Earth Metal

Metal

Metalloid

Non-metal

Halogen

Noble Gas

Lanthanide/Actinide

Z mass

Symbol

Name

man-made

(Mendeleev’s) Periodic Table of Chemical Elements via TikZ

Ivan Griffin, http://texample.net/tikz/examples/periodic-table-of-chemical-elements/

76

Nur ein paar weitere Beispiele alsDemo der Vielfalt

Zeitlinien

Week 1 Week 2 Week 3 Week 4 Week 5

Auhor

Publisher

Concept

Outline

ResearchWriting First draft

Second draft

Approval of print draft

Concept Review

First Review

Second Review

Approval required

Draft for printing

Publication

Mit der timeline-TikZ-library

77

Zeitlinien - Codestück

\usetikzlibrarytimeline

\begintikzpicture

\timeline 5

\beginphases

\initialphaseinvolvement degree =3cm,phase color=blue

\phasebetween week=1 and 2 in 0.4,

involvement degree =5cm,phase color=green !50! black

\phasebetween week=2 and 3 in 0.2,

involvement degree =6cm,phase color=red !40! black

\phasebetween week=3 and 4 in 0.5,

involvement degree =3cm,phase color=red !90! black

\endphases

\node [xshift =-0.6cm,yshift =1cm,anchor=east ,

font=\Large \bfseries] at (phase -0.180) Auhor;

\node [xshift =-0.6cm,yshift=-1cm,anchor=east ,

font=\Large \bfseries] at (phase -0.180) Publisher ;

78

Zeitlinien

Week 1 Week 2 Week 3 Week 4 Week 5

Auhor

Publisher

Concept

Outline

ResearchWriting First draft

Second draft

Approval of print draft

Concept Review

First Review

Second Review

Approval required

Draft for printing

Publication

Mit der timeline-TikZ-library

77

Stromkreise

12V

loaded

http://latex-cookbook.net/cookbook/examples/circuits/

79

Stromkreise - Codestück

\usetikzlibrarycircuits.ee.IEC

...

\begintikzpicture [

circuit ee IEC ,

every info/.style = font = \scriptsize ]

\foreach \i in 1,...,3

\node [contact] (lower contact \i) at (\i ,0) ;

\node [contact] (upper contact \i) at (\i ,1) ;

\draw (upper contact 1) to [diode] (lower contact 1);

\draw (lower contact 2) to [capacitor]

(upper contact 2);

\draw (lower contact 1) to [

voltage source = near start ,

direction info = volt = 12,

inductor = near end] (lower contact 2);

\draw (upper contact 2) to [make contact =near start,

battery = near end , info = loaded ]

(upper contact 3);

\endtikzpicture

80

Stromkreise

12V

loaded

http://latex-cookbook.net/cookbook/examples/circuits/

79

Beispiel: Ionen-Strahl-System

Galliumquelle mit Heizwendel

extractor

suppressor

Ionenpumpe Quelle

AustrittIonenpumpe

Quadrupole 1, 2

1. Linse

Blende

blanker

Faradaykafig

Oktopole 1, 2

optische Einkopplung

Lichtquelle

CCD Kamera

Objektiv

2. Linse

Gasinjektionsnadel

Probe

Szintillator

Antennen

Clemens Helfmeier,http://texample.net/tikz/examples/focused-ion-beam-system/ 81

Beispiel: Schild mit Gewichten

Signpost Cross Section

di

do

x

y

z

Fixed Support

Steel Post

Fz1

h1

h2

b2

z1x1

Fy1

wzwx = z

h1+h2w0

Paul Gessler, http://texample.net/tikz/examples/signpost/

82

Beispiel: Zylinder-Schnitte

F1

F2

P

P1

P2

Hugues Vermeiren, http://texample.net/tikz/examples/dandelin-spheres/83

Beispiel: Sphärische und kartesische Gitter

N

S

P1

P3

P2

λφ1

φ2

Grid(s) in Fig. (??)[Rectilinear]

Marco Miani,http://texample.net/tikz/examples/spherical-and-cartesian-grids/ 84

Beispiel: Kaffeetassen

Mark Wibrow, http://texample.net/tikz/examples/coffee-cup/85

Beispiel: Ei

percusse, http://texample.net/tikz/examples/egg/86

Beispiel: Farbige Mandala

Elena Botoeva, http://texample.net/tikz/examples/mandala/87

Beispiel: 3D-Ansicht seismischer Mechanismen

Compression

Dilatation

Dilatation

Compression

T-axis

T-axis

P-axis

P-axis

Seismic focal mechanism and Pression-Tension axis.

Cyril Langlois, http://texample.net/tikz/examples/seismic-focal-mechanism-in-3d-view/ 88

Zusammenfassung

•••

89

Danke!

89