# finding a point in a cylinder

I am trying to build a basic color approximation model for a website. I think the HSL would be the most efficient model to use. I remember from school the formulae for a cylinder is $$\pi r^2 h$$

height = L, S = radius and I am given an angle for H. Given an HSL value, how do I convert it to X, Y, Z coordinates?

-
$\pi r^2h$ is the formula for the volume of a cylinder and has nothing to do with the calculation you're after. – jwodder Feb 22 '12 at 1:54
do you know what i need then? – marabutt Feb 22 '12 at 1:56

Assuming that the height $L$ is the height above the $xy$-plane, $z$ obviously equals $L$.
By basic trigonometry, a point in the $xy$-plane a distance $r$ from the origin and at an angle of $\theta$ from the $x$-axis is located at $(r\cos\theta, r\sin\theta)$, and this formula is preserved when the plane is translated upward/downward.
Thus (using $H$ to represent the angle itself):
$$\begin{eqnarray*} x & = & S\cos H \\ y & = & S\sin H \\ z & = & L \end{eqnarray*}$$