Bump Galaxy

A model of a galaxy that has the form of an upside-down parabaloid raised above zero, and cutoff at some value. The general form of the function about a center (xo,yo) is

g(x,y) = -1.0*((x-xo)^2+(y-yo)^2)+c

A threshold cutoff is then applied, and the final function is:

f(x,y) = g(x,y) if g(x,y) >= cutoff
f(x,y) = 0.0 otherwise

To rasterize, f(x,y) is sampled once at each pixel.

A set of random transformations are applied to the function. These are:
mag = .2+getRand()*2.0
theta = pi*getRand()
inclination = (pi/2.3385)*getRand()
First a non-uniform scaling of inclination is applied, then the model is rotated in the plane by theta, and finally every value is multiplied by mag. The random values are reselected every time drawGal() is called unless "SelectGal 0" has been specified as a parameter, in which case the calling function must call select() when it wants to choose new random values.

Parameters
NameDescription
Cutoff Value of the cutoff parameter in the above equation.
SelectGal If 0, do not automatically change random parameters before drawing.