Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- \documentclass[a4paper,10pt]{article}
- %http://tex.stackexchange.com/questions/34302/surface-of-revolution/34303#34303
- \usepackage[hmargin=1.5cm,top=1.5cm]{geometry}
- \usepackage[svgnames,dvipsnames]{xcolor}
- \usepackage[labelformat=simple]{caption}
- \usepackage[T1]{fontenc}
- \usepackage[indonesian]{babel}
- \usepackage{gentium,fourier}
- \usepackage{adjustbox}
- \usepackage{url}
- \usepackage{amsmath,bm}
- \let\ds\displaystyle
- \usepackage{tikz,pgfplots}
- \pgfplotsset{compat=1.10}
- \usepgfplotslibrary{fillbetween}
- \usepgfplotslibrary{colormaps}
- %\usepgfplotslibrary{patchplots}
- \definecolor{stempel}{RGB}{0 34 85}
- \begin{document}
- \adjustbox{valign=t}{\begin{minipage}[t]{0.4\textwidth}
- \centering
- \begin{tikzpicture}[transform shape,scale=1]
- \node {%
- \begin{tikzpicture}[]
- \pgfplotsset{set layers}
- \begin{axis}[
- axis lines=middle,
- xtick={-2,-1,2,3},
- ytick=\empty, % gambar 1
- xlabel={\large $x$},
- ylabel={\large $y$},
- xmin=-3, xmax=4,
- ymin=-8.5,ymax=6,
- samples=500,enlargelimits=false]
- \addplot[name path=A,domain=-2.15:3.15,Navy,smooth] {x^3-x^2-6*x} node[above left] {$y=x^3-x^2-6x$};
- \path[name path=B] (axis cs:-1,0)--(axis cs:2,0);
- \addplot[draw,fill=DarkOrange!50!Yellow,opacity=.75] fill between[of=A and B,soft clip={domain=-1:2}];
- \end{axis}
- \end{tikzpicture}%
- };%
- \end{tikzpicture}%
- \captionof{figure}{}
- \end{minipage}}\hfill
- %
- \adjustbox{valign=t}{\begin{minipage}[t]{0.45\textwidth}
- \centering
- \begin{tikzpicture}
- \begin{axis}[]
- \addplot3[surf,shader=flat, % gambar 2
- samples=20,
- domain=-1:2,y domain=0:2*pi,
- z buffer=sort]
- (x,{(x^3-x^2-6*x)*cos(deg(y))}, {(x^3-x^2-6*x)*sin(deg(y))});
- \end{axis}
- \end{tikzpicture}
- \captionof{figure}{}
- \end{minipage}}\hfill
- \bigskip
- \adjustbox{valign=t}{\begin{minipage}[t]{0.45\textwidth}
- \centering
- \begin{tikzpicture}
- \begin{axis}[view={15}{7},
- xlabel=$x$, ylabel=$y$, zlabel=$z$,
- after end axis/.code={
- \draw [-stealth, thick, red] (xticklabel cs:0.2) -- (xticklabel cs:0.8);
- \draw [-stealth, thick, red] (yticklabel cs:0.2) -- (yticklabel cs:0.8);
- \draw [-stealth, thick, red] (zticklabel cs:0.2) -- (zticklabel cs:0.8);
- } % gambar 3
- ]
- \addplot3[surf,shader=flat,
- samples=20,colormap/cool,
- domain=-1:2,y domain=0:2*pi,
- z buffer=sort]
- (x,{(x^3-x^2-6*x)*cos(deg(y))}, {(x^3-x^2-6*x)*sin(deg(y))});
- \end{axis}
- \end{tikzpicture}
- \captionof{figure}{}
- \end{minipage}}\hfill
- %
- \adjustbox{valign=t}{\begin{minipage}[t]{0.45\textwidth}
- \centering
- \begin{tikzpicture}
- \begin{axis}[view={15}{5}]
- \addplot3[mesh,shader=faceted,
- samples=20,colormap/jet,
- domain=-1:2,y domain=0:2*pi,
- z buffer=sort] % gambar 4
- (x,{(x^3-x^2-6*x)*cos(deg(y))}, {(x^3-x^2-6*x)*sin(deg(y))});
- \end{axis}
- \end{tikzpicture}
- \captionof{figure}{}
- \end{minipage}}\hfill
- \bigskip
- \adjustbox{valign=t}{\begin{minipage}[t]{0.45\textwidth}
- \centering
- \begin{tikzpicture}
- \begin{axis}[view={15}{5}]
- \addplot3[surf,shader=faceted interp,
- samples=20,colormap/winter,
- domain=-1:2,y domain=0:2*pi, % gambar 5
- z buffer=sort]
- (x,{(x^3-x^2-6*x)*cos(deg(y))}, {(x^3-x^2-6*x)*sin(deg(y))});
- \end{axis}
- \end{tikzpicture}
- \captionof{figure}{}
- \end{minipage}}\hfill
- %
- \adjustbox{valign=t}{\begin{minipage}[t]{0.45\textwidth}
- \centering
- \begin{tikzpicture}
- \begin{axis}[grid=both,view = {20}{10}]
- \addplot3[surf,shader=faceted interp,
- colormap/greenyellow,
- samples=50,
- domain=-1:2,y domain=0:2*pi, % gambar 6
- z buffer=sort]
- (x,{(x^3-x^2-6*x)*cos(deg(y))}, {(x^3-x^2-6*x)*sin(deg(y))});
- \end{axis}
- \end{tikzpicture}
- \captionof{figure}{}
- \end{minipage}}\hfill
- \newpage
- \adjustbox{valign=t}{\begin{minipage}[t]{0.45\textwidth}
- \centering
- \begin{tikzpicture}
- \begin{axis}[view = {20}{10}]
- \addplot3[surf,shader=interp,
- colormap/blackwhite,
- samples=50,
- domain=-1:2,y domain=0:2*pi, % gambar 7
- z buffer=sort]
- (x,{(x^3-x^2-6*x)*cos(deg(y))}, {(x^3-x^2-6*x)*sin(deg(y))});
- \end{axis}
- \end{tikzpicture}
- \captionof{figure}{}
- \end{minipage}}\hfill
- %
- \adjustbox{valign=t}{\begin{minipage}[t]{0.45\textwidth}
- \centering
- \begin{tikzpicture}
- \begin{axis}[view = {20}{10},
- axis lines=middle, axis on top,
- xtick={-1,0,1,2},ytick=\empty,ztick=\empty,
- enlargelimits=true]
- \addplot3[surf,shader=interp,
- colormap={pos}{color(0cm)=(DarkSlateBlue);
- color(1cm)=(DarkSlateBlue!30);
- color(2cm)=(DarkSlateBlue)},
- samples=30,
- domain=-1:2,y domain=0:2*pi, % gambar 8
- z buffer=sort]
- (x,{(x^3-x^2-6*x)*cos(deg(y))}, {(x^3-x^2-6*x)*sin(deg(y))});
- \end{axis}
- \end{tikzpicture}
- \captionof{figure}{}
- \end{minipage}}\hfill
- \end{document}%-----------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement