Quev Height Function

Written by Miguel Angel

Background

It is well known the bell like shape the function . Because of this natural looking shape I thought it could be used in the generator. I wasn’t sure how, but I knew I could.

Adjustment

First, to make it tridimensional I changed the function from \( f: R \rightarrow R \) with to with .This produced a bell like figure centered at .

It was easy to modify it and make it centered at an arbitrary point and also make it’s height adjustable as the original function only had height of . So, with a center at and a height of , the function was

The parameter was a way to scale the function in the axis, so I added a way to scale it in the axis, called . The function with added as is:

I also realized I could not just limit myself to an exponent of 2, or a base of , I called them just the and parameters. So, then, if we call the exponent and the base , the function is .

Final form

This function represents a “height center” in the terrain. Thus, each center can be considered as a tuple where is the position of the center, is the height, is the base, is the exponent and is the zoom.

This tuple is made explicit in the code in the form of the structure.

With this, given a set of height centers , we have a height function given by:

Categories:

Updated: