How to find a random point in a quadrangle?
Posted
by Gregg Cleland
on Stack Overflow
See other posts from Stack Overflow
or by Gregg Cleland
Published on 2010-06-17T00:34:09Z
Indexed on
2010/06/17
0:42 UTC
Read the original article
Hit count: 254
Hi!
I have to be able to set a random location for a waypoint for a flight sim. The maths challenge is straightforward:
"To find a single random location within a quadrangle, where there's an equal chance of the point being at any location."
Visually like this: http://screencast.com/t/NTUxMzJhZGQ
An example ABCD quadrangle is: A:[21417.78 37105.97] B:[38197.32 24009.74] C:[1364.19 2455.54] D:[1227.77 37378.81]
Thanks in advance for any help you can provide. :-)
© Stack Overflow or respective owner