Generate random points on a surface of the cylinder
<p>I want to generate random points on the surface of cylinder such that distance between the points fall in a range of 230  and 250. I used the following code to generate random points on surface of cylinder:</p>

<pre><code>import random,math
H=300
R=20
s=random.random()
#theta = random.random()*2*math.pi
for i in range(0,300):
    theta = random.random()*2*math.pi
    z = random.random()*H
    r=math.sqrt(s)*R
    x=r*math.cos(theta)
    y=r*math.sin(theta)
    z=z
    print 'C'  , x,y,z
</code></pre>

<p>How can I generate random points  such that they fall with in the range(on the surfaceof cylinder)?</p>
