▲ | aaronblohowiak a day ago | ||||||||||||||||
no, this person is not suggesting a parallelogram but rather performing an affine transformation on the triangle to make it a right triangle so they can pick a random point in a square instead. as another commenter mentioned, I believe this distorts the distribution and won't do the right thing. | |||||||||||||||||
▲ | creata a day ago | parent | next [-] | ||||||||||||||||
https://en.wikipedia.org/wiki/Probability_density_function#V... Affine transformations just scale the probability density by a constant, so a uniform distribution is still uniform. | |||||||||||||||||
| |||||||||||||||||
▲ | o11c a day ago | parent | prev [-] | ||||||||||||||||
There's no distortion for the purposes of randomness (there would be if you cared about distance between specific points before/after the transformation), but the blog article fails to actually explain the method. Clicking through to SO explains it (but assumes you can read numpy). The `s * u` and `t * v` (where `u` and `v` are vectors) are the transformation from right-triangle (half of square) to triangle (half of parallelgram). | |||||||||||||||||
|