I need to search a line in a 3D space. I have a starting point (coordinates) of the line and the angle at which it is suppose to go (relative to each of the axis).
I need to start from the starting coordinates and search every element (every coordinate contains an element) $1$ by $1$ until I find one that matches the condition.
Imagine a bullet going through air to some target.
Doesn't seem that hard, but I haven't managed to find the solution for this.
In 2D space this would be something like
$$y = x\cos(\mbox{angle}) + \mbox{startPosition}$$
I assume you'll need $2$ formulas for my problem. Any idea how to solve it?