To find the value for x1
, first find the X distance from x0
to x4
and divide by three:
(x4-x0)/3
Add this distance to the value for x0
: x0 + (x4-x0)/3
A similar calculation works for Y (but recall that Y increases downward.)
Here is a line with a triangular bump.
The triangle is equilateral.
To find the (X, Y)
for the peak of the triangle,
first find (xm, ym)
for the middle of the line.
Calculate (xm, ym)
using (x0, y0)
and (x4, y4)
.