Learn to Play

Shoot the target with your mighty cannon - or whatever your weapon happens to be. Write your mathematical function in the input box in the top left corner using either the on-screen buttons or your keyboard.

calculator

Straight lines

Straight lines are fairly easy. They are generally on the form y = ax+b. a is the slope of the line, and b says where the line intersects on the Y-axis. Since functions in WoMI always intersects the Y-axis in 0, you can ignore this. Only the a matters.

The slope a is the ratio between x and y. For each unit the line changes along the X-axis, it also changes along the Y-axis. This is written mathematically as a = Δy/Δx. "Δ", the greek letter "delta", means "difference in" in mathemathics. So this reads "difference in Y divided by difference in X".

a = 1

In the above image, two different Δx-es are used. They both give the same slope a when inserted into the formula. 1/1 and 2/2 both gives a = 1. Let's look at another slope:

a = -1/2

Here we use Δx = 2, and see that Δy = -1. This means a = -1/2, or -0.5 if you prefer decimals. WoMI handles both -1/2*x and -0.5x.

If you for some reason want the slope to be a specific angle, you can use the tan function. In this case, a = tan(angle). Be sure to use the right angle unit (degrees or radians), setable in the options menu. If you for some reason want the angle of a slope, use the atan function. angle = atan(a)

Sine waves

A sine wave is a periodic wave that is closely related to both triangles and circles. They are generally on the format a*sin(p-fx), where a is the amplitude, which is how tall the wave is, p is the phase shift modifier, which defines where on the wave a period should start, and f is the frequency modifier, defining how long each period is.

sin(x)

In WoMI, we focus only on a and f. If we make a=2, the wave would go twice as high, and twice as low.

2sin(x)

The frequency modifier f defines how many periods will fit between x = 0 and x = 2π if you use radians, or x = 0 and x = 360 if you use degrees.

2sin(2x)

a, f and p can also be functions, in which case we get so-called "Amplitude modulation" (AM), "Frequency Modulation" (FM), and "Phase Modulation" (PM), which you may recognize from radios. Below is an example of amplitude modulation:

2sin(2x)

Here, we have a sine wave with a frequency of 20, with the function 1+0.4sin(x) as amplitude.


Unity Wolfram Alpha Powered by a Raspberry Pi