Skip to content

Instantly share code, notes, and snippets.

View ochrons's full-sized avatar

Otto Chrons ochrons

View GitHub Profile
import scala.tools.nsc.interactive, scala.tools.nsc.reporters._, scala.tools.nsc._
object Test {
def main(args: Array[String]): Unit = {
val reporter = new StoreReporter
val s = new Settings()
s.processArgumentString("-Ypresentation-any-thread")
val global = new interactive.Global(s, reporter)
import global._
val Cursor = ""//"_DUMMY_ "
@ochrons
ochrons / Osc.scala
Last active April 14, 2018 14:13 — forked from anonymous/SierpinskiTriangle.scala
ScalaFiddle gist
import math._
val (h, w) = (Page.canvas.height, Page.canvas.width)
var x = 0.0
// $FiddleStart
val graphs = Seq[(String, Double => Double)](
("red", sin),
("green", x => 2 - abs(x % 8 - 4)),
("blue", x => 3 * pow(sin(x / 12), 2) * sin(x))
)
// $FiddleEnd