Jump to content
Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.
Posted 05 October 2011 - 03:31 AM
Posted 05 October 2011 - 07:33 AM
uniformRand = rand(); outputPoint = A + uniformRand*uniformRand * (B-A);
Posted 05 October 2011 - 08:32 AM
It sounds like you need to generate random numbers on a geometric or exponential distribution. If you're using C++ and your development environment supports the current ISO standard, you can just use std::geometric_distribution or std::exponential_distribution from <random>. If you're not in that situation, you can try to write them yourself, it's not that difficult.
I have two points (A,B) and I want to create a set of random points between the two, such that most points are close to A and the number of points decreases linearly towards B. Does anyone know a simple way to solve this?
Posted 05 October 2011 - 08:51 AM
GameDev.net™, the GameDev.net logo, and GDNet™ are trademarks of GameDev.net, LLC.