From 2d8eb1b0fe324eb73aceaa23734d18f17f0dc158 Mon Sep 17 00:00:00 2001 From: Martin Thoma Date: Thu, 21 Feb 2013 10:45:15 +0100 Subject: [PATCH] added line segments --- tikz/line-segments/Makefile | 38 ++++++++++++ .../line-segments-bounding-box.tex | 61 +++++++++++++++++++ tikz/line-segments/line-segments-f1.tex | 60 ++++++++++++++++++ tikz/line-segments/line-segments-f2.tex | 60 ++++++++++++++++++ tikz/line-segments/line-segments-f3.tex | 60 ++++++++++++++++++ tikz/line-segments/line-segments-f4.tex | 60 ++++++++++++++++++ tikz/line-segments/line-segments-f5.tex | 60 ++++++++++++++++++ tikz/line-segments/line-segments-f6.tex | 60 ++++++++++++++++++ tikz/line-segments/line-segments-f7.tex | 60 ++++++++++++++++++ tikz/line-segments/line-segments-f8.tex | 60 ++++++++++++++++++ tikz/line-segments/line-segments-t1.tex | 60 ++++++++++++++++++ tikz/line-segments/line-segments-t2.tex | 60 ++++++++++++++++++ tikz/line-segments/line-segments-t3.tex | 60 ++++++++++++++++++ tikz/line-segments/line-segments-t4.tex | 60 ++++++++++++++++++ tikz/line-segments/line-segments-t5.tex | 60 ++++++++++++++++++ tikz/line-segments/line-segments-t6.tex | 60 ++++++++++++++++++ tikz/rectangle/Makefile | 8 ++- 17 files changed, 945 insertions(+), 2 deletions(-) create mode 100644 tikz/line-segments/Makefile create mode 100644 tikz/line-segments/line-segments-bounding-box.tex create mode 100644 tikz/line-segments/line-segments-f1.tex create mode 100644 tikz/line-segments/line-segments-f2.tex create mode 100644 tikz/line-segments/line-segments-f3.tex create mode 100644 tikz/line-segments/line-segments-f4.tex create mode 100644 tikz/line-segments/line-segments-f5.tex create mode 100644 tikz/line-segments/line-segments-f6.tex create mode 100644 tikz/line-segments/line-segments-f7.tex create mode 100644 tikz/line-segments/line-segments-f8.tex create mode 100644 tikz/line-segments/line-segments-t1.tex create mode 100644 tikz/line-segments/line-segments-t2.tex create mode 100644 tikz/line-segments/line-segments-t3.tex create mode 100644 tikz/line-segments/line-segments-t4.tex create mode 100644 tikz/line-segments/line-segments-t5.tex create mode 100644 tikz/line-segments/line-segments-t6.tex diff --git a/tikz/line-segments/Makefile b/tikz/line-segments/Makefile new file mode 100644 index 0000000..26145b8 --- /dev/null +++ b/tikz/line-segments/Makefile @@ -0,0 +1,38 @@ +SOURCE = line-segments-bounding-box +DELAY = 80 +DENSITY = 300 +WIDTH = 500 + +make: + pdflatex $(SOURCE).tex -output-format=pdf + make clean + +clean: + rm -rf $(TARGET) *.class *.html *.log *.aux *.data *.gnuplot + +noimage: + rm -rf $(TARGET) *.png *.svg + +gif: + pdfcrop $(SOURCE).pdf + convert -verbose -delay $(DELAY) -loop 0 -density $(DENSITY) $(SOURCE)-crop.pdf $(SOURCE).gif + make clean + +png: + make + make svg + inkscape $(SOURCE).svg -w $(WIDTH) --export-png=$(SOURCE).png + +transparentGif: + convert $(SOURCE).pdf -transparent white result.gif + make clean + +svg: + make + #inkscape $(SOURCE).pdf --export-plain-svg=$(SOURCE).svg + pdf2svg $(SOURCE).pdf $(SOURCE).svg + # Necessary, as pdf2svg does not always create valid svgs: + inkscape $(SOURCE).svg --export-plain-svg=$(SOURCE).svg + rsvg-convert -a -w $(WIDTH) -f svg $(SOURCE).svg -o $(SOURCE)2.svg + inkscape $(SOURCE)2.svg --export-plain-svg=$(SOURCE).svg + rm $(SOURCE)2.svg diff --git a/tikz/line-segments/line-segments-bounding-box.tex b/tikz/line-segments/line-segments-bounding-box.tex new file mode 100644 index 0000000..992ef33 --- /dev/null +++ b/tikz/line-segments/line-segments-bounding-box.tex @@ -0,0 +1,61 @@ +\documentclass{article} +\usepackage{gensymb} +\usepackage[pdftex,active,tightpage]{preview} +\setlength\PreviewBorder{2mm} +\usepackage{tikz} +\usetikzlibrary{arrows, calc, positioning,decorations.pathreplacing,shapes} +\tikzset{ + %Define standard arrow tip + >=stealth', + % Define arrow style + pil/.style={ + ->, + thick}, + line/.style={ + very thick, + black, + to path={% works only with "to" and not "--" + -- (\tikztotarget) node[at start,point] {} node [at end,point] {} \tikztonodes + } + }, + point/.style={ + thick, + draw=gray, + cross out, + inner sep=0pt, + minimum width=4pt, + minimum height=4pt, + }, +} + +\begin{document} +\begin{preview} + \begin{tikzpicture} + \newcommand\MinX{0} + \newcommand\MinY{0} + \newcommand\MaxX{4} + \newcommand\MaxY{5} + + % Coordinate system + \draw [<->, thick, red] (0,{\MaxY+0.5}) -- (0,0) -- ({\MaxX+0.5},0); + + \coordinate (A) at (1,2); + \coordinate (B) at (3,5); + \coordinate (C) at (1.5,0.5); + \coordinate (D) at (4,1.5); + + \draw[color=orange, very thick, fill=orange!20] (1,2) -- (3,2) -- (3,5) -- (1,5) -- cycle; + \draw[color=orange, very thick, fill=orange!20] (1.5,0.5) -- (4,0.5) -- (4,1.5) -- (1.5,1.5) -- cycle; + + \draw[line] (A) -- (B); + \draw[line] (C) -- (D); + + \draw[step=0.5cm,color=gray] ({\MinX-0.25}, {\MinY-0.25}) grid ({\MaxX+0.25},{\MaxY+0.25}); + \path[every node/.style={point}] + node at (A) {} + node at (B) {} + node at (C) {} + node at (D) {}; + \end{tikzpicture} +\end{preview} +\end{document} diff --git a/tikz/line-segments/line-segments-f1.tex b/tikz/line-segments/line-segments-f1.tex new file mode 100644 index 0000000..c9c326c --- /dev/null +++ b/tikz/line-segments/line-segments-f1.tex @@ -0,0 +1,60 @@ +\documentclass{article} +\usepackage{gensymb} +\usepackage[pdftex,active,tightpage]{preview} +\setlength\PreviewBorder{2mm} +\usepackage{tikz} +\usetikzlibrary{arrows, calc, positioning,decorations.pathreplacing,shapes} +\tikzset{ + %Define standard arrow tip + >=stealth', + % Define arrow style + pil/.style={ + ->, + thick}, + line/.style={ + very thick, + black, + to path={% works only with "to" and not "--" + -- (\tikztotarget) node[at start,point] {} node [at end,point] {} \tikztonodes + } + }, + point/.style={ + thick, + draw=gray, + cross out, + inner sep=0pt, + minimum width=4pt, + minimum height=4pt, + }, +} + +\begin{document} +\begin{preview} + \begin{tikzpicture} + \newcommand\MinX{0} + \newcommand\MinY{0} + \newcommand\MaxX{7} + \newcommand\MaxY{7} + + % Coordinate system + \draw [<->, thick, red] (0,{\MaxY+0.5}) -- (0,0) -- ({\MaxX+0.5},0); + + \coordinate (A) at (3,4); + \coordinate (B) at (4,5); + \coordinate (C) at (2,2); + \coordinate (D) at (6,6); + + % \draw[color=orange, very thick, fill=orange!20] (A) -- (B) -- cycle; + + \draw[line] (A) -- (B); + \draw[line] (C) -- (D); + + \draw[step=0.5cm,color=gray] ({\MinX-0.25}, {\MinY-0.25}) grid ({\MaxX+0.25},{\MaxY+0.25}); + \path[every node/.style={point}] + node at (A) {} + node at (B) {} + node at (C) {} + node at (D) {}; + \end{tikzpicture} +\end{preview} +\end{document} diff --git a/tikz/line-segments/line-segments-f2.tex b/tikz/line-segments/line-segments-f2.tex new file mode 100644 index 0000000..4654372 --- /dev/null +++ b/tikz/line-segments/line-segments-f2.tex @@ -0,0 +1,60 @@ +\documentclass{article} +\usepackage{gensymb} +\usepackage[pdftex,active,tightpage]{preview} +\setlength\PreviewBorder{2mm} +\usepackage{tikz} +\usetikzlibrary{arrows, calc, positioning,decorations.pathreplacing,shapes} +\tikzset{ + %Define standard arrow tip + >=stealth', + % Define arrow style + pil/.style={ + ->, + thick}, + line/.style={ + very thick, + black, + to path={% works only with "to" and not "--" + -- (\tikztotarget) node[at start,point] {} node [at end,point] {} \tikztonodes + } + }, + point/.style={ + thick, + draw=gray, + cross out, + inner sep=0pt, + minimum width=4pt, + minimum height=4pt, + }, +} + +\begin{document} +\begin{preview} + \begin{tikzpicture} + \newcommand\MinX{-4.5} + \newcommand\MinY{-0.25} + \newcommand\MaxX{1} + \newcommand\MaxY{5} + + % Coordinate system + \draw [<->, thick, red] (0,{\MaxY+0.5}) -- (0,0) -- ({\MaxX+0.5},0); + + \coordinate (A) at (-4,4); + \coordinate (B) at (-2,1); + \coordinate (C) at (-2,3); + \coordinate (D) at (0,0); + + % \draw[color=orange, very thick, fill=orange!20] (A) -- (B) -- cycle; + + \draw[line] (A) -- (B); + \draw[line] (C) -- (D); + + \draw[step=0.5cm,color=gray] ({\MinX-0.25}, {\MinY-0.25}) grid ({\MaxX+0.25},{\MaxY+0.25}); + \path[every node/.style={point}] + node at (A) {} + node at (B) {} + node at (C) {} + node at (D) {}; + \end{tikzpicture} +\end{preview} +\end{document} diff --git a/tikz/line-segments/line-segments-f3.tex b/tikz/line-segments/line-segments-f3.tex new file mode 100644 index 0000000..8fd4b2f --- /dev/null +++ b/tikz/line-segments/line-segments-f3.tex @@ -0,0 +1,60 @@ +\documentclass{article} +\usepackage{gensymb} +\usepackage[pdftex,active,tightpage]{preview} +\setlength\PreviewBorder{2mm} +\usepackage{tikz} +\usetikzlibrary{arrows, calc, positioning,decorations.pathreplacing,shapes} +\tikzset{ + %Define standard arrow tip + >=stealth', + % Define arrow style + pil/.style={ + ->, + thick}, + line/.style={ + very thick, + black, + to path={% works only with "to" and not "--" + -- (\tikztotarget) node[at start,point] {} node [at end,point] {} \tikztonodes + } + }, + point/.style={ + thick, + draw=gray, + cross out, + inner sep=0pt, + minimum width=4pt, + minimum height=4pt, + }, +} + +\begin{document} +\begin{preview} + \begin{tikzpicture} + \newcommand\MinX{0} + \newcommand\MinY{0} + \newcommand\MaxX{2} + \newcommand\MaxY{3} + + % Coordinate system + \draw [<->, thick, red] (0,{\MaxY+0.5}) -- (0,0) -- ({\MaxX+0.5},0); + + \coordinate (A) at (0,0); + \coordinate (B) at (0,1); + \coordinate (C) at (2,2); + \coordinate (D) at (2,3); + + % \draw[color=orange, very thick, fill=orange!20] (A) -- (B) -- cycle; + + \draw[line] (A) -- (B); + \draw[line] (C) -- (D); + + \draw[step=0.5cm,color=gray] ({\MinX-0.25}, {\MinY-0.25}) grid ({\MaxX+0.25},{\MaxY+0.25}); + \path[every node/.style={point}] + node at (A) {} + node at (B) {} + node at (C) {} + node at (D) {}; + \end{tikzpicture} +\end{preview} +\end{document} diff --git a/tikz/line-segments/line-segments-f4.tex b/tikz/line-segments/line-segments-f4.tex new file mode 100644 index 0000000..1a7e2a8 --- /dev/null +++ b/tikz/line-segments/line-segments-f4.tex @@ -0,0 +1,60 @@ +\documentclass{article} +\usepackage{gensymb} +\usepackage[pdftex,active,tightpage]{preview} +\setlength\PreviewBorder{2mm} +\usepackage{tikz} +\usetikzlibrary{arrows, calc, positioning,decorations.pathreplacing,shapes} +\tikzset{ + %Define standard arrow tip + >=stealth', + % Define arrow style + pil/.style={ + ->, + thick}, + line/.style={ + very thick, + black, + to path={% works only with "to" and not "--" + -- (\tikztotarget) node[at start,point] {} node [at end,point] {} \tikztonodes + } + }, + point/.style={ + thick, + draw=gray, + cross out, + inner sep=0pt, + minimum width=4pt, + minimum height=4pt, + }, +} + +\begin{document} +\begin{preview} + \begin{tikzpicture} + \newcommand\MinX{0} + \newcommand\MinY{0} + \newcommand\MaxX{3} + \newcommand\MaxY{2} + + % Coordinate system + \draw [<->, thick, red] (0,{\MaxY+0.5}) -- (0,0) -- ({\MaxX+0.5},0); + + \coordinate (A) at (0,0); + \coordinate (B) at (0,1); + \coordinate (C) at (2,2); + \coordinate (D) at (3,2); + + % \draw[color=orange, very thick, fill=orange!20] (A) -- (B) -- cycle; + + \draw[line] (A) -- (B); + \draw[line] (C) -- (D); + + \draw[step=0.5cm,color=gray] ({\MinX-0.25}, {\MinY-0.25}) grid ({\MaxX+0.25},{\MaxY+0.25}); + \path[every node/.style={point}] + node at (A) {} + node at (B) {} + node at (C) {} + node at (D) {}; + \end{tikzpicture} +\end{preview} +\end{document} diff --git a/tikz/line-segments/line-segments-f5.tex b/tikz/line-segments/line-segments-f5.tex new file mode 100644 index 0000000..8c1b11c --- /dev/null +++ b/tikz/line-segments/line-segments-f5.tex @@ -0,0 +1,60 @@ +\documentclass{article} +\usepackage{gensymb} +\usepackage[pdftex,active,tightpage]{preview} +\setlength\PreviewBorder{2mm} +\usepackage{tikz} +\usetikzlibrary{arrows, calc, positioning,decorations.pathreplacing,shapes} +\tikzset{ + %Define standard arrow tip + >=stealth', + % Define arrow style + pil/.style={ + ->, + thick}, + line/.style={ + very thick, + black, + to path={% works only with "to" and not "--" + -- (\tikztotarget) node[at start,point] {} node [at end,point] {} \tikztonodes + } + }, + point/.style={ + thick, + draw=gray, + cross out, + inner sep=0pt, + minimum width=4pt, + minimum height=4pt, + }, +} + +\begin{document} +\begin{preview} + \begin{tikzpicture} + \newcommand\MinX{-1} + \newcommand\MinY{-1} + \newcommand\MaxX{5} + \newcommand\MaxY{5} + + % Coordinate system + \draw [<->, thick, red] (0,{\MaxY+0.5}) -- (0,0) -- ({\MaxX+0.5},0); + + \coordinate (A) at (-1,-1); + \coordinate (B) at (2,2); + \coordinate (C) at (3,3); + \coordinate (D) at (5,5); + + % \draw[color=orange, very thick, fill=orange!20] (A) -- (B) -- cycle; + + \draw[line] (A) -- (B); + \draw[line] (C) -- (D); + + \draw[step=0.5cm,color=gray] ({\MinX-0.25}, {\MinY-0.25}) grid ({\MaxX+0.25},{\MaxY+0.25}); + \path[every node/.style={point}] + node at (A) {} + node at (B) {} + node at (C) {} + node at (D) {}; + \end{tikzpicture} +\end{preview} +\end{document} diff --git a/tikz/line-segments/line-segments-f6.tex b/tikz/line-segments/line-segments-f6.tex new file mode 100644 index 0000000..3e77d86 --- /dev/null +++ b/tikz/line-segments/line-segments-f6.tex @@ -0,0 +1,60 @@ +\documentclass{article} +\usepackage{gensymb} +\usepackage[pdftex,active,tightpage]{preview} +\setlength\PreviewBorder{2mm} +\usepackage{tikz} +\usetikzlibrary{arrows, calc, positioning,decorations.pathreplacing,shapes} +\tikzset{ + %Define standard arrow tip + >=stealth', + % Define arrow style + pil/.style={ + ->, + thick}, + line/.style={ + very thick, + black, + to path={% works only with "to" and not "--" + -- (\tikztotarget) node[at start,point] {} node [at end,point] {} \tikztonodes + } + }, + point/.style={ + thick, + draw=gray, + cross out, + inner sep=0pt, + minimum width=4pt, + minimum height=4pt, + }, +} + +\begin{document} +\begin{preview} + \begin{tikzpicture} + \newcommand\MinX{0} + \newcommand\MinY{0} + \newcommand\MaxX{2} + \newcommand\MaxY{2} + + % Coordinate system + \draw [<->, thick, red] (0,{\MaxY+0.5}) -- (0,0) -- ({\MaxX+0.5},0); + + \coordinate (A) at (0,0); + \coordinate (B) at (1,1); + \coordinate (C) at (0.5, 2); + \coordinate (D) at (2,0); + + % \draw[color=orange, very thick, fill=orange!20] (A) -- (B) -- cycle; + + \draw[line] (A) -- (B); + \draw[line] (C) -- (D); + + \draw[step=0.5cm,color=gray] ({\MinX-0.25}, {\MinY-0.25}) grid ({\MaxX+0.25},{\MaxY+0.25}); + \path[every node/.style={point}] + node at (A) {} + node at (B) {} + node at (C) {} + node at (D) {}; + \end{tikzpicture} +\end{preview} +\end{document} diff --git a/tikz/line-segments/line-segments-f7.tex b/tikz/line-segments/line-segments-f7.tex new file mode 100644 index 0000000..720d0f7 --- /dev/null +++ b/tikz/line-segments/line-segments-f7.tex @@ -0,0 +1,60 @@ +\documentclass{article} +\usepackage{gensymb} +\usepackage[pdftex,active,tightpage]{preview} +\setlength\PreviewBorder{2mm} +\usepackage{tikz} +\usetikzlibrary{arrows, calc, positioning,decorations.pathreplacing,shapes} +\tikzset{ + %Define standard arrow tip + >=stealth', + % Define arrow style + pil/.style={ + ->, + thick}, + line/.style={ + very thick, + black, + to path={% works only with "to" and not "--" + -- (\tikztotarget) node[at start,point] {} node [at end,point] {} \tikztonodes + } + }, + point/.style={ + thick, + draw=gray, + cross out, + inner sep=0pt, + minimum width=4pt, + minimum height=4pt, + }, +} + +\begin{document} +\begin{preview} + \begin{tikzpicture} + \newcommand\MinX{0} + \newcommand\MinY{0} + \newcommand\MaxX{4} + \newcommand\MaxY{2} + + % Coordinate system + \draw [<->, thick, red] (0,{\MaxY+0.5}) -- (0,0) -- ({\MaxX+0.5},0); + + \coordinate (A) at (1,1); + \coordinate (B) at (4,1); + \coordinate (C) at (2,2); + \coordinate (D) at (3,2); + + % \draw[color=orange, very thick, fill=orange!20] (A) -- (B) -- cycle; + + \draw[line] (A) -- (B); + \draw[line] (C) -- (D); + + \draw[step=0.5cm,color=gray] ({\MinX-0.25}, {\MinY-0.25}) grid ({\MaxX+0.25},{\MaxY+0.25}); + \path[every node/.style={point}] + node at (A) {} + node at (B) {} + node at (C) {} + node at (D) {}; + \end{tikzpicture} +\end{preview} +\end{document} diff --git a/tikz/line-segments/line-segments-f8.tex b/tikz/line-segments/line-segments-f8.tex new file mode 100644 index 0000000..13f8e1a --- /dev/null +++ b/tikz/line-segments/line-segments-f8.tex @@ -0,0 +1,60 @@ +\documentclass{article} +\usepackage{gensymb} +\usepackage[pdftex,active,tightpage]{preview} +\setlength\PreviewBorder{2mm} +\usepackage{tikz} +\usetikzlibrary{arrows, calc, positioning,decorations.pathreplacing,shapes} +\tikzset{ + %Define standard arrow tip + >=stealth', + % Define arrow style + pil/.style={ + ->, + thick}, + line/.style={ + very thick, + black, + to path={% works only with "to" and not "--" + -- (\tikztotarget) node[at start,point] {} node [at end,point] {} \tikztonodes + } + }, + point/.style={ + thick, + draw=gray, + cross out, + inner sep=0pt, + minimum width=4pt, + minimum height=4pt, + }, +} + +\begin{document} +\begin{preview} + \begin{tikzpicture} + \newcommand\MinX{0} + \newcommand\MinY{0} + \newcommand\MaxX{5} + \newcommand\MaxY{4} + + % Coordinate system + \draw [<->, thick, red] (0,{\MaxY+0.5}) -- (0,0) -- ({\MaxX+0.5},0); + + \coordinate (A) at (2,2); + \coordinate (B) at (2,1); + \coordinate (C) at (0,4); + \coordinate (D) at (5,0); + + % \draw[color=orange, very thick, fill=orange!20] (A) -- (B) -- cycle; + + \draw[line] (A) -- (B); + \draw[line] (C) -- (D); + + \draw[step=0.5cm,color=gray] ({\MinX-0.25}, {\MinY-0.25}) grid ({\MaxX+0.25},{\MaxY+0.25}); + \path[every node/.style={point}] + node at (A) {} + node at (B) {} + node at (C) {} + node at (D) {}; + \end{tikzpicture} +\end{preview} +\end{document} diff --git a/tikz/line-segments/line-segments-t1.tex b/tikz/line-segments/line-segments-t1.tex new file mode 100644 index 0000000..dda5768 --- /dev/null +++ b/tikz/line-segments/line-segments-t1.tex @@ -0,0 +1,60 @@ +\documentclass{article} +\usepackage{gensymb} +\usepackage[pdftex,active,tightpage]{preview} +\setlength\PreviewBorder{2mm} +\usepackage{tikz} +\usetikzlibrary{arrows, calc, positioning,decorations.pathreplacing,shapes} +\tikzset{ + %Define standard arrow tip + >=stealth', + % Define arrow style + pil/.style={ + ->, + thick}, + line/.style={ + very thick, + black, + to path={% works only with "to" and not "--" + -- (\tikztotarget) node[at start,point] {} node [at end,point] {} \tikztonodes + } + }, + point/.style={ + thick, + draw=gray, + cross out, + inner sep=0pt, + minimum width=4pt, + minimum height=4pt, + }, +} + +\begin{document} +\begin{preview} + \begin{tikzpicture} + \newcommand\MinX{-2} + \newcommand\MinY{-2} + \newcommand\MaxX{2} + \newcommand\MaxY{2} + + % Coordinate system + \draw [<->, thick, red] (0,{\MaxY+0.5}) -- (0,0) -- ({\MaxX+0.5},0); + + \coordinate (A) at (-2,0); + \coordinate (B) at (2,0); + \coordinate (C) at (0,2); + \coordinate (D) at (0,-2); + + % \draw[color=orange, very thick, fill=orange!20] (A) -- (B) -- cycle; + + \draw[line] (A) -- (B); + \draw[line] (C) -- (D); + + \draw[step=0.5cm,color=gray] ({\MinX-0.25}, {\MinY-0.25}) grid ({\MaxX+0.25},{\MaxY+0.25}); + \path[every node/.style={point}] + node at (A) {} + node at (B) {} + node at (C) {} + node at (D) {}; + \end{tikzpicture} +\end{preview} +\end{document} diff --git a/tikz/line-segments/line-segments-t2.tex b/tikz/line-segments/line-segments-t2.tex new file mode 100644 index 0000000..bfddca7 --- /dev/null +++ b/tikz/line-segments/line-segments-t2.tex @@ -0,0 +1,60 @@ +\documentclass{article} +\usepackage{gensymb} +\usepackage[pdftex,active,tightpage]{preview} +\setlength\PreviewBorder{2mm} +\usepackage{tikz} +\usetikzlibrary{arrows, calc, positioning,decorations.pathreplacing,shapes} +\tikzset{ + %Define standard arrow tip + >=stealth', + % Define arrow style + pil/.style={ + ->, + thick}, + line/.style={ + very thick, + black, + to path={% works only with "to" and not "--" + -- (\tikztotarget) node[at start,point] {} node [at end,point] {} \tikztonodes + } + }, + point/.style={ + thick, + draw=gray, + cross out, + inner sep=0pt, + minimum width=4pt, + minimum height=4pt, + }, +} + +\begin{document} +\begin{preview} + \begin{tikzpicture} + \newcommand\MinX{0} + \newcommand\MinY{0} + \newcommand\MaxX{8} + \newcommand\MaxY{5} + + % Coordinate system + \draw [<->, thick, red] (0,{\MaxY+0.5}) -- (0,0) -- ({\MaxX+0.5},0); + + \coordinate (A) at (0,0); + \coordinate (B) at (5,5); + \coordinate (C) at (1,1); + \coordinate (D) at (8,2); + + % \draw[color=orange, very thick, fill=orange!20] (A) -- (B) -- cycle; + + \draw[line] (A) -- (B); + \draw[line] (C) -- (D); + + \draw[step=0.5cm,color=gray] ({\MinX-0.25}, {\MinY-0.25}) grid ({\MaxX+0.25},{\MaxY+0.25}); + \path[every node/.style={point}] + node at (A) {} + node at (B) {} + node at (C) {} + node at (D) {}; + \end{tikzpicture} +\end{preview} +\end{document} diff --git a/tikz/line-segments/line-segments-t3.tex b/tikz/line-segments/line-segments-t3.tex new file mode 100644 index 0000000..eeef3e7 --- /dev/null +++ b/tikz/line-segments/line-segments-t3.tex @@ -0,0 +1,60 @@ +\documentclass{article} +\usepackage{gensymb} +\usepackage[pdftex,active,tightpage]{preview} +\setlength\PreviewBorder{2mm} +\usepackage{tikz} +\usetikzlibrary{arrows, calc, positioning,decorations.pathreplacing,shapes} +\tikzset{ + %Define standard arrow tip + >=stealth', + % Define arrow style + pil/.style={ + ->, + thick}, + line/.style={ + very thick, + black, + to path={% works only with "to" and not "--" + -- (\tikztotarget) node[at start,point] {} node [at end,point] {} \tikztonodes + } + }, + point/.style={ + thick, + draw=gray, + cross out, + inner sep=0pt, + minimum width=4pt, + minimum height=4pt, + }, +} + +\begin{document} +\begin{preview} + \begin{tikzpicture} + \newcommand\MinX{-1} + \newcommand\MinY{-1} + \newcommand\MaxX{1} + \newcommand\MaxY{1} + + % Coordinate system + \draw [<->, thick, red] (0,{\MaxY+0.5}) -- (0,0) -- ({\MaxX+0.5},0); + + \coordinate (A) at (-1,-1); + \coordinate (B) at (-1,1); + \coordinate (C) at (-1,0); + \coordinate (D) at (0,0); + + % \draw[color=orange, very thick, fill=orange!20] (A) -- (B) -- cycle; + + \draw[line] (A) -- (B); + \draw[line] (C) -- (D); + + \draw[step=0.5cm,color=gray] ({\MinX-0.25}, {\MinY-0.25}) grid ({\MaxX+0.25},{\MaxY+0.25}); + \path[every node/.style={point}] + node at (A) {} + node at (B) {} + node at (C) {} + node at (D) {}; + \end{tikzpicture} +\end{preview} +\end{document} diff --git a/tikz/line-segments/line-segments-t4.tex b/tikz/line-segments/line-segments-t4.tex new file mode 100644 index 0000000..a7558c5 --- /dev/null +++ b/tikz/line-segments/line-segments-t4.tex @@ -0,0 +1,60 @@ +\documentclass{article} +\usepackage{gensymb} +\usepackage[pdftex,active,tightpage]{preview} +\setlength\PreviewBorder{2mm} +\usepackage{tikz} +\usetikzlibrary{arrows, calc, positioning,decorations.pathreplacing,shapes} +\tikzset{ + %Define standard arrow tip + >=stealth', + % Define arrow style + pil/.style={ + ->, + thick}, + line/.style={ + very thick, + black, + to path={% works only with "to" and not "--" + -- (\tikztotarget) node[at start,point] {} node [at end,point] {} \tikztonodes + } + }, + point/.style={ + thick, + draw=gray, + cross out, + inner sep=0pt, + minimum width=4pt, + minimum height=4pt, + }, +} + +\begin{document} +\begin{preview} + \begin{tikzpicture} + \newcommand\MinX{0} + \newcommand\MinY{0} + \newcommand\MaxX{2} + \newcommand\MaxY{4} + + % Coordinate system + \draw [<->, thick, red] (0,{\MaxY+0.5}) -- (0,0) -- ({\MaxX+0.5},0); + + \coordinate (A) at (2,4); + \coordinate (B) at (2,0); + \coordinate (C) at (0,2); + \coordinate (D) at (2,2); + + % \draw[color=orange, very thick, fill=orange!20] (A) -- (B) -- cycle; + + \draw[line] (A) -- (B); + \draw[line] (C) -- (D); + + \draw[step=0.5cm,color=gray] ({\MinX-0.25}, {\MinY-0.25}) grid ({\MaxX+0.25},{\MaxY+0.25}); + \path[every node/.style={point}] + node at (A) {} + node at (B) {} + node at (C) {} + node at (D) {}; + \end{tikzpicture} +\end{preview} +\end{document} diff --git a/tikz/line-segments/line-segments-t5.tex b/tikz/line-segments/line-segments-t5.tex new file mode 100644 index 0000000..3b45fbb --- /dev/null +++ b/tikz/line-segments/line-segments-t5.tex @@ -0,0 +1,60 @@ +\documentclass{article} +\usepackage{gensymb} +\usepackage[pdftex,active,tightpage]{preview} +\setlength\PreviewBorder{2mm} +\usepackage{tikz} +\usetikzlibrary{arrows, calc, positioning,decorations.pathreplacing,shapes} +\tikzset{ + %Define standard arrow tip + >=stealth', + % Define arrow style + pil/.style={ + ->, + thick}, + line/.style={ + very thick, + black, + to path={% works only with "to" and not "--" + -- (\tikztotarget) node[at start,point] {} node [at end,point] {} \tikztonodes + } + }, + point/.style={ + thick, + draw=gray, + cross out, + inner sep=0pt, + minimum width=4pt, + minimum height=4pt, + }, +} + +\begin{document} +\begin{preview} + \begin{tikzpicture} + \newcommand\MinX{0} + \newcommand\MinY{0} + \newcommand\MaxX{5} + \newcommand\MaxY{5} + + % Coordinate system + \draw [<->, thick, red] (0,{\MaxY+0.5}) -- (0,0) -- ({\MaxX+0.5},0); + + \coordinate (A) at (5,5); + \coordinate (B) at (0,0); + \coordinate (C) at (1,1); + \coordinate (D) at (3,3); + + % \draw[color=orange, very thick, fill=orange!20] (A) -- (B) -- cycle; + + \draw[line, red] (A) -- (B); + \draw[line, blue] (C) -- (D); + + \draw[step=0.5cm,color=gray] ({\MinX-0.25}, {\MinY-0.25}) grid ({\MaxX+0.25},{\MaxY+0.25}); + \path[every node/.style={point}] + node at (A) {} + node at (B) {} + node at (C) {} + node at (D) {}; + \end{tikzpicture} +\end{preview} +\end{document} diff --git a/tikz/line-segments/line-segments-t6.tex b/tikz/line-segments/line-segments-t6.tex new file mode 100644 index 0000000..26344b7 --- /dev/null +++ b/tikz/line-segments/line-segments-t6.tex @@ -0,0 +1,60 @@ +\documentclass{article} +\usepackage{gensymb} +\usepackage[pdftex,active,tightpage]{preview} +\setlength\PreviewBorder{2mm} +\usepackage{tikz} +\usetikzlibrary{arrows, calc, positioning,decorations.pathreplacing,shapes} +\tikzset{ + %Define standard arrow tip + >=stealth', + % Define arrow style + pil/.style={ + ->, + thick}, + line/.style={ + very thick, + black, + to path={% works only with "to" and not "--" + -- (\tikztotarget) node[at start,point] {} node [at end,point] {} \tikztonodes + } + }, + point/.style={ + thick, + draw=gray, + cross out, + inner sep=0pt, + minimum width=4pt, + minimum height=4pt, + }, +} + +\begin{document} +\begin{preview} + \begin{tikzpicture} + \newcommand\MinX{0} + \newcommand\MinY{-1} + \newcommand\MaxX{7} + \newcommand\MaxY{4} + + % Coordinate system + \draw [<->, thick, red] (0,{\MaxY+0.5}) -- (0,0) -- ({\MaxX+0.5},0); + + \coordinate (A) at (7,-1); + \coordinate (B) at (3,4); + \coordinate (C) at (7,-1); + \coordinate (D) at (3,4); + + % \draw[color=orange, very thick, fill=orange!20] (A) -- (B) -- cycle; + + \draw[line, red] (A) -- (B); + \draw[line, blue] (C) -- (D); + + \draw[step=0.5cm,color=gray] ({\MinX-0.25}, {\MinY-0.25}) grid ({\MaxX+0.25},{\MaxY+0.25}); + \path[every node/.style={point}] + node at (A) {} + node at (B) {} + node at (C) {} + node at (D) {}; + \end{tikzpicture} +\end{preview} +\end{document} diff --git a/tikz/rectangle/Makefile b/tikz/rectangle/Makefile index b1f77de..c2541fa 100644 --- a/tikz/rectangle/Makefile +++ b/tikz/rectangle/Makefile @@ -1,14 +1,14 @@ SOURCE = rectangle-3 DELAY = 80 DENSITY = 300 -WIDTH = 512 +WIDTH = 500 make: pdflatex $(SOURCE).tex -output-format=pdf make clean clean: - rm -rf $(TARGET) *.class *.html *.log *.aux + rm -rf $(TARGET) *.class *.html *.log *.aux *.data *.gnuplot gif: pdfcrop $(SOURCE).pdf @@ -25,7 +25,11 @@ transparentGif: make clean svg: + make #inkscape $(SOURCE).pdf --export-plain-svg=$(SOURCE).svg pdf2svg $(SOURCE).pdf $(SOURCE).svg # Necessary, as pdf2svg does not always create valid svgs: inkscape $(SOURCE).svg --export-plain-svg=$(SOURCE).svg + rsvg-convert -a -w $(WIDTH) -f svg $(SOURCE).svg -o $(SOURCE)2.svg + inkscape $(SOURCE)2.svg --export-plain-svg=$(SOURCE).svg + rm $(SOURCE)2.svg