I have two points. I want to find a position that lays directly between those two points. So that if a line were drawn, this position would be exactly on this line.
For example, if I have the points (0,0) and (3,3), then (0,0), (1,1), (2.5, 2.5), (2.987, 2.987), (3,3), etc. would be valid points.
This seems like a simple concept, and I have searched, but I cannot seem to figure it out or find the answer.
How can I find a random point on a line?
Briefly: generate a uniform random number $u$ between $0$ and $1$, and then evaluate $(1-u)p_1+up_2$, where $p_1$ and $p_2$ are your line segment's endpoints. The special case $u=1/2$ will of course generate the midpoint.