Jump to content

Constrained random points on a circle: Difference between revisions

m
no edit summary
(Attempted a clearer task description)
mNo edit summary
Line 5:
 
1) Generate random pairs of integers and filter out those that don't satisfy this condition:
:<math>10 \leq \sqrt{ x^2 + y^2 } \leq 15 </math>.
 
:<math>10 \leq \sqrt{ x^2 + y^2 } \leq 15 </math>.
 
2) Precalculate the set of all possible points (there are 404 of them) and select randomly from this set.
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.