<commit_before>package edu.depauw.scales.demo

import scala.scalajs.js
import org.scalajs.dom
import rx._

import edu.depauw.scales.graphics._
import edu.depauw.scales.reactive._
import edu.depauw.scales.music._

object PrettyPicture {
	
	import Base._
	import Reactive._

	val w = Canvas.canvas.width
	val h = Canvas.canvas.height
	val radius = math.min(w, h) / 4
	val rSquared = radius * radius

	val wHalf = w / 2
	val hHalf = h / 2

	val incr = (radius) / 3

	def fnCircle(x: Double): Graphic = {
		val g = Ellipse(50, 50).fill(Color.HotPink)
		
		val quadOneX = x + wHalf
		if(quadOneX <= radius + wHalf) {
			val y = math.sqrt(rSquared - (x * x))
			return g.translate(quadOneX, hHalf - y)
		}

		val xPrime = x - radius
		val newXCoord = (radius + wHalf) - xPrime
		if(newXCoord >= wHalf) {
			val y = math.sqrt(rSquared - (xPrime * xPrime))

			dom.alert("radius - y is: " + (radius - y))
			return g.translate(newXCoord, hHalf + (radius - y))
		}

		//dom.alert("xprime: " + xPrime)
		//val quadTwoX = wHalf + x
		//dom.alert("quadTwoX: " + quadTwoX)
		// if(quadTwoX >= radius) {
		// 	val y = math.sqrt(rSquared - (x * x))
		// 	return g.translate(quadTwoX, hHalf - y)
		// }
		Text("")
	}

	def fnBackground(x: Double): Graphic = {
		val one = Rectangle(wHalf, hHalf).stroke(Color.Clear).strokeWidth(0).fill(Color.SkyBlue).tl
		val two = Rectangle(wHalf, hHalf).stroke(Color.Clear).strokeWidth(0).fill(Color.LightBlue).tl
		val three = Rectangle(wHalf, hHalf).stroke(Color.Clear).strokeWidth(0).fill(Color.Green).tl
		val four = Rectangle(wHalf, hHalf).stroke(Color.Clear).strokeWidth(0).fill(Color.DarkGreen).tl
		(one beside two) above (three beside four)
	}

	def fnCar(x: Double): Graphic = {
		val wheel1 = Ellipse(50, 50).fill(Color.Grey)
		val carBody = Polygon((0, 100), (75, 0), (150, 0), (200, 50), (250, 50), (250, 100)).strokeWidth(4).fill(Color.HotPink)
		(wheel1.bottom on (wheel1.center on carBody.bl).br).translate(400 + (x * 10), 300)
	}

	def fnButterfly(xy: (Int, Int)): Graphic = {<commit_msg>deleted unused code<commit_after>package edu.depauw.scales.demo

import scala.scalajs.js
import org.scalajs.dom
import rx._

import edu.depauw.scales.graphics._
import edu.depauw.scales.reactive._
import edu.depauw.scales.music._

object PrettyPicture {
	
	import Base._
	import Reactive._

	def fnBackground(x: Double): Graphic = {
		val one = Rectangle(wHalf, hHalf).stroke(Color.Clear).strokeWidth(0).fill(Color.SkyBlue).tl
		val two = Rectangle(wHalf, hHalf).stroke(Color.Clear).strokeWidth(0).fill(Color.LightBlue).tl
		val three = Rectangle(wHalf, hHalf).stroke(Color.Clear).strokeWidth(0).fill(Color.Green).tl
		val four = Rectangle(wHalf, hHalf).stroke(Color.Clear).strokeWidth(0).fill(Color.DarkGreen).tl
		(one beside two) above (three beside four)
	}

	def fnCar(x: Double): Graphic = {
		val wheel1 = Ellipse(50, 50).fill(Color.Grey)
		val carBody = Polygon((0, 100), (75, 0), (150, 0), (200, 50), (250, 50), (250, 100)).strokeWidth(4).fill(Color.HotPink)
		(wheel1.bottom on (wheel1.center on carBody.bl).br).translate(400 + (x * 10), 300)
	}

	def fnButterfly(xy: (Int, Int)): Graphic = {
{'fraction_non_alphanumeric': 0.1598976654940838, 'fraction_numerical': 0.032619123760793095, 'mean_word_length': 3.872274143302181, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2557674', 'n_tokens_mistral': 1366, 'n_tokens_neox': 1184, 'n_words': 263}