mirror of
https://github.com/MartinThoma/LaTeX-examples.git
synced 2025-04-19 11:38:05 +02:00
added circle-diameter-radius image
This commit is contained in:
parent
e9574df049
commit
0c3653dd14
4 changed files with 63 additions and 0 deletions
35
tikz/circle-diameter-radius/Makefile
Normal file
35
tikz/circle-diameter-radius/Makefile
Normal file
|
@ -0,0 +1,35 @@
|
|||
SOURCE = circle-diameter-radius
|
||||
DELAY = 80
|
||||
DENSITY = 300
|
||||
WIDTH = 512
|
||||
|
||||
make:
|
||||
pdflatex $(SOURCE).tex -output-format=pdf
|
||||
make clean
|
||||
|
||||
clean:
|
||||
rm -rf $(TARGET) *.class *.html *.log *.aux *.data *.gnuplot
|
||||
|
||||
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
|
3
tikz/circle-diameter-radius/Readme.md
Normal file
3
tikz/circle-diameter-radius/Readme.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
Compiled example
|
||||
----------------
|
||||

|
BIN
tikz/circle-diameter-radius/circle-diameter-radius.png
Normal file
BIN
tikz/circle-diameter-radius/circle-diameter-radius.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 31 KiB |
25
tikz/circle-diameter-radius/circle-diameter-radius.tex
Normal file
25
tikz/circle-diameter-radius/circle-diameter-radius.tex
Normal file
|
@ -0,0 +1,25 @@
|
|||
\documentclass[varwidth=true, border=2pt]{standalone}
|
||||
\usepackage{tikz}
|
||||
\usetikzlibrary{shapes, calc, shapes, arrows}
|
||||
\usepackage{amsmath,amssymb}
|
||||
|
||||
\usepackage{xcolor}
|
||||
\definecolor{xvectorcolor}{HTML}{77933C}
|
||||
|
||||
\begin{document}
|
||||
\begin{tikzpicture}
|
||||
\newcommand{\R}{1.4}
|
||||
\path (240:\R) coordinate (A);
|
||||
\path ( 60:\R) coordinate (B);
|
||||
\path ( 0:\R) coordinate (C);
|
||||
\draw[green,fill=gray!10] (0,0) circle (\R);
|
||||
|
||||
\draw[red] (0,0) -- (C);
|
||||
\path[red] ( 0:\R/2) node [below]{$r$};
|
||||
\draw[blue] (A) -- (B);
|
||||
\path[blue] (240:\R/2) node [below]{$d$};
|
||||
\draw[green] (0,0) circle (\R);
|
||||
\path[green] (135:\R*1.2) node {$c$};
|
||||
\draw[black] (0,0) node [left] {$M$};
|
||||
\end{tikzpicture}
|
||||
\end{document}
|
Loading…
Add table
Add a link
Reference in a new issue