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