Game Development Reference
In-Depth Information
FIGURE 11.14
By setting the variables a , b , and c , such that a
c
b ,
any triangular distribution can be created quickly and easily.
If c
x
b then:
By programming the formulas and their constraints, we can yield quick prob-
ability distributions for all x between a and b . For example, by using the relatively
arbitrary numbers 6 and 53 for a and b, respectively, and 41 for c , we get the prob-
ability distribution shown in Figure 11.15.
FIGURE 11.15 The triangular probability distribution generated by
a = 6, b = 53 and c = 41. Note that because the curve crosses
the axis at a and b , the value at these points is 0%.
Search WWH ::




Custom Search