Trigonometry App Using Shiny

JB
January 2018

Trigonometry Application Introduction

  • Show trigonometry basics for high school students
  • Highlight wave amplitude and frequency
  • Demonstrate how wave appearance changes if these parameters are adjusted on the fly
  • Show phase difference between sine and cosine waves
  • Show how mean wave amplitude changes significantly for an integer vs a fractional number of wave cycles

Slide With Sample Plot App Code

    time <- seq(0,1,length.out = 1000) 
    sinewavevalues <- 5*sin(2*pi*time)
    cosinewavevalues <- 5*cos(2*pi*time)
plot(time, sinewavevalues, main="Wave", xlim=c(0,1), ylim=c(-10,10), xlab="Time(s)", ylab="Amplitude", col="red", lwd=3, cex.lab=1.6, cex.axis=1.6, cex.main=1.6, type="l") 
lines(time, cosinewavevalues, xlim=c(0,1), ylim=c(-10,10), col="red", lwd=3, lty = 2)

plot of chunk plot

Screenshot of App

plot of chunk unnamed-chunk-1

App Summary

  • App introduces students to properties of sine and cosine trigonometric functions
  • Increasing frequency increases number of wave cycles that occur per unit time.
  • Increasing amplitude increases the magnitude of the minimum and maximum points of the wave.
  • 90 degree phase difference between a sine and cosine wave.

Links:

Link to Shiny app code