The equation of a line is Y = M.X + C,
I have a point and the points facing angle, So I can work out the line equation
Slop := Tan(Rot) // We are passing radians to convert to gradient
C := (-Slop*X) + Y // Substitute our point XY values
So that's the current math I am using to get our Y intercept and our slop or gradient.
However I am wanting to know how to plot a point X amount of distance in front of our starting point.
Currently, I am attempting the following where Y2 and X2 are values of our original point plus 100 units.
NewPoint.X := Round( (Y2 - C) / Slop );
NewPoint.Y := Round((slop*X2) + C);
Here a paste bin of the full function :
Thanks.