Sunday, October 5, 2014

Kurva Parametrik #3

Ini adalah tiga contoh terakhir dari kurva parametrik, setelah yang ini dan yang itu. Semuanya saya susun (compile) dalam jaringan melalui Online LaTeX Editor ShareLaTeX.
Demikian semoga bermanfaat.

Adjie Gumarang Pujakelana 2014 







Contoh 7

\documentclass[a4paper,10pt]{standalone}
\usepackage[T1]{fontenc}
\usepackage{concmath,gentium}
\usepackage[svgnames]{xcolor}
\setlength{\parindent}{0pt}
\usepackage{fix-cm}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{tikz}

\begin{document}

\color{MidnightBlue}
\centering
\begin{tikzpicture}[-latex,scale=2.15]

% Draw the lines at multiples of pi/12
\foreach \ang in {0,...,31} {
  \draw [lightgray] (0,0) -- (\ang * 180 / 16:4);
}

% Concentric circles and radius labels
\foreach \s in {0, 1, 2, 3} {
  \draw [lightgray] (0,0) circle (\s + 0.5);
  \draw (0,0) circle (\s);
  \node [fill=white] at (\s, 0) [below] {\scriptsize $\s$};
}

% Add the labels at multiples of pi/4
\foreach \ang/\lab/\dir in {
  0/0/right,
  1/{\pi/4}/{above right},
  2/{\pi/2}/above,
  3/{3\pi/4}/{above left},
  4/{\pi}/left,
  5/{5\pi/4}/{below left},
  7/{7\pi/4}/{below right},
  6/{3\pi/2}/below} {
  \draw (0,0) -- (\ang * 180 / 4:4.1);
  \node [fill=white] at (\ang * 180 / 4:4.2) [\dir] {\scriptsize $\lab$};
}

% The double-lined circle around the whole diagram
\draw [style=double] (0,0) circle (4);

\fill [fill=red!50!black, opacity=0.5] plot [domain=-pi/2:pi/2] (xy polar cs:angle=\x r,radius= {2-2*sin(\x r)});
\draw [thick,color=red,domain=0:2*pi,samples=200,smooth] plot (xy polar cs:angle=\x r,radius= {2-2*sin(\x r)});
\node [fill=white] at (2,1) {$r=2-2\sin\theta$};
\end{tikzpicture} 

\end{document}





Contoh 8

\documentclass[a4paper,10pt]{standalone}
\usepackage[T1]{fontenc}
\usepackage{concmath,gentium}
\usepackage[svgnames]{xcolor}
\setlength{\parindent}{0pt}
\usepackage{fix-cm}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{tikz}

\begin{document}

\color{MidnightBlue}
\centering
\begin{tikzpicture}[-latex,scale=2.15]
\fill [fill=Tomato, opacity=0.75] plot [domain=-pi/2:pi/2] (xy polar cs:angle=\x r,radius= {2-2*sin(\x r)});
\draw [thick,color=Tomato,domain=0:2*pi,samples=200,smooth] plot (xy polar cs:angle=\x r,radius= {2-2*sin(\x r)});
\node [fill=white] at (0,0.75) {\fontsize{.5cm}{1.95cm}\selectfont$r=2-2\sin\theta$};
\end{tikzpicture} 

\end{document}




Contoh 9

\documentclass[a4paper,10pt]{standalone}
\usepackage[T1]{fontenc}
\usepackage{concmath,gentium}
\usepackage[svgnames]{xcolor}
\setlength{\parindent}{0pt}
\usepackage{fix-cm}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{pgfplots}
\pgfplotsset{compat=1.9}
    \usepgfplotslibrary{polar}
    \usepgfplotslibrary{units}
\pgfplotsset{every axis/.append style={
                    axis x line=middle,    % put the x axis in the middle
                    axis y line=middle,    % put the y axis in the middle
                    axis line style={<->,color=blue}, % arrows on the axis
                    xlabel={$x$},          % default put x on x-axis
                    ylabel={$y$},          % default put y on y-axis
            }}

\begin{document}

\color{MidnightBlue}
\centering
\begin{tikzpicture}[scale=2.5]
\begin{axis}[
    domain=-pi/2:pi/2, % The range over which to evaluate the functions
    xtick={-1,...,1}, ytick={-1,...,1}, % Tick marks only on integers between -1 and 1
    axis lines=middle, % Axis lines go through (0,0)
    enlargelimits=true, % Make the axis lines a bit longer than required for the plots
    samples=101, % Number of samples for evaluating the functions (use an odd number to capture the (0,0) point
    xlabel=$x$, ylabel=$y$, % Axis labels
    clip=false % So the labels aren't cut off
]
\addplot [thick, IndianRed]
    ( {sqrt(2) * sin(deg(x))},
      {abs(sin(deg(x*2)))} )
    node [pos=0.8, anchor=south] {$f(x) = |x|\sqrt{2-x^2}$}; % Add a text node at 80% of the plot length
\addplot [thick, SeaGreen]
    ( {sqrt(2) * sin(deg(x))},
      {-abs(sin(deg(x*2)))} )
    node [pos=0.8, anchor=north] {$f(x) = -|x|\sqrt{2-x^2}$};
\end{axis}
\end{tikzpicture}

\end{document}




2 comments:

tex said...

Permisi, saya mau tanya, bagaimana menyisipkan kode program Latex di blogspot,com . Saya belum menemukan solusi agar mudah dibaca kode LaTeX tidak adanya yang hilang kodenya , dan saya menggunakan syntax highlighter dari sini http://alexgorbatchev.com/SyntaxHighlighter/ tetapi tidak memuaskan hasilnya karena kode latex yang hilang/ tidak bisa ditampilkan. Memang dari segi tampilan bagus, dan mudah dibaca, sementara waktu saya pakai di blogspot menunggu perangkat penggantinya .
Terima Kasih , Mohon Maaf keluar dari Topik


Hirwanto(hirwanto.iwan@yahoo.com)

Eman Sulaeman said...
This comment has been removed by the author.
Related Posts Plugin for WordPress, Blogger...