# Math Help - Using only a point and slope

1. ## Using only a point and slope

Given that I know the value of a single point (x1,y1) on a line and its splope m, what formula(s) can I use to determine the two other points that are exactly d units from the known points.
This is for use in a server side web application, written in php.
At 60 yrs old, I have forgotten all that I thought I knew about doing this
That includes trying to solve for two variables in a set of equations, which I suspect this will need

TIA,

2. point slope formula:
$(y-y_1) = m(x-x_1)$

you can derive this from definition of a slope by dividing both sides by $(x-x_1)$

if you know distance d, then use the distance formula: $d = \sqrt{(x_1 -x_2)^2 + (y_1 - y_2)^2}$
substitute your known points for $(x_1, y_1)$
then solve the equation for $(x_2,y_2)$

It is easier if you know trig. $d_x = d * \cos \theta \mbox{ where } d_x \mbox{ is the x component of the distance}$

$\theta = \tan^{-1}(\mbox{slope})$

solve for $d_x$

$x_2 = x_1 + d_x$
or
$x_2 = x_1 - d_x$

3. I will have to 'absorb' what you posted a bit!

Like I said, solving equations with two variables (x2 and y2) is not my strong point, and more importantly, I will have to do this programatically, not on paper.

Let me ponder

4. Using the trig approach seems a bit easier but .....

Dx = (cos(arctan(slope))/d

so x2 = x1 + Dx

then do I just stick in x2 into (y2-y1)=slope(x2-x1) and solve for y2 ?

Is it just that easy!!!

5. Relative to my previous message, what is the trig for solving for dy first?

6. ## Problem reworded.

Still having some difficulty, so perhaps a better explanation of what I am doing is in order.

I am plotting co-ordinates for an airfoil cross section (to make ribs) from a database of many airfoils. These points are 'scaled' to be exactly 1 unit from Leading Edge to Trailing Edge, and I am plotting them by drawing into a blank .png file (jpg or tiff would also work). In order to get them sized to a usable size, I am scaling them up by multiplying by the desired number of inches for the chord (LE to TE) and by the number of pixels per inch on output. As a result, the graph is made up of many short straight lines. This is all working fine for me so far.

But many of these wings are covered (or partly covered) by a 1/16 inch or 3/32 inch sheeting, which requires that the rib is plotted that much smaller and inside the original.

My intent was to match each line segment with a parallel one that is exactly 1/16 or 3/32 inch 'inside' the original. So, that is why I started with the slope of the original line, slope of a perpendicular line, and one of the original end (or start) points. From there I should be able to calculated the inside point along the perpendicular slope at the desired distance (1/16 or 3/32 inch).

If all of this still makes sense to anyone , could you help me. My first attempts at doing this were good for the line segments that had a reasonable vertical dy value, but would colapse elswhere.