Skip to content

Commit b03f75c

Browse files
committed
minor edit
1 parent 55012e0 commit b03f75c

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

docs/Proportional-Interval-Stamp/Proportional-Interval-Stamp.mdx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ Meanwhile, the interval is always proportional to the radius.
122122

123123
You might be confused by the statement "always proportional to the radius."
124124
Though it's intuitively correct as the animation below shows.
125-
I'll soon explain it with precise mathematical formulas, so don't worry about it too much for now.
125+
I'll soon explain it mathematically, so don't worry about it too much for now.
126126

127127
![interval animation](./interval-ratio-animation.gif)
128128
<figcaption>
@@ -193,7 +193,7 @@ $$
193193
\tag{1} n(x) = -\frac{1}{\eta \cos\theta} \ln(r_0 - \cos\theta x) \bigg|_0^x = -\frac{1}{\eta \cos\theta} \ln (1 - \frac{\cos\theta x}{r_0})
194194
$$
195195

196-
Exchange the dependent and independent variable in formula (1) and get:
196+
Exchange the dependent and independent variable in equation (1) and get:
197197

198198
$$
199199
\tag{2} x(n) = \frac{r_0}{\cos\theta}(1 - e^{-\eta\cos\theta n})
@@ -205,7 +205,7 @@ $$
205205
\tag{3} n_L = \frac{L}{\eta (r_0-r_1)}\ln \frac{r_0}{r_1}
206206
$$
207207

208-
We will soon use the formula (1)(2)(3) in our code.
208+
We will soon use the equation (1)(2)(3) in our code.
209209

210210
How do we place footprints?
211211
Imagine a point starts from the first vertex and moves along the polyline.
@@ -220,7 +220,7 @@ Label the two roots with $x_1$ and $x_2$.
220220

221221
To calculate the nearest stamp point (the black dot in the figure) between $x_1$ and $x_2$,
222222
we need to compute the number of stamps from $x_1$ to the polyline's first vertex, which is also called stamp index (or stamp count) at $x_1$.
223-
According to formula (1), on the current edge, the number of stamps from vertex0 to $x_1$ is $n(x_1)$.
223+
According to equation (1), on the current edge, the number of stamps from vertex0 to $x_1$ is $n(x_1)$.
224224
Label the stamp index of vertex0 as $n_{s_0}$, and label vertex1's as $n_{s_1}$.
225225
(The symbol $s$ represents the arc from the first to current vertex).
226226

@@ -230,10 +230,10 @@ Therefore, the stamp index of $x_1$ is $n_{s_0} + n(x_1)$.
230230
Because we place footprints at the points with integer stamp index,
231231
the ceiling of $n_{s_0} + n(x_1)$ is the nearest stamp's index,
232232
denoted as $n_\mathrm{nearest} = \lceil n_{s_0} + n(x_1) \rceil$.
233-
Replace it into the formula (2) to get its position $x_{\mathrm{nearest}} = x(\lceil n_{s_0} + n(x_1) \rceil)$,
233+
Replace it into the equation (2) to get its position $x_{\mathrm{nearest}} = x(\lceil n_{s_0} + n(x_1) \rceil)$,
234234
and all other positions $x(n_\mathrm{nearest} + 1)$, $x(n_\mathrm{nearest} + 2) \dots$
235235

236-
Additionally, to determine $n_{s_0}$ and $n_{s_1}$, we can compute the prefix sum of the $n_L$ in formula (3) over all edges.
236+
Additionally, to determine $n_{s_0}$ and $n_{s_1}$, we can compute the prefix sum of the $n_L$ in equation (3) over all edges.
237237
Put them into vertex data and pass them into fragment shader, exactly same as the value `length` in the Stamp section.
238238

239239
## Implementation
@@ -245,7 +245,7 @@ import Stroke from "./ProportionalStampStroke";
245245

246246
**Zero division:**
247247
It's common for a stroke to have zero radii at their starting or ending vertices.
248-
When either $r_0$ or $r_1$ is zero, the value in formula (3) can approach infinity.
248+
When either $r_0$ or $r_1$ is zero, the value in equation (3) can approach infinity.
249249
This will bring numeric errors, which we surely want to avoid.
250250
A simple solution is to add a small number to the radii, as demoed in the code above.
251251
For a more rigorous approach, you can implement checks to prevent $r_0/r_1$ in the logarithm from becoming zero or excessively large.
@@ -277,7 +277,7 @@ $$
277277
$$
278278

279279
**Proof:**
280-
Substitute formula (3) into $r(x) = r_0 - \cos\theta x$ to obtain $r(n) = r_0e^{-\eta\cos\theta n}$.
280+
Substitute equation (3) into $r(x) = r_0 - \cos\theta x$ to obtain $r(n) = r_0e^{-\eta\cos\theta n}$.
281281
The remainder of proof is straightforward.
282282

283283
Note that these ratios are independent of $n$ or $x$,
@@ -320,7 +320,7 @@ This suggests that at any point in a given edge, the number of stamps that can c
320320
If we connect the points with the same $\lambda$, they form an isocolor line.
321321

322322
**Proof:**
323-
With the formula (1), we can derive:
323+
With the equation (1), we can derive:
324324

325325
$$
326326
n(x_2) - n(x_1) = \frac{1}{\eta \cos\theta}\ln \frac{r(x_1)}{r(x_2)}
@@ -376,5 +376,5 @@ If you are interested in more details about the solving process, check the drop-
376376

377377
You verify the result after substituting $a, b, c$.
378378
Note that when $\lambda = 0$ or $\lambda = 1$, the $\triangle PQX_{1}$ and $\triangle PQX_{2}$ don't exist,
379-
but the formula still works.
379+
but the equations still works.
380380
</details>

0 commit comments

Comments
 (0)