# How to calculate set of equation of all the line in 3d, when a point on the line and angle between the line to find and a given line is provided?

I have two line in 3d space with their intersection point, and angle between the two lines, how to find the equation of the set of unknown line.

Let the intersection point be $(x_1,y_1,z_1)$ and angle between them is $\theta$. and the given line be $r = (x_1,y_1,z_1) + k(a_1,b_1,c_1)$, where $a_1,b_1,c_1$ are direction ratios of the given line.

We can think of it as actually the set of unknown lines defines a conical surface where the known line is the axis of the cone and intersection point is the tip (vertex) of the cone.

• Welcome to MSE. It will be more likely that you will get an answer if you show us that you made an effort. – José Carlos Santos Feb 16 '18 at 7:33
• I am basically a programmer, and I found the problem while solving a physical phenomenon. – Shaleen Jain Feb 16 '18 at 7:35
• There are infinite lines which have an angle of $\theta$ with the first line and an intersection point of $p_0$. You need 3 constraints to determine a unique solution for your problem. Here you mentioned 2. – Mehrdad Zandigohar Feb 16 '18 at 7:50
• I want to know actually the set of all such lines. – Shaleen Jain Feb 16 '18 at 8:25

Refer to the Wiki page on conical surface

Suppose the main axis of the cone is described by the unit vector $\textbf{d} = (a_1,b_1,c_1)$, then an implicit formula for the surface is given by

$$(\textbf{d}\cdot\textbf{r})^2 - (\textbf{d}\cdot\textbf{d})(\textbf{r}\cdot\textbf{r})\cos^2\theta = 0$$

where $\textbf{r} = (x-x_1,y-y_1,z-z_1)$ is the coordinate vector from the apex

The same formula in $x,y,z$ is $$\big[a_1(x-x_1) + b_1(y-y_1) + c_1(z-z_1)\big]^2 \\ - \cos^2\theta({a_1}^2+{b_1}^2+{c_1}^2)\big[(x-x_1)^2+(y-y_1)^2+(z-z_1)^2\big] = 0$$

• Thank you so much @Dylan, I suppose this solves my problem. – Shaleen Jain Feb 18 '18 at 8:55
• the cartesian equation given above does it have any constraint like apex on origin or axis along the z-axis ? – Shaleen Jain Feb 19 '18 at 10:03
• Even if you only have the "standard" equation, all it takes is shifting it to the new apex, and do a rotation. Both of these are included in the formula. – Dylan Feb 21 '18 at 6:31
• Both formulas are the same, I only substituted in the vector cooridnates for clarity. – Dylan Feb 21 '18 at 6:34