\documentclass[12pt]{article}
\usepackage{czech}
\usepackage[utf8]{inputenc}

%\usepackage{times}
%\usepackage[mtbold,mtplusscr,mtpluscal]{mathtime}

\usepackage{graphicx}





\usepackage[inline]{asymptote}


\begin{document}

\section*{Použití Asymptote uvnitř \LaTeX{}ového dokumentu}

\subsection*{3D grafika}

\subsubsection*{Funkce dvou proměnných}

\begin{asy}
import graph3;

size (200 ,200 , keepAspect = false );
currentprojection = orthographic (3 ,9 ,5);

real f( pair z){
real x=z.x,y=z.y;
return x^2+y^2;
}

draw ( surface (f ,( -2 , -2) ,(2 ,2) ,xsplinetype = Spline ),
red , meshpen = black +0.5) ;

xaxis3 ("$x$ " ,-2,3, Arrow3 );
yaxis3 ("$y$ " ,-2,3, Arrow3 );
zaxis3 ("$z$ " ,0,7, Arrow3 );
\end{asy}


\end{document}

\subsubsection{Plochy dané parametricky}
\begin{asy}
import graph3;

size(150,0);
real a=3,b=2,c=1;

triple F(pair z){
real phi=z.x, theta=z.y;
return (a*cos(phi)*cos(theta),
b*cos(phi)*sin(theta),
c*sin(phi));
}
draw(surface(F,(-pi/2,0),(pi/2,2pi),nu =8,Spline),green,
meshpen = black +0.5);
\end{asy}


\subsubsection{Rotační tělesa}
\begin{asy}
import solids;

size(0,150);
currentprojection = orthographic (2,-2,1);

path3 p = rotate (90,(1,0,0))*shift(2,2,0)*unitcircle3;

revolution r=revolution (p,0,270);

draw(surface(r,n=5),orange,meshpen = black+0.5);

xaxis3("$x$",0,4);
yaxis3("$y$",0,4);
zaxis3("$z$",0,4);
\end{asy}



\subsubsection{\uv{Vytažené} plochy}

\begin{asy}
import three;

size(0,150) ;
currentprojection = orthographic(1,-2,1);

// dve kruznice
path3 p = rotate(90,(0,1,0))*unitcircle3;
path3 q = shift((2,0,0))*scale3 (2)*p;

draw(extrude(p,(-2 ,0,0)),green);
draw(extrude(p,q),blue);
\end{asy}

\end{document}

