How, mathematically, can you describe a line in 3-space.
z = mx + c = ny + d ??
Does this work? I need to know for some 3d programming: once I have the equation intersections will be easy...
You need 2 equations (assume the line goes through the origin)...
y=mx and z/(y^2 + x^2)^1/2 =+/-C
(where C is your constant).
Obviously it follows that the distance between any two points in 3D space is given by
(x^2 + y^2 + z^2)^1/2
i don't think parametric equations are particularly useful in 3D graphics, but if it works, go with it.
For a non-parametric equation of a line, it's just mV + R, same as in 2D or any other "D". If two lines intersect, then m₁V₁ + R₁ = m₂V₂ + R₂. That's three equations, two unknowns. If you get a consistent solution, you have your intersection point. If you don't, no intersection.
To represent a line in 3D
consider two planes a1x+b1y+c1z+d1=0
then the intersection these two planes represents a line and its equation is
so, st. line is represented by two equations of first degree in x,y,z.
I hope you understand the notation.
Why don't you do a parametric representation of the curve?:
with i=x,y or z and ai, bi, fixed constants.
I think that is the fastest and clearer way to do that.