1
$\begingroup$

Alright, so I got two points in 3d space, so they have a x,y, and z. Now if the line's y - which I get like so:

Vector3 v = new Vector3(); v = a.subtract(b, v); v.normalizeLocal();  float cosine = (float) v.dot(v); float angle = (float) Math.toDegrees(Math.acos( cosine )); 

Now I have a third point (the c point), which is inside the line of a and b. now I need to know how to get point a and b to 0 and 1, than I need to find out where c is on the line. my goal is to have something like c.y = b.y - (a.y * c.x and c.z's point on the line (which will be between 0 and 1))

So how do I do this?

  • 2
    Your first order of business is to construct a parametric equation $\mathbf h(t)=(a+bt\quad c+dt\quad e+ft)$ such that $\mathbf h(0)$ corresponds to one endpoint, and $\mathbf h(1)$ corresponds to the other endpoint. (Hint: direction cosines).2010-12-07

1 Answers 1