Skip to content

Add Gauss random function #2931

@zachman42

Description

@zachman42

The Problem

Currently it is not simple to create using a gauss/normal distribution. It is one of the most commonly found naturally occurring distributions.

A Solution

create a gauss() function. It should take mean and standard deviation parameters.

Alternatives

It is possible to manually implement the distribution into an expression. If you add 12 random() outputs together and then subtract that from 6, the result will be a close approximation to a gauss distribution.

For example, generating a patch of path blocks that decay radially using this implementation:
//g dirt_path a=0; for(b=0;b<12;b++){a+=random();} (6-a)^2>(x*2)^2+(z*2)^2

But it would be much simpler and faster to be able to write //g dirt_path gauss(0,1)>(x*2)^2+(z*2)^2

Anything Else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions