Überarbeitungsverlauf[Zurück]
Klicke auf Einblenden/Ausblenden von Überarbeitungen 6

07 Jul '16, 12:06

Henri's gravatar image

Henri
15.7k133943

So wie ich das sehe ist `parametricfill` das einzige was `tikz-3dplot` unterstützt. Allerdings kann man die Funktion auch mit `pgfplots` plotten. Dort hat man Zugriff auf unzählige Colormaps. Eine monochromatische Colormap ist zum Beispiel `viridis` (die Standardcolormap von Python [`matplotlib`](http://matplotlib.org/index.html)). Benutzt man eine neuere Version von `pgfplots`, so kann die Funktion auch in Lua ausgewertet werden. Das beschleunigt das Setzen *immens!* Dazu ruft man einfach `lualatex test.tex` statt `pdflatex test.tex` auf. \documentclass{article} \usepackage{tikz} \usepackage{pgfplots} \usepgfplotslibrary{colormaps} \pgfplotsset{ compat=1.13, /pgf/declare function={ surface(\theta,\phi)=1/(7.74-1.8*(1-cos(2*\theta))*((1+cos(2*\theta))+0.25*(1-cos(2*\theta))*(1-0.5*(1+cos(4*\phi))))); } } \begin{document} \begin{tikzpicture} \begin{axis} [ width=6cm,height=6cm, axis equal,enlargelimits=false, domain=0:180,samples=35, y domain=0:360,samples y=35, colormap/viridis,colorbar, ] \addplot3 [ surf,opacity=0.7, z buffer=sort, faceted color=black, point meta={abs(sqrt(x^2+y^2+z^2))} ] ( {sin(x)*cos(y)*surface(x,y)}, {sin(x)*sin(y)*surface(x,y)}, {cos(x)*surface(x,y)} ); \end{axis} \end{tikzpicture} \end{document} ![alt text][1] [1]: http://texwelt.de/wissen/upfiles/test_147.png
Klicke auf Einblenden/Ausblenden von Überarbeitungen 5

07 Jul '16, 12:02

Henri's gravatar image

Henri
15.7k133943

So wie ich das sehe ist `parametricfill` das einzige was `tikz-3dplot` unterstützt. Allerdings kann man die Funktion auch mit `pgfplots` plotten. Dort hat man Zugriff auf unzählige Colormaps. Colormaps. Eine monochromatische Colormap ist zum Beispiel `viridis` (die Standardcolormap von Python [`matplotlib`](http://matplotlib.org/index.html)). Benutzt man eine neuere Version von `pgfplots`, so kann die Funktion auch in Lua ausgewertet werden. Das beschleunigt das Setzen *immens!* Dazu ruft man einfach `lualatex test.tex` statt `pdflatex test.tex` auf. \documentclass{article} \usepackage{tikz} \usepackage{pgfplots} \usepgfplotslibrary{colormaps} \pgfplotsset{ compat=1.13, /pgf/declare function={ surface(\theta,\phi)=1/(7.74-1.8*(1-cos(2*\theta))*((1+cos(2*\theta))+0.25*(1-cos(2*\theta))*(1-0.5*(1+cos(4*\phi))))); } } \begin{document} \begin{tikzpicture} \begin{axis} [ width=6cm,height=6cm, axis equal,enlargelimits=false, domain=0:180,samples=35, y domain=0:360,samples y=35 y=35, colormap/viridis,colorbar, ] \addplot3 [ surf,opacity=0.7, z buffer=sort, colormap/hsv,faceted faceted color=black, point meta={10*abs(sqrt(x^2+y^2+z^2))} meta={abs(sqrt(x^2+y^2+z^2))} ] ( {sin(x)*cos(y)*surface(x,y)}, {sin(x)*sin(y)*surface(x,y)}, {cos(x)*surface(x,y)} ); \end{axis} \end{tikzpicture} \end{document} ![alt text][1] Wenn man gerade ein bisschen Rechenzeit übrig hat kann man auch mal samples=101, samples y=101, einstellen. Man sollte zudem `faceted color=black` entfernen. ![alt text][2] [1]: http://texwelt.de/wissen/upfiles/test_144.png [2]: http://texwelt.de/wissen/upfiles/test_145.pnghttp://texwelt.de/wissen/upfiles/test_147.png
Klicke auf Einblenden/Ausblenden von Überarbeitungen 4

07 Jul '16, 11:54

Henri's gravatar image

Henri
15.7k133943

Klicke auf Einblenden/Ausblenden von Überarbeitungen 3

07 Jul '16, 11:46

Henri's gravatar image

Henri
15.7k133943

Klicke auf Einblenden/Ausblenden von Überarbeitungen 2

07 Jul '16, 11:41

Henri's gravatar image

Henri
15.7k133943

Klicke auf Einblenden/Ausblenden von Überarbeitungen 1

06 Jul '16, 18:04

Henri's gravatar image

Henri
15.7k133943