1

I'm creating a project in a city environment. I want to distribute the buildings using Gaussian distribution so that the heights of the buildings are distributed around the centre (mean). In the same nature to the image below.

2D Gaussian distribution image

Using the equation on the Gaussian Wikipedia page, I came up with some code but I'm not sure how I'd implement it to achieve what I have mentioned above and whether my code is correct so far.

Current code

ConnectQ
  • 13
  • 7
  • What is your specific technical challenge ? What have you tried and how has it not given you the expected answer ? – PhillipH Dec 27 '16 at 18:38
  • The technical challenge is how to use the 2D to enable me to map the heights. As you can see I outputted them to the console currently. However, I'm not sure if that implementation is correct mathematically and whether this is the correct approach. – ConnectQ Dec 27 '16 at 18:42
  • What is your experience of Unity3D and/or DirectX height map implementations ? The SO site really is best used for solving specific technical questions - its not really a forum for techical guides. I'd recommend gamedev.net for a huge resource of "how to" guides, or perhaps doing some more googling. – PhillipH Dec 27 '16 at 19:10
  • Does [this question](http://stackoverflow.com/questions/218060/random-gaussian-variables) help? – Nico Schertler Dec 28 '16 at 13:07

0 Answers0