This repository has been archived by the owner on May 1, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
coffeecup.tex
48 lines (43 loc) · 1.81 KB
/
coffeecup.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
\begin{tikzpicture}[scale=1.5]
% Saucer
\begin{scope}[shift={(0,-1)}]
\fill [black!87.5, path fading=fade out]
(0,-2/8) ellipse [x radius=6/4, y radius=3/4];
\shade [left color=gray!20, right color=gray!80]
(0,0) ++(180:1.25) arc (180:360:5/4 and 5/8+1/16);
\shade [left color=gray!40, right color=gray!20]
(0,0) ellipse [x radius=5/4, y radius=5/8];
\shade [right color=gray!40, left color=gray!20]
(0,0) ellipse [x radius=5/4/2, y radius=5/8/2];
\shade [left color=gray!40, right color=gray!20]
(0,-1/16) ellipse [x radius=5/4/2-1/16, y radius=5/8/2-1/16];
\end{scope}
% Handle
\begin{scope}[shift=(10:7/8), rotate=-30, yslant=1/2, xslant=-1/8]
\shade [top color=gray!80, bottom color=gray!30]
(0,0) arc (130:-100:3/8 and 1/2) -- ++(0,1/4) arc (-100:130:1/8 and 1/4) -- cycle;
\shade [top color=gray!10, bottom color=gray!60]
(0,0) arc (130:-100:3/8 and 1/2) -- ++(0,1/32) arc (-100:130:1/4 and 1/3) -- cycle;
\end{scope}
% Cup
\fill [black!75, path fading=fade out]
(0,-1) ellipse [x radius=3/4, y radius=1/2];
\shade [left color=gray!60, right color=gray!30]
(-1,0) arc (180:360:1 and 5/4);
\shade [bottom color=gray, top color=gray!30, opacity=1/2]
(-1,0) arc (180:360:1 and 5/4);
\shade [left color=gray!20, right color=gray!40]
(0,0) ellipse [x radius=1, y radius=1/2];
\shade [left color=gray!40, right color=gray!20]
(0,0) ellipse [x radius=1-1/16, y radius=1/2-1/16];
\shade [bottom color=gray, top color=gray!10, opacity=1/2]
(0,0) ellipse [x radius=1-1/16, y radius=1/2-1/16];
% Coffee
\begin{scope}
\clip ellipse [x radius=1-1/16, y radius=1/2-1/16];
\fill [brown!25!black]
(0,-1/4) ellipse [x radius=3/4, y radius=3/8];
\fill [brown!50!black, path fading=fade out]
(0,-1/4) ellipse [x radius=3/4, y radius=3/8];
\end{scope}
\end{tikzpicture}