mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-24 05:14:06 -06:00
14 lines
485 B
Markdown
14 lines
485 B
Markdown
# Direct Line Conversion
|
|
|
|
## 1. How does this conversion work?
|
|
----
|
|
1. First get the line equation from the points[[#^a29a1d]]
|
|
2. see if ==m≤1==
|
|
1. for every point of ==x(x is increased by 1 in every step) calculate y==
|
|
3. else
|
|
1. for every point of ==y(y is increased by 1) calculate x==
|
|
|
|
## 2. How to get equation from the points? ^a29a1d
|
|
1. First calculate slope m, using the equation
|
|
$$ m = (y_2-y_1)/(x_2-x_1)$$
|
|
2. Then get b by plug in $x_1$ and $y_1$ in the line equation. |