mirror of
https://github.com/MartinThoma/LaTeX-examples.git
synced 2025-04-19 11:38:05 +02:00
added rectangle example
This commit is contained in:
parent
b18051eb38
commit
6100c30510
5 changed files with 129 additions and 2 deletions
|
@ -16,8 +16,8 @@ material {
|
|||
}
|
||||
interior {
|
||||
ior 1.5 // Glass refraction
|
||||
fade_power 1001
|
||||
fade_power 1000
|
||||
fade_distance 0.9
|
||||
fade_color <0.5,0.8,0.6>
|
||||
fade_color <0.1,0.1,0.9>
|
||||
}
|
||||
}
|
||||
|
|
31
tikz/rectangle/Makefile
Normal file
31
tikz/rectangle/Makefile
Normal file
|
@ -0,0 +1,31 @@
|
|||
SOURCE = rectangle-3
|
||||
DELAY = 80
|
||||
DENSITY = 300
|
||||
WIDTH = 512
|
||||
|
||||
make:
|
||||
pdflatex $(SOURCE).tex -output-format=pdf
|
||||
make clean
|
||||
|
||||
clean:
|
||||
rm -rf $(TARGET) *.class *.html *.log *.aux
|
||||
|
||||
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:
|
||||
#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
|
30
tikz/rectangle/rectangle-1.tex
Normal file
30
tikz/rectangle/rectangle-1.tex
Normal file
|
@ -0,0 +1,30 @@
|
|||
\documentclass{article}
|
||||
\usepackage{gensymb}
|
||||
\usepackage[pdftex,active,tightpage]{preview}
|
||||
\setlength\PreviewBorder{2mm}
|
||||
\usepackage{tikz}
|
||||
\usetikzlibrary{arrows,positioning,decorations.pathreplacing,shapes}
|
||||
\tikzset{
|
||||
%Define standard arrow tip
|
||||
>=stealth',
|
||||
% Define arrow style
|
||||
pil/.style={
|
||||
->,
|
||||
thick}
|
||||
}
|
||||
|
||||
\begin{document}
|
||||
\begin{preview}
|
||||
\begin{tikzpicture}
|
||||
\draw[color=orange, very thick, fill=orange!20] (-3.5,-0.5) -- (-2.5,2.5) -- (2.5,1) -- (1.5,-2) -- cycle;
|
||||
\draw [<->, thick, red] (0,3.0) -- (0,0) -- (3,0);
|
||||
\draw[fill, color=purple] (-2,1) circle [radius=0.04];
|
||||
\node [below right, purple] at (-2,1) {$(x|y)$};
|
||||
\node [below left, orange] at (-3.5,-0.5) {A};
|
||||
\node [above, orange] at (-2.5,2.5) {B};
|
||||
\node [right, orange] at (2.5,1) {C};
|
||||
\node [below, orange] at (1.5,-2) {D};
|
||||
\draw[step=0.5cm,color=gray] (-4.0, -2.5) grid (3.0,3.0);
|
||||
\end{tikzpicture}
|
||||
\end{preview}
|
||||
\end{document}
|
33
tikz/rectangle/rectangle-2.tex
Normal file
33
tikz/rectangle/rectangle-2.tex
Normal file
|
@ -0,0 +1,33 @@
|
|||
\documentclass{article}
|
||||
\usepackage{gensymb}
|
||||
\usepackage[pdftex,active,tightpage]{preview}
|
||||
\setlength\PreviewBorder{2mm}
|
||||
\usepackage{tikz}
|
||||
\usetikzlibrary{arrows,positioning,decorations.pathreplacing,shapes}
|
||||
\tikzset{
|
||||
%Define standard arrow tip
|
||||
>=stealth',
|
||||
% Define arrow style
|
||||
pil/.style={
|
||||
->,
|
||||
thick}
|
||||
}
|
||||
|
||||
\begin{document}
|
||||
\begin{preview}
|
||||
\begin{tikzpicture}
|
||||
\draw[color=orange, very thick, fill=orange!20] (-3.5,-0.5) -- (-2.5,2.5) -- (2.5,1) -- (1.5,-2) -- cycle;
|
||||
\draw[color=gray, very thick, fill=gray!20] (-3.5,-0.5) -- (-2.5,2.5) -- (-2,1) -- cycle;
|
||||
\draw[color=green, very thick, fill=green!20] (-2.5,2.5) -- (2.5,1) -- (-2,1) -- cycle;
|
||||
\draw[color=blue, very thick, fill=blue!20] (2.5,1) -- (1.5,-2) -- (-2,1) -- cycle;
|
||||
\draw[color=purple, very thick, fill=purple!20] (1.5,-2) -- (-3.5,-0.5) -- (-2,1) -- cycle;
|
||||
\draw [<->, thick, red] (0,3.0) -- (0,0) -- (3,0);
|
||||
\draw[fill, color=purple] (-2,1) circle [radius=0.04];
|
||||
\node [below left, orange] at (-3.5,-0.5) {A};
|
||||
\node [above, orange] at (-2.5,2.5) {B};
|
||||
\node [right, orange] at (2.5,1) {C};
|
||||
\node [below, orange] at (1.5,-2) {D};
|
||||
\draw[step=0.5cm,color=gray] (-4.0, -2.5) grid (3.0,3.0);
|
||||
\end{tikzpicture}
|
||||
\end{preview}
|
||||
\end{document}
|
33
tikz/rectangle/rectangle-3.tex
Normal file
33
tikz/rectangle/rectangle-3.tex
Normal file
|
@ -0,0 +1,33 @@
|
|||
\documentclass{article}
|
||||
\usepackage{gensymb}
|
||||
\usepackage[pdftex,active,tightpage]{preview}
|
||||
\setlength\PreviewBorder{2mm}
|
||||
\usepackage{tikz}
|
||||
\usetikzlibrary{arrows,positioning,decorations.pathreplacing,shapes}
|
||||
\tikzset{
|
||||
%Define standard arrow tip
|
||||
>=stealth',
|
||||
% Define arrow style
|
||||
pil/.style={
|
||||
->,
|
||||
thick}
|
||||
}
|
||||
|
||||
\begin{document}
|
||||
\begin{preview}
|
||||
\begin{tikzpicture}
|
||||
\draw[color=orange, very thick, fill=orange!20] (-3.5,-0.5) -- (-2.5,2.5) -- (2.5,1) -- (1.5,-2) -- cycle;
|
||||
\draw[color=gray, very thick] (-3.5,-0.5) -- (-2.5,2.5) -- (2,2.5) -- cycle;
|
||||
\draw[color=green, very thick] (-2.5,2.5) -- (2.5,1) -- (2,2.5) -- cycle;
|
||||
\draw[color=blue, very thick] (2.5,1) -- (1.5,-2) -- (2,2.5) -- cycle;
|
||||
\draw[color=purple, very thick] (1.5,-2) -- (-3.5,-0.5) -- (2,2.5) -- cycle;
|
||||
\draw [<->, thick, red] (0,3.0) -- (0,0) -- (3,0);
|
||||
\draw[fill, color=purple] (2,2.5) circle [radius=0.04];
|
||||
\node [below left, orange] at (-3.5,-0.5) {A};
|
||||
\node [above, orange] at (-2.5,2.5) {B};
|
||||
\node [right, orange] at (2.5,1) {C};
|
||||
\node [below, orange] at (1.5,-2) {D};
|
||||
\draw[step=0.5cm,color=gray] (-4.0, -2.5) grid (3.0,3.0);
|
||||
\end{tikzpicture}
|
||||
\end{preview}
|
||||
\end{document}
|
Loading…
Add table
Add a link
Reference in a new issue