Skip to content

Instantly share code, notes, and snippets.

@alogic0
Created July 10, 2018 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alogic0/1532ed8666e384b0bc11f436bb10b9d2 to your computer and use it in GitHub Desktop.
Save alogic0/1532ed8666e384b0bc11f436bb10b9d2 to your computer and use it in GitHub Desktop.
sinus & cosinus
program = drawingOf(sinPlot & cosPlot & coordinatePlane)
rmax = 2 * 180
k = rmax / 10
ymax = 5
sinPlot = trigLine sin
cosPlot = trigLine cos
trigLine f = curve([(x, y) | p <- [-10 .. 10], d <- [0 .. 9], let x = p + d/10, let y = ymax * f (x * k)])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment