Vector constrained to an angle and length?

I would like to like to be able to find the point p3 given point p1 and p2. The length between point p1 and p2 is set to L and the length between point p2 and p3 is set to L. The angle between point p1, p2 and p3 is set to theta. I'm pretty sure the dot product will play a roll but I'm not sure how. Any help would be great. Thanks

EDIT p0 should be p1. This is a 3D problem and I know I'm basically looking for points on a circle. I think I need to figure out how to define the circle such that it is perpendicular to the vector p1-p2 but I'm not really sure how to do that. I will be using this to generate polymer chains with constrained bond angles.

-
When you use p0 in the diagram, I assume you mean p1. The next difficulty is when you say $p=(x,y,z)$, suggesting three dimensions: in 3-D, there is a whole circle of points at distance $L$ which make an angle $\theta$ at $p_2$ with the line from $p_1$ to $p_2$ – Henry Mar 16 '11 at 16:01
If you mean for these points to be in 3 dimensions, then $p_3$ is not determined uniquely - any rotation it about the axis formed by $p_1$ and $p_2$ would work as well. Also, you have the label "$p_0$" in your picture, not $p_1$. – Zev Chonoles Mar 16 '11 at 16:02

Solve

$$(\vec{p_3}-\vec{p_2})\cdot(\vec{p_2}-\vec{p_0}) = L^2 \cos\theta$$

What you get is an equation of a plane. Your locus is a circle on that plane centered at $\vec{p_2}$ and of radius $L$.

-

I think first you need coordinates, otherwise the question seems to be not well formulated. And it should be $p = (x, y)$ instead of $p = (x, y, z)$, since it is a 2D problem. Lets say in a Cartesian coordinate,

$p_{0} = (x_{0}, y_{0})$(known), $p_{2} = (x_{2}, y_{2})$(known), $p_{3} = (x_{3},y_{3})$(unkown). Then there are two vectors: $\vec{u} = (x_{0} - x_{2}, y_{0} - y_{2})$, $\vec{v} = (x_{3} - x_{2}, y_{3} - y_{2})$. So we have 2 equations: $\vec{u} \cdot \vec{v} =(x_{0} - x_{2}) \cdot (x_{3} - x_{2}) + (y_{0} - y_{2}) \cdot (y_{3} - y_{2}) = \parallel u \parallel \parallel v \parallel \cos \theta = L^{2} \cos \theta$ $\parallel \vec{v} \parallel ^{2} = (x_{3} - x_{2})^{2} + (y_{3} - y_{2})^{2}$

After solving these two equations, you can find $x_{3}$ and $y_{3}$.

-