mirror of
https://github.com/MartinThoma/LaTeX-examples.git
synced 2025-04-19 11:38:05 +02:00
added povray example
This commit is contained in:
parent
4014cccca5
commit
84e7cc73c9
7 changed files with 144 additions and 9 deletions
|
@ -19,3 +19,12 @@ Requirements
|
|||
* You should have the latest LaTeX version. Here are
|
||||
[LaTeX installation instructions](http://martin-thoma.com/how-to-install-the-latest-latex-version/)
|
||||
* If you want to use the Makefiles, you have to have make
|
||||
|
||||
POV-Ray
|
||||
=======
|
||||
Although POV-Ray has nothing to do with LaTeX, I decided to add
|
||||
some images here
|
||||
|
||||
* [POV-Ray Documentation](http://www.povray.org/documentation/)
|
||||
* [Ubuntuusers.de](http://wiki.ubuntuusers.de/POV-Ray) - German installation instructions
|
||||
* [Many examples](http://www.f-lohmueller.de/)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
\documentclass{article}
|
||||
\usepackage[pdftex,active,tightpage]{preview}
|
||||
\setlength\PreviewBorder{2mm}
|
||||
\setlength\PreviewBorder{0mm}
|
||||
|
||||
\usepackage{amsmath,array}
|
||||
\renewcommand\arraycolsep{4pt} % default value: 6pt
|
||||
|
@ -9,36 +9,31 @@
|
|||
\begin{document}
|
||||
\begin{preview}
|
||||
\begin{equation*}
|
||||
S^T \cdot A \cdot S =
|
||||
\left( \,
|
||||
\begin{array}{r@{}r@{}r r r} % @{} is used twice to suppress intercolumn whitespace
|
||||
\overbrace{
|
||||
\boxed{
|
||||
\underbrace{
|
||||
\begin{array}{rrr} % First block (1)
|
||||
1 & & \\
|
||||
& \ddots & \\
|
||||
& & 1 \\
|
||||
\end{array}
|
||||
}
|
||||
}^{r_+(s)-mal} \\
|
||||
}_{r_+(s)-mal}\\
|
||||
&
|
||||
\underbrace{
|
||||
\boxed{
|
||||
\begin{array}{rrr} % Second block (-1)
|
||||
-1 & & \\
|
||||
& \ddots & \\
|
||||
& & -1\\
|
||||
\end{array}
|
||||
}
|
||||
}_{r_{-}(s)-mal} \\
|
||||
& &
|
||||
\underbrace{
|
||||
\boxed{
|
||||
\begin{array}{rrr} % Third block
|
||||
0 & & \\
|
||||
& \ddots & \\
|
||||
& & 0\\
|
||||
\end{array}
|
||||
}
|
||||
}_{r_0(s)-mal} \\
|
||||
\end{array}\,\right)
|
||||
\end{equation*}
|
||||
|
|
31
povray/ellipsoid/Makefile
Normal file
31
povray/ellipsoid/Makefile
Normal file
|
@ -0,0 +1,31 @@
|
|||
SOURCE = ellipsoid
|
||||
DELAY = 80
|
||||
DENSITY = 300
|
||||
WIDTH = 500
|
||||
|
||||
make:
|
||||
povray $(SOURCE).pov
|
||||
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:
|
||||
#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
|
24
povray/ellipsoid/ellipsoid.pov
Normal file
24
povray/ellipsoid/ellipsoid.pov
Normal file
|
@ -0,0 +1,24 @@
|
|||
#include "colors.inc"
|
||||
#include "stones.inc"
|
||||
|
||||
camera {
|
||||
location <10, 10, 0>
|
||||
look_at <0, 0, 0>
|
||||
}
|
||||
|
||||
plane {
|
||||
y, 0
|
||||
pigment { checker color Gray color White }
|
||||
}
|
||||
|
||||
sphere {
|
||||
<0, 0, 0>, 4 // center and radius
|
||||
pigment { color White }
|
||||
texture {T_Stone1}
|
||||
finish {
|
||||
reflection 0.1
|
||||
phong 0.3
|
||||
}
|
||||
}
|
||||
light_source { <5, 10, 10> color White }
|
||||
light_source { <10, 10, 5> color White }
|
31
tikz/ellipsoid/Makefile
Normal file
31
tikz/ellipsoid/Makefile
Normal file
|
@ -0,0 +1,31 @@
|
|||
SOURCE = ellipsoid
|
||||
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
|
||||
|
||||
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
|
BIN
tikz/ellipsoid/ellipsoid.pdf
Normal file
BIN
tikz/ellipsoid/ellipsoid.pdf
Normal file
Binary file not shown.
45
tikz/ellipsoid/ellipsoid.tex
Normal file
45
tikz/ellipsoid/ellipsoid.tex
Normal file
|
@ -0,0 +1,45 @@
|
|||
\documentclass{article}
|
||||
\usepackage[pdftex,active,tightpage]{preview}
|
||||
\setlength\PreviewBorder{2mm}
|
||||
\usepackage{pgfplots}
|
||||
\usepackage{units}
|
||||
\pgfplotsset{compat=1.3}% <-- moves axis labels near ticklabels
|
||||
% (respects tick label widths)
|
||||
\usepackage{tikz}
|
||||
\usetikzlibrary{arrows, positioning, calc, intersections, decorations.markings}
|
||||
|
||||
\usepackage{xcolor}
|
||||
\definecolor{horizontalLineColor}{HTML}{008000}
|
||||
\definecolor{verticalLineColor}{HTML}{FF0000}
|
||||
|
||||
\begin{document}
|
||||
|
||||
% Define this as a command to ensure that it is same in both cases
|
||||
\newcommand*{\ShowIntersection}[2]{
|
||||
\fill
|
||||
[name intersections={of=#1 and #2, name=i, total=\t}]
|
||||
[red, opacity=1, every node/.style={above left, black, opacity=1}]
|
||||
\foreach \s in {1,...,\t}{(i-\s) circle (2pt)
|
||||
node [above left] {\s}};
|
||||
}
|
||||
|
||||
\begin{preview}
|
||||
\begin{tikzpicture}
|
||||
\begin{axis}[
|
||||
grid=both,
|
||||
minor tick num=1,
|
||||
xlabel=$x$,
|
||||
ylabel=$y$,
|
||||
zlabel=$z$,
|
||||
%label distance=0mm,
|
||||
%width=8cm, height=7cm, % size of the image
|
||||
axis lines=left,
|
||||
%tick style={draw=none},
|
||||
%xticklabels={,,},
|
||||
%yticklabels={,,}
|
||||
]
|
||||
\addplot3[surf] {-(x*x/16+y*y/4-1)};
|
||||
\end{axis}
|
||||
\end{tikzpicture}
|
||||
\end{preview}
|
||||
\end{document}
|
Loading…
Add table
Add a link
Reference in a new issue