Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
polimi-cheatsheet
GitHub Repository: polimi-cheatsheet/GAL-cheatsheet
Path: blob/master/grafici/quadriche.tex
185 views
1
%\begin{tikzpicture}
2
% \pgfplotsset{ticks=none}
3
% \begin{axis}[
4
% xmin=-3,xmax=3,
5
% ymin=-3,ymax=3,
6
% zmin=-2,zmax=2,
7
% xlabel={$x$},
8
% ylabel={$y$},
9
% zlabel={$z$},
10
% zlabel style={rotate=90},
11
% view={10}{20},
12
% width=3cm,
13
% height=3cm]
14
% \addplot3[mesh,black,domain=0:2*pi,y domain=0:pi,samples=10,samples y=10]({2*cos(deg(x))*sin(deg(y))},{sin(deg(x))*sin(deg(y))},{cos(deg(y))});
15
% \end{axis}
16
%
17
% \node[text width=1.7cm] at (0.5,-0.4) {$\scriptstyle \frac{x^2}{4}+y^2+z^2=1$};
18
%\end{tikzpicture}
19
\begin{tikzpicture}
20
\pgfplotsset{ticks=none}
21
\begin{axis}[
22
xmin=-3,xmax=3,
23
ymin=-3,ymax=3,
24
zmin=-2,zmax=2,
25
xlabel={$x$},
26
ylabel={$y$},
27
zlabel={$z$},
28
zlabel style={rotate=90},
29
view={20}{20},
30
width=3cm,
31
height=3cm]
32
% x^2+y^2-z^2=1
33
\addplot3[mesh,black,domain=1:2,y domain=0:2*pi,samples=6,samples y=10]({x*cos(deg(y))},{x*sin(deg(y))},{sqrt(x^2-1)});
34
\addplot3[mesh,black,domain=1:2,y domain=0:2*pi,samples=6,samples y=10]({x*cos(deg(y))},{x*sin(deg(y))},{-sqrt(x^2-1)});
35
\end{axis}
36
37
\node[text width=1.6cm] at (0.7,-0.4) {$\scriptstyle x^2+y^2-z^2=1$};
38
\end{tikzpicture}
39
\begin{tikzpicture}
40
\pgfplotsset{ticks=none}
41
\begin{axis}[
42
xmin=-3,xmax=3,
43
ymin=-3,ymax=3,
44
zmin=-2,zmax=2,
45
xlabel={$x$},
46
ylabel={$y$},
47
zlabel={$z$},
48
zlabel style={rotate=90},
49
view={25}{20},
50
width=3cm,
51
height=3cm]
52
% x^2-y^2-z^2=1
53
\addplot3[mesh,black,domain=-1.2:1.2,y domain=-1.2:1.2,samples=8,samples y=8]({cosh(x)*cosh(y)},{cosh(x)*sinh(y)},{sinh(x)});
54
\addplot3[mesh,black,domain=-1.2:1.2,y domain=-1.2:1.2,samples=8,samples y=8]({-cosh(x)*cosh(y)},{cosh(x)*sinh(y)},{sinh(x)});
55
56
\end{axis}
57
58
\node[text width=1.6cm] at (0.7,-0.4) {$\scriptstyle x^2-y^2-z^2=1$};
59
\end{tikzpicture}
60
\begin{tikzpicture}
61
\pgfplotsset{ticks=none}
62
\begin{axis}[
63
xmin=-3,xmax=3,
64
ymin=-3,ymax=3,
65
zmin=-2,zmax=2,
66
xlabel={$x$},
67
ylabel={$y$},
68
zlabel={$z$},
69
zlabel style={rotate=90},
70
view={20}{20},
71
width=3cm,
72
height=3cm]
73
\addplot3[mesh,black,domain=0:2*pi,y domain=0:1.5,samples=9,samples y=6]({y*cos(deg(x))},{y*sin(deg(x))},{y^2});
74
75
\end{axis}
76
77
\node[text width=1.2cm] at (0.7,-0.4) {$\scriptstyle x^2+y^2=z$};
78
\end{tikzpicture}
79
\begin{tikzpicture}
80
\pgfplotsset{ticks=none}
81
\begin{axis}[
82
xmin=-3,xmax=3,
83
ymin=-3,ymax=3,
84
zmin=-2,zmax=2,
85
xlabel={$x$},
86
ylabel={$y$},
87
zlabel={$z$},
88
zlabel style={rotate=90},
89
view={15}{40},
90
width=3cm,
91
height=3cm]
92
\addplot3[mesh,black,domain=-1.5:1.5,y domain=-1.5:1.5,samples=8,samples y=8]({x},{y},{x^2-y^2});
93
94
\end{axis}
95
96
\node[text width=1.2cm] at (0.7,-0.4) {$\scriptstyle x^2-y^2=z$};
97
\end{tikzpicture}
98
99