[R-sig-Geo] Randomly moving a locality (within set limits)

Barry Rowlingson b.rowlingson at lancaster.ac.uk
Mon Aug 25 10:48:09 CEST 2014


> Now choose
>
> bearing <- runif(1, 0, 360)
>
> and
>
> distance <- runif(1, 0, 15)
>
> Please check the formulas against the homepage above.

 Note: choosing a random bearing U(0,360) and a random U(0,N) distance
 DOESNT generate a uniform distribution over the disk of radius N!
You get more points near the centre!

 Barry



More information about the R-sig-Geo mailing list