Hi,

I am new to this forum, so if anything goes worng plz try to ignore it.

I am a student, my teacher has given me an assingment. Please help me out in solving this plz.

A line in 3D runs through 2 points ( ax,ay,az) and ( bx,by,bz)
has an equation
t = (x - ax)/(bx-ax) = (y - ay)/(by-ay) = (z - az)/(bz-az)

To see if the line passes through a point set y = 0 to get t, then
calculate the new x and z to see if they are in the way.

- Pick a hit point ax,0,az and a first origin point bx,by,bz
where -100«=ax«=100 0«=az«=200
- get t using the equations above.
- select new y point ( or z or x) for the second detect point and
calculate a new t'
- use equations above to calculate new other two coordinates.
z = t'(bz-az) + az similar for x or y.



this was it.

I would like to know how can i calculate T and using that T how can i make sure that the straight line will pass through a given certain point.

Also how to take out slope of this straight line.