Skip to content

Commit a142d08

Browse files
committed
typos
1 parent a9d6deb commit a142d08

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/geometry/enclosing-circle.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,11 @@ $$
9595
\sum\limits_{j=1}^i \frac{2}{j} \cdot O(j) = O(i).
9696
$$
9797
98-
In exactly same fashion we can now also proof that the outermost loop has expected runtime of $O(n)$.
98+
In exactly same fashion we can now also prove that the outermost loop has expected runtime of $O(n)$.
9999
100100
### Checking that a point is in the MEC of 2 or 3 points
101101
102-
Let's now figure the implementation detail of `point` and `mec`. In this problem, it turns out to be particularly useful to use [std::complex](https://codeforces.com/blog/entry/22175) as a class for points:
102+
Let's now figure out the implementation detail of `point` and `mec`. In this problem, it turns out to be particularly useful to use [std::complex](https://codeforces.com/blog/entry/22175) as a class for points:
103103
104104
```cpp
105105
using ftype = int64_t;
@@ -108,7 +108,7 @@ using point = complex<ftype>;
108108

109109
As a reminder, a complex number is a number of type $x+yi$, where $i^2=-1$ and $x, y \in \mathbb R$. In C++, such complex number is represented by a 2-dimensional point $(x, y)$. Complex numbers already implement basic component-wise linear operations (addition, multiplication by a real number), but also their multiplication and division carry certain geometric meaning.
110110

111-
Without going in too much detail, we will notice the most important property for this particular task: Multiplying two complex numbers adds up their polar angles (counted from $Ox$ counter-clockwise), and taking a conjugate (i.e. changing $z=x+yi$ into $\overline{z} = x-yi$) multiplies the polar angle with $-1$. This allows us to formulate some very simple criteria for whether a point $z$ is inside the MEC of $2$ or $3$ specific points.
111+
Without going in too much detail, we will note the most important property for this particular task: Multiplying two complex numbers adds up their polar angles (counted from $Ox$ counter-clockwise), and taking a conjugate (i.e. changing $z=x+yi$ into $\overline{z} = x-yi$) multiplies the polar angle with $-1$. This allows us to formulate some very simple criteria for whether a point $z$ is inside the MEC of $2$ or $3$ specific points.
112112

113113
#### MEC of 2 points
114114

@@ -120,7 +120,7 @@ For $2$ points $a$ and $b$, their MEC is simply the circle centered at $\frac{a+
120120
<i>Inner angles are obtuse, external angles are acute and angles on the circumference are right</i>
121121
</center>
122122

123-
Equivalently, we need to check whether
123+
Equivalently, we need to check that
124124

125125
$$
126126
I_0=(b-z)\overline{(a-z)}
@@ -159,7 +159,7 @@ But which one of them means that $z$ is inside or outside of the circle? As we a
159159
2. $\angle bca > 0^\circ$, $c$ on the opposite side of $ab$ to $z$. Then, $\angle azb > 0^\circ$ and $\angle azb + \angle bca > 180^\circ$ for points inside the circle.
160160
4. $\angle bca < 0^\circ$, $c$ on the opposite side of $ab$ to $z$. Then, $\angle azb < 0^\circ$ and $\angle azb + \angle bca < 180^\circ$ for points inside the circle.
161161

162-
In other words, if $\angle bca$ is positive, points inside the circle will have $\angle azb + \angle bca < 0^\circ$, otherwise they will have $\angle azb + \angle bca > 0^\circ$, assuming that we keep compute the angles between $-180^\circ$ and $180^\circ$. This, in turn, can be checked by the signs of imaginary parts of $I_2=(a-c)\overline{(b-c)}$ and $I_1 = I_0 I_2$.
162+
In other words, if $\angle bca$ is positive, points inside the circle will have $\angle azb + \angle bca < 0^\circ$, otherwise they will have $\angle azb + \angle bca > 0^\circ$, assuming that we normalize the angles between $-180^\circ$ and $180^\circ$. This, in turn, can be checked by the signs of imaginary parts of $I_2=(a-c)\overline{(b-c)}$ and $I_1 = I_0 I_2$.
163163

164164
#### Implementation
165165

0 commit comments

Comments
 (0)