-
Notifications
You must be signed in to change notification settings - Fork 2
/
geometry.tex
234 lines (218 loc) · 8.67 KB
/
geometry.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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{unicode,math}
\usepackage[margin=30mm]{geometry}
\newenvironment{eqsplit}{\equation\aligned}{\endaligned\endequation}
\begin{document}
\title{Useful geometric computatoins}
\section{Uniform approximation of a parabolic arc by a polygonal chain}%««1
\begin{prop}\label{prop:points}
Let~$𝒫$ be the parabola with equation $y = f(x) = a/2 + x²/2a$.
Let~$H$ be the hypergeometric function
$H(u) = {}_2F_1(1/4,1/2;\;3/2\;-u^2)$.
Choose real numbers~$s_1$, $s_2$ and an integer~$n ≥ 1$
and define, for~$i = 0, …, n$,
$x_i = a H^{-1}((1-i/n) s_1 + (i/n) s_2)$.
Then, for $n$ large enough,
the polygonal line with vertices~$A_i = (x_i, f(x_i))$
lies within a Minkowski distance~$δ = \frac{a}{8n^2}
(s_2-s_1)^2+O(n^{-4})$ of the parabola~$𝒫$.
\end{prop}
\begin{proof}
It is enough to prove this for an individual segment of the polygonal line,
for example the segment $(A_0, A_1)$.
For~$x_0 ≤ x ≤ x_1$, the distance between a point~$(x, f(x)) ∈ 𝒫$
and the segment~$(A_0, A_1)$ is given by the function
% the maximum on the interval~$[x_0,x_1]$ of the function
\begin{equation}\begin{split}
g(x)
% &= \frac{(x_0+x_1)/(2a) x - f(x) + x_0 x_1/(2a) + a/2}{√{1+(x_0+x_1/2a)^2}}\\
&= \frac{(x_0+x_1) x - 2a f(x) + x_0 x_1 + a^2}{√{(2a)^2+(x_0+x_1)^2}}\\
% &= \frac{(x_0+x_1) x - a^2 - x^2 + x_0 x_1 + a^2}{√{(2a)^2+(x_0+x_1)^2}}\\
&= \frac{(x-x_0)(x_1-x)}{√{(2a)^2+(x_0+x_1)^2}}.\\
\end{split}\end{equation}
The maximum value~$δ_0$ of~$g$ on the interval~$[x_0,x_1]$
is reached for~$x = (x_0+x_1)/2$
and amounts to $δ_0 = \frac{(x_1-x_0)^2}{4√{(2a)^2+(x_0+x_1)^2}}$.
Let~$G = H^{-1}$ and~$x(t) = a G((1-t) s_1 + t s_2)$.
Then for all~$i = 0,…, n$, $x_i = x(i/n)$
and $x_{i+1} - x_i = x'(i/n)/n + O(1/n^2)$.
Therefore
\begin{equation}
δ_i = \frac{x'(i/n)^2}{8n^2 √{a^2 + x_i^2}} + O(1/n^4).
\end{equation}
Since $H'(u)^4 = 1/(1+u^2)$,
the inverse~$G$ of~$H$ satisfies the differential equation
$(G')^4 = 1 + G^2$,
and hence $x'(t)^2 = a (s_2 - s_1)^2 √{a^2 + x(t)^2}$.
Accordingly, one finds
\begin{equation}
δ_i = \frac{a}{8n^2} (s_2-s_1)^2 + O(1/n^4).
\end{equation}
Since this is true for all~$i = 0,…,n-1$, the proposition follows.
\end{proof}
\begin{prop}\label{prop:approx}
The following algorithm approximates the parabola~$𝒫$
on the interval~$[X_1,X_2]$ within a distance~$≤ δ + O(δ^2)$.
\begin{enumerate}
\item For~$i = 1,2$, define $s_i = H(X_i/a)$.
\item Let~$n ≥ \abs{s_2-s_1} √{a/(8δ)}$.
\item Define the points~$(x_i=a H^{-1}(s_1 + \frac{i}{n}(s_2-s_1), f(x_i))$
as in Prop.~\ref{prop:points}.
\end{enumerate}
\end{prop}
% \section{Arc length of an Archimedean spiral (wrapped line segment)}%««1
%
% Let~$F$ be the transformation on~$ℝ^2$ defined by
% $F(x,y) = (x \cos(y/x), x \sin(y/x)$.
%
% \begin{prop}
% Let~$S = (p_0, p_1)$ be a line segment, with $p_i = (x_i, y_i)$,
% such that $0 < x_0 < x_1$.
% Let~$a = x_0 - x_1$, $D = x_0 y_1 - y_0 x_1$,
% and $z_i = D+√{a^2 x_i^2 + D^2}$.
% Then the arc length of the image curve~$F(S)$ is
% \[ \begin{cases}
% \frac{D}{a} \log \frac{x_1 z_0}{x_0 z_1}
% + a \pa{\frac{x_1^2}{z_1}-\frac{x_0^2}{z_0}}&
% \text{if $x_0 ≠ x_1$;}\\
% x_0 \abs{y_0 - y_1} &\text{if $x_0 = x_1$.}\end{cases}
% \]
% \end{prop}
% \begin{proof}
% The segment is parametrized as $p(t) = (1-t) p_0 + p_1
% = (t (x_1-x_0) + x_0, t (y_1 - y_0) + y_0).
% = (a t + b, c t + d)$
% with $a = (x_1-x_0)$, $b = x_0$, $c = (y_1 - y_0)$, $d = y_0$.
% In complex notation, one finds
% $F(p(t)) = (a t + b) \exp(i \frac{ct+d}{at+b})$ and hence
% \begin{eqsplit} F(p(t))'
% &= a e^{i…} + (a t + b) i \frac{bc-ad}{(at+b)^2} e^{i…} \\
% &= \pa{a + i \frac{bc - ad}{at + b}} \exp\pa{i \frac{ct+d}{at+b}};\\
% \abs{F'(p(t))}
% &= √{a^2 + \frac{(ad-bc)^2}{(at+b)^2}}.
% \end{eqsplit}
% The arc length is therefore
% \begin{eqsplit}
% &= ∫_0^1 \abs{F'(p(t))} dt
% &= ∫_0^1 √{a^2 + \frac{(ad-bc)^2}{(at+b)^2}} dt\\
% &= ∫_0^1 √{a^2(at+b)^2 + (ad-bc)^2} \;\frac{dt}{at+b} \\
% % &= a ∫_0^1 √{(at+b)^2 + (d-bc/a)^2} \;\frac{dt}{at+b} \\
% \end{eqsplit}
% Define $s = (at+b)/(D+√{a^2(at+b)^2+D^2})$,
% so that $t = -b/a+2sD/(a^2(1-s^2))$,
% $√{(at+b)^2+D^2/a^2} = D\frac{1+s^2}{1-s^2}$,
% and $dt = 2D/a^2 \frac{1+s^2}{(1-s^2)^2} ds$.
% Then
% \begin{eqsplit}
% G(t) = ∫ \abs{F'(p(t))} dt
% &= \frac{D}{a} ∫ \pa{\frac{1+s^2}{1-s^2}}^2 \frac{ds}{s}\\
% &= \frac{D}{a} ∫ \pa{\frac 1s +\frac{1}{(s-1)^2} - \frac{1}{(s+1)^2}} ds\\
% &= \frac{D}{a} \pa{\log s + \frac{2}{1-s^2}}\\
% &= \frac{D}{a} \pa{\log \frac{at+b}{D+√{a^2(at+b)^2+D^2}}
% + 2 \frac{(D+√{a^2(at+b)^2+D^2})^2}{(D+√{a^2(at+b)^2+D^2})^2-(at+b)^2}}\\
% &= \frac{D}{a} \pa{\log \frac{at+b}{D+√{…}}
% + 2 + \frac{a^2}{D}\frac{(at+b)^2}{D+√{…}}}\\
% &= \frac{D}{a} \log \frac{at+b}{D+√{a^2(at+b)^2+D^2}} + \frac{2D}{a}
% + a \frac{(at+b)^2}{D+√{a^2(at+b)^2+D^2}}
% \end{eqsplit}
% The primitive~$G-2D/a$ takes the following values:
% \begin{eqsplit}
% G(0)
% &= \frac{D}{a} \log \frac{x_0}{D+√{a^2 x_0^2 + D^2}}
% + \frac{a x_0^2}{D+√{a^2 x_0^2+D^2}}\\
% G(1)
% &= \frac{D}{a} \log \frac{x_1}{D+√{a^2 x_1^2+D^2}}
% + \frac{a x_1^2}{D+√{a^2 x_1^2+D^2}}\\
% \end{eqsplit}
% This concludes the case where~$a ≠ 0$. The other case is trivial.
% \end{proof}
% % »»1
% \section{Arc length of wrapped segment (correct)}%««1
% Let~$F(x,y,z) = ((x+r) \cos(y/r), (x+r) \sin(y/r), z)$.
% \begin{prop}
% Let~$S = (p_0, p_1)$ be a line segment, with $p_i = (x_i, y_i, z_i)$.
% Define~$a = x_0 - x_1$ and~$c = z_0 - z_1$,
% and $λ_i = √{b^2 x_i^2/r^2 + a^2 + c^2}$.
% If $a ≠ 0$ and $b ≠ 0$ then the arc length of the image curve~$F(S)$ is
% \[
% \frac{1}{2a}(λ_1 x_1 - λ_0 x_0)
% + \frac{a^2 b^2+c^2 r^2}{2a b r} \log \frac{b x_1 + r λ_1}{b x_0 + r λ_0}.
% \]
% If $a = 0$ or~$b = 0$ then this arc length is $√{a^2 + b^2 x_0^2/r^2 + c^2}$.
% \end{prop}
% The segment is parametrized as
% $p(t) = (1-t) p_0 + p_1
% = (t(x_1-x_0) + x_0, t (y_1 - y_0) + y_0, t (z_1 - z_0) + z_0)
% = (a t + x_0, b t + y_0, c t + z_0)$.
% \begin{eqsplit}
% F(p(t))
% &= ((a t+x_0+r) \cos \frac{b t+y_0}{r}, (at+x_0+r)\sin\frac{bt+y_0}{r},
% ct+z_0) \\
% F(p(t))'
% &= (a \cos φ(t) - x(t)b/r \sin φ(t) , a \sin φ(t) + x(t)b/r \cos φ(t), c) \\
% \norm{F(p(t))'}
% &= √{a^2 + (at+x_0)^2 b^2/r^2 + c^2}
% \end{eqsplit}
% Using $∫ √{(α t+β)^2+γ^2} d t = \frac{α t+β}{2 α} √{…}
% + \frac{γ^2}{2 α} \log(α t+β+√{…})$
% with $α = ab/r$, $β=x_0 b/r$, $γ^2 = a^2+c^2$:
% \begin{eqsplit}
% ∫ \norm{F(p(t))'} dt
% &= \frac{(b/r)(a t+x_0)}{2ab/r} √{…}
% + \frac{a^2 b^2/r^2+c^2}{2ab/r} \log((b/r)(at+x_0)+√{(at+b)^2+a^2+c^2})\\
% &= \frac{x(t)}{2a} √{b^2 x(t)^2/r^2+a^2+c^2}
% + \frac{a^2 b^2+c^2 r^2}{2a b r} \log(b x(t)/r+√{b^2 x(t)^2/r^2+a^2+c^2})\\
% \end{eqsplit}
% % Define $q = √{a^2+e^2}$ and~$s = (at+b)/(q+√{q^2+(at+b)^2})$; then
% % $t = -b/a+2sq/a(1-s^2)$, $√{q^2+(at+b)^2} = q(1+s^2)/(1-s^2)$,
% % and $dt = 2q/a (1+s^2)/(1-s^2)^2$.
% % Thus the arc length~$L$ is
% % \begin{eqsplit}
% % ∫_0^1 |F(p(t))'|\;dt
% % &= ∫_0^1 √{q^2+(at+b)^2}\; dt \\
% % &= \frac{2 q^2}{a} ∫ \frac{(1+s^2)^2}{(1-s^2)^3}\;ds \\
% % &= \frac{2 q^2}{a} ∫
% % \pa{\frac{1/4}{s+1}-\frac{1/4}{s-1}+\frac{s^4+6s^2+1}{2(1-s^2)^3}}\; ds\\
% % &= \frac{2 q^2}{a} \pa{ \frac 14 \log \frac{s+1}{s-1}
% % + \frac 12 \frac{s(s^2+1)}{(1-s^2)^2}}\\
% % &= \frac{2 q^2}{a} \pa{\frac 14 \log \frac{q+b+u}{q-b+u}
% % + \frac 12
% % \end{eqsplit}
%
% % »»1
\section{Sagitta of wrapped segment}%««1
Let~$F(x,y,z) = ((x+r) \cos(y/r), (x+r) \sin(y/r))$.
\begin{prop}
Let~$S = (p_0, p_1)$ be a line segment, with $p_i = (x_i, y_i)$.
% Define~$a = x_0 - x_1$ and~$c = z_0 - z_1$,
% and $λ_i = √{b^2 x_i^2/r^2 + a^2 + c^2}$.
The \emph{sagitta} of~$F(S)$ is the Minkowski distance
between the image curve $F(S)$ and the straight segment $(F(p_0),F(p_1))$.
\end{prop}
Distance in polar coordinates $(r e^{iθ})$:
\begin{eqsplit}
\norm{r_0 e^{iθ_0} - r_1 e^{iθ_1}}^2
&= \norm{r_0 e^{iθ_0}}^2 + \norm{r_1 e^{i θ_1}}^2
- 2 (r_0 e^{iθ_0})⋅(r_1 e^{i θ_1}) \\
&= r_0^2 + r_1^2 - 2 r_0 r_1 \cos(θ_0 - θ_1).
\end{eqsplit}
Let~$Σ = (F(p_0), F(p_1))$,
then $ℓ(Σ)^2 = (x_0+r)^2 + (x_1+r)^2 - 2 (x_0+r)(x_1+r) \cos((y_0-y_1)/r)$.
The segment $(p_0, p_1)$ is parametrized as
$p(t) = (1-t) p_0 + p_1
= (t(x_1-x_0) + x_0, t (y_1 - y_0) + y_0)
= (a t + x_0, b t + y_0)$,
so that
$F(p(t)) = (ξ(t), η(t)) = ((r+x(t)) \cos(y(t)/r), (r+x(t)) \sin(y(t)/r))$.
The squared distance of a point $F(p(t))$ to the
segment~$Σ=(F(p_0),F(p_1))$
is
\begin{eqsplit}
δ(t)^2
&= \frac{1}{\norm{Σ}^2} \chev{F(p(t))-F(p_0),F(p_1)-F(p_0)}^2\\
&= \frac{(x(t)-x_0)(y_1 -y_0) - (y(t) - y_0)(x_1 - x_0)}{\norm{Σ}^2}\\
\end{eqsplit}
\end{document}
% vim: fdm=marker fmr=««,»»: