Because I had some hard hours to figure this one out (basically I mixed a lot of degree and radians and messed up several times with tan and sin), here is my solution. It may be a help for someone (or for me later...).

The quest was to find the angle of a line through a point lying on a circle, when this line is parallel to some line passing through another point on the circle.

So let's get this started: Lets say, we got a point P with the coordinates x = cos(\gamma)R and y = sin(\gamma)R, thus they are on the circle with radius R, centered at the origin.

Now, we construct a line through the circles' circumference at y = 0, thus we know it must pass through x = R. The line equation is then given by tan(\alpha)\left(x - R\right) = y.

Now, we construct a parallel line to it (in direction of negative x) with distance h, which is given by the line equation tan(\alpha)\left(x - R + \frac{h}{sin(\alpha)}\right) = y.

To find now the angle, we insert the point into the equation, as we require that the line passes through this point: tan(\alpha)\left(cos(\gamma)\ R - R + \frac{h}{sin(\alpha)}\right) = sin(\gamma)\ R.

I tried to solve this by hand but the formular we get is quite complex (and I found it using wolframalpha, not by hand).

\alpha_{1,2} = 2\left(tan^{-1}\left(\frac{\pm\sqrt{-h^2 + \left(R - cos(\gamma)R\right)^2 + \left(sin(\gamma)R\right)^2} + R - cos(\gamma)R}{h + sin(\gamma)R}\right) + \pi n \right)

with n \in \mathbb{Z}. But as we know, that the angle must be between 0 and 0.5\pi, we can just set n = 0 and remove that part.

You might ask: why do you need something? Here is an example: lampe.scad I tried to arrange the rectangles in such a way, that they are rotated and touch each other. We can calculate now, that the angle (in this specific configuration) is about 57 degree.

Thank's to OpenSCAD, where you learn math the hard way ;)