In celebration of Pi Day 2022, enjoy the following project in which you can create your own sine graph wave! Change the values for period, amplitude, and axis, and then press space or click the screen to see how it affects the sine wave shown.
Some background information: Sine, Cosine, and Tangent, are trigonometric ratios that relate the angles in a triangle to the side lengths. Graphing f(x) = sin(x) results in an interesting wave-like pattern that can represent a wide variety of real life situations, such as: the movement of a pendulum, the oscillation of a spring, the hours of daylight in a year, the properties of a sound wave, and more. It can also represent a point moving around a circle, as shown Calculating the sine of the angles formed within a circle with a radius of 1 gives a sine wave with a period of 2π radians and an amplitude of 1. Altering the values of period, amplitude, and axis, correspond to the following changes on the sine wave: Period: The period is the amount of time it takes to complete one cycle, so the larger the period, the more "stretched out" the graph. In this project, the period is represented in multiples of 2π, so setting the period to 1 actually sets it to 2π, setting it to 2 sets it to 4π and so on. Axis: The axis the the "equilibrium" point for the graph. By default, this is y=0, but by changing it, you can move the graph up and down. Amplitude: The amplitude is the distance that the wave reaches from equilibrium. A smaller amplitude will make the graph shorter and a larger amplitude will make it taller. If you're interested in learning more about sine and cosine waves, I would recommend the following video, as it explains what they are and how they can come from circles. https://www.khanacademy.org/science/electrical-engineering/ee-circuit-analysis-topic/ee-ac-analysis/v/ee-sine-cosine-circles Happy Pi Day Everyone!