2d_graphics
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
2d_graphics [2012/08/02 23:13] – javapimp | 2d_graphics [2023/08/18 18:15] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 31: | Line 31: | ||
Intersection: | Intersection: | ||
- | |< | + | a``graph width=320; height=220; xmin=-8.3; xmax=8.3; ymin=-3.3; ymax=8.3; xscl=1; yscl=1; plot(1/2*x + 2); enda``graph |
- | <embed class=" | + | < |
- | </ | + | <embed class=" |
+ | </ | ||
We can find the slope of the second line by taking the negative reciprocal of the slop of the first: | We can find the slope of the second line by taking the negative reciprocal of the slop of the first: | ||
Line 50: | Line 51: | ||
`y = -2x + 7` | `y = -2x + 7` | ||
- | |< | + | |
- | <embed class=" | + | <embed class=" |
- | </ | + | |
===== Intersection of two lines ===== | ===== Intersection of two lines ===== | ||
Line 67: | Line 68: | ||
amath | amath | ||
- | 1/2 x + 2 = -2x + 7\\ | + | 1/2 x + 2 = -2x + 7 |
+ | |||
+ | Now solve for x: | ||
1/2 x + 2x + 2 = 7\\ | 1/2 x + 2x + 2 = 7\\ | ||
5/2 x + 2 = 7\\ | 5/2 x + 2 = 7\\ | ||
Line 85: | Line 89: | ||
The point of intersection of the two lines is `(2, 3)` | The point of intersection of the two lines is `(2, 3)` | ||
+ | |||
+ | ===== Find point on a line ===== | ||
+ | Given a point on a line `(x, y)` a slope `m` and a distance `d` along the line from the given point, what is the `(x_1, y_1)` of the new point? | ||
+ | |||
+ | `c = cos(theta) = 1/sqrt(1 + m^2)`\\ | ||
+ | `s = sin(theta) = m/sqrt(1 + m^2)`\\ | ||
+ | `x_1 = x + d * c`\\ | ||
+ | `y_1 = y + d * s` | ||
===== Pythagorean theorem ===== | ===== Pythagorean theorem ===== |
2d_graphics.1343949200.txt.gz · Last modified: 2023/08/18 18:15 (external edit)