# Pi Day 2015: Pieces of Pi

For this year’s Pi Day post, I thought I’d continue our Web Sketchpad (WSP) construction theme. But rather than adapting the visualizations from last year’s Pi Day post to the new construction capabilities, I decided to take a different approach. Some time ago, I built a set of custom tools for the non-Web version of Sketchpad that allowed me (and other users) to create piecewise functions, and I was curious to see how those tools might translate to WSP. One of the things I did with those older piecewise-function tools was to create a graphic of the character π, so I thought I’d reprise that for Pi Day 2015. A nice connection with the mathematical meaning of π is that we can use trig functions to create the curve of the cap of π.

I’ve often been somewhat uncertain as to how valuable typical traditional Sketchpad users find custom tools, for two reasons:
(a) They’re hard to find; you have to click the Custom tool icon even to see them.
(b) It may not be clear what to do when; you have to open the Script View, or else watch the status bar at the bottom of the Sketchpad window.

(a) There’s no problem finding tools: their detailed icons are in plain view on the left side of the screen. This post’s sketch contains three tool icons. The first shows a bounded piece of a function graph, with one point determining the left bound and another the right bound. The second shows the graph of a function, and the third shows the region bounded by two functions, one defining the top edge of the region and another defining the bottom edge.
(b) It’s clear what to do: as soon as you click the icon, the entire construction is displayed, and the points or other objects you can match to sketch objects pulse until you’ve done something with them, either matched them to an existing object or dragged them to a new location.

So here’s a Pi Day challenge for students of Algebra 2, Precalculus, or Calculus: use the piecewise function tools below to create “Pieces of Pi:” the shape of π defined by piecewise functions, similar to the example on the right.

You’ll find tips in this video that illustrate how to use these tools to create the shape of the letter N.

If you want to experiment on your own with piecewise functions in Web Sketchpad, use this link to go to a Web Sketch that includes the tools above and three additional tools: Left and Right piecewise function tools (for a left-unbounded piece and a right-unbounded piece) and a New Parameter tool (to create parameters you can use in your function definitions).

## One thought on “Pi Day 2015: Pieces of Pi”

1. Matthew Litwin says:

Very fun!- my PI was somewhat lopsided (but fun to attempt)