is there any expert in geometry?

I need the formula for calculating the distance between a point and a straight line . I know:

point :Xp, Yp, Zp.

straight line passing between 2 points : X1,Y1,Z1----X2,Y2,Z2

want to know:

distance: X,Y,Z value along the normal between straight line and given point.

Thanx a lot.

Use the distance formula for the points you want to use. For 2-D points, use the x,y one. For 3-D points, use the x,y,z one. Just get a geometry or algebra book and look up the formulas.

And those equations are:

ax1 + by1 + c
ax1 + by1 + cz1 + d
sqrt(aa + bb + c*c)