mirror of
https://github.com/MartinThoma/LaTeX-examples.git
synced 2025-04-25 06:18:05 +02:00
added line segments
This commit is contained in:
parent
fdc5bb932f
commit
2d8eb1b0fe
17 changed files with 945 additions and 2 deletions
38
tikz/line-segments/Makefile
Normal file
38
tikz/line-segments/Makefile
Normal file
|
@ -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
|
61
tikz/line-segments/line-segments-bounding-box.tex
Normal file
61
tikz/line-segments/line-segments-bounding-box.tex
Normal file
|
@ -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}
|
60
tikz/line-segments/line-segments-f1.tex
Normal file
60
tikz/line-segments/line-segments-f1.tex
Normal file
|
@ -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}
|
60
tikz/line-segments/line-segments-f2.tex
Normal file
60
tikz/line-segments/line-segments-f2.tex
Normal file
|
@ -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}
|
60
tikz/line-segments/line-segments-f3.tex
Normal file
60
tikz/line-segments/line-segments-f3.tex
Normal file
|
@ -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}
|
60
tikz/line-segments/line-segments-f4.tex
Normal file
60
tikz/line-segments/line-segments-f4.tex
Normal file
|
@ -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}
|
60
tikz/line-segments/line-segments-f5.tex
Normal file
60
tikz/line-segments/line-segments-f5.tex
Normal file
|
@ -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}
|
60
tikz/line-segments/line-segments-f6.tex
Normal file
60
tikz/line-segments/line-segments-f6.tex
Normal file
|
@ -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}
|
60
tikz/line-segments/line-segments-f7.tex
Normal file
60
tikz/line-segments/line-segments-f7.tex
Normal file
|
@ -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}
|
60
tikz/line-segments/line-segments-f8.tex
Normal file
60
tikz/line-segments/line-segments-f8.tex
Normal file
|
@ -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}
|
60
tikz/line-segments/line-segments-t1.tex
Normal file
60
tikz/line-segments/line-segments-t1.tex
Normal file
|
@ -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}
|
60
tikz/line-segments/line-segments-t2.tex
Normal file
60
tikz/line-segments/line-segments-t2.tex
Normal file
|
@ -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}
|
60
tikz/line-segments/line-segments-t3.tex
Normal file
60
tikz/line-segments/line-segments-t3.tex
Normal file
|
@ -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}
|
60
tikz/line-segments/line-segments-t4.tex
Normal file
60
tikz/line-segments/line-segments-t4.tex
Normal file
|
@ -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}
|
60
tikz/line-segments/line-segments-t5.tex
Normal file
60
tikz/line-segments/line-segments-t5.tex
Normal file
|
@ -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}
|
60
tikz/line-segments/line-segments-t6.tex
Normal file
60
tikz/line-segments/line-segments-t6.tex
Normal file
|
@ -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}
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue