Jump to content

Constrained random points on a circle: Difference between revisions

Line 13:
The general scheme is :
 
**1. All points satisfying the inequality are enumerated.
**2. 100 points are chosen at random from this set and plotted.
**3. To ensure that the same point is not picked twice and hence speed up the plotting, the chosen point is swapped with the last point after plotting. The new point is then chosen from the new set minus the last element. The position of this last element moves towards the head as the loop progresses.
 
<lang C>
Line 95:
Output will differ from system to system. A better rendering would be to use graphics libraries like OpenGL or Turbo BGI.
 
<Outputpre>
 
 
Line 127:
* **
* **
</Outputpre>
 
=={{header|D}}==
503

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.