Important: I'm now convinced that 4 points are needes in order to reduce the solutions to a finite number. (Which is necessary because I need ALL solutions)
In a computer science context I need to solve a geometrical problem which states:
Given three points in three-dimensional space, find a line $L$ (in any form, e.g. specify two points which lie on the line) so that the distance between each of the points and $L$ are equal to a given distance $d$, if possible.
By distance between a point $P$ and a line $L$, the euclidean distance between $P$ and the foot of the perpendicular on $L$ that passes through $P$ is meant.
In two dimensions (given two points) this is rather simple as it involves only a few trigonometric functions, altough I really struggle with it in three dimensions. The reason surely is that I'm not from a math background and don't know too much about linear algebra (which I believe is involved here).
It would be ideal if there is a solution for $N$ dimensions (I think that $N$ Points are needed then), altough I would be very happy if someone could give at least some hints about the three dimensional problem (maybe some sort of heuristic that i didn't thought of could also work). :)
The distance between the points and the line is a given constant. Example: Given three Points and a distance $d=3$, I want to find the line which has a distance of $d$ (in this case $3$) to every given point, if possible (of course there are many cases where such a line does not exist). And I am aware of the fact that this line is not unique (several, or in case of colinearity of the three points, infinitely many lines exist)
EDIT: Clarification II
It seems that my wording causes much confusion about exactly WHAT properties the line should have. A picture showing the two-dimensional case follows:
In this case the Points $P_1$ and $P_2$ are given and the task was to find the line $g$ such that every given Point has the same shortest distance $r_B$ (which is preset) to $g$. (In this context the line was specified by a point $C$ and the angle $\alpha$, altough I'm happy with any kind of parameterization).
Now I have given 3 three-dimensional points and want to find a line with the described properties and I do not have any idea how to do this.
I should also have mentioned that I should be able to find all solutions (I am 99% convinced that there is only a finite number of solutions for ordinary cases)