-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathprm_3.tex
87 lines (71 loc) · 2.61 KB
/
prm_3.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
\documentclass[]{standalone}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{tikz}
\usepackage{import}
\usepackage[subpreambles=true]{standalone}
\usepackage{tikz}
\usepackage{tikz-3dplot}
\usetikzlibrary{positioning}
\begin{document}
\begin{tikzpicture}[scale=1]
\useasboundingbox (0,0) rectangle (5,3);
\coordinate (init) at (0.5,0.5);
\coordinate (goal) at (4.6,2.25);
\coordinate (obs1) at (2.4,2.1);
\coordinate (obs2) at (3.7,0.65);
\coordinate (n0) at (0.4,1.3);
\coordinate (n1) at (1.2,2.5);
\coordinate (n2) at (1.5,0.3);
\coordinate (n3) at (4.5,1.1);
\coordinate (n4) at (1.6,1.0);
\coordinate (n5) at (4.0,2.0);
\coordinate (n6) at (3.3,2.2);
\coordinate (n7) at (3.25,1.1);
\coordinate (n8) at (2.5,1.1);
\coordinate (n9) at (0.3,2.1);
\coordinate (n10) at (3.7,2.7);
\path[draw] (n0) -- (n1);
\path[draw] (n0) -- (n2);
\path[draw] (n2) -- (n4);
\path[draw] (n8) -- (n4);
\path[draw] (n8) -- (n2);
\path[draw] (n7) -- (n8);
\path[draw] (n4) -- (n0);
\path[draw] (n3) -- (n5);
\path[draw] (n6) -- (n5);
\path[draw] (n7) -- (n6);
\path[draw] (n9) -- (n0);
\path[draw] (n9) -- (n1);
\path[draw] (n10) -- (n6);
\path[draw] (n10) -- (n5);
\path[draw] (init) -- (n0);
\path[draw] (init) -- (n2);
\path[draw] (init) -- (n4);
\path[draw] (goal) -- (n6);
\path[draw] (goal) -- (n10);
\path[draw] (goal) -- (n5);
\path[draw] (goal) -- (n3);
% \path[draw=red, thick] (init) -- (n4) -- (n8) -- (n7) -- (n6) -- (goal);
\foreach \x in {0,...,10}
\path[draw, fill] (n\x) circle (0.05);
\path[draw, very thick] (0,0) -- (5,0) -- (5,3) -- (0,3) -- cycle;
\path[draw, fill] (init) circle (0.05) node[below] {$x_\mathrm{init}$};
\path[draw, fill] (goal) circle (0.05) node[above] {$x_\mathrm{goal}$};
\begin{scope}
\clip (0,0) rectangle (5,3);
\path[draw, thick, dashed, fill=gray, fill opacity=0.2] (init) circle (1.3);
% \path[draw, <->, thick] (init) -- ++({cos(45)*1.3}, {sin(45)*1.3}) node [midway, shift={(-0.25,0)}] {$r$};
\end{scope}
\begin{scope}
\clip (0,0) rectangle (5,3);
\path[draw, thick, dashed, fill=gray, fill opacity=0.2] (goal) circle (1.3);
% \path[draw, <->, thick] (goal) -- ++({cos(45)*1.3}, {sin(45)*1.3}) node [midway, shift={(-0.25,0)}] {$r$};
\end{scope}
\path[draw, very thick, rounded corners=14pt, fill=black!30] (obs1) %node[shift={(-0.15,-0.25)}]{$\mathcal{C}_\mathrm{obs}$}
++(-1.2,-1) -- ++(2,0.2) -- ++(0,1) -- ++(-1.5,0.5) -- cycle;
\path[draw, very thick, rounded corners=4pt, fill=black!30] (obs2) ++(-1.5,-0.25) -- ++(0,0.3) -- ++(1.3,0.2) -- ++(0.2,1) -- ++(0.3,0) -- ++(0.3,-1.6) -- cycle;
\end{tikzpicture}
\end{document}