How To Play

Watch Me!

Poop out as much Potty Candy as possible.

The shape of your Potty Candy depends on two things...

Colon Stretch. Ewwww... Splash Factor
To stretch your colon, click above or below the curve.
Use the arrows at the bottom for super fine tuning!
Click anywhere on the diagonal line to change the size of the splash you make.
You will see the wobbly circle move to the place you click.
Use the arrows at the bottom for super fine tuning!
Tips
Click on the colored boxes on the right-hand side to poop it all out in one shot.
You can change your Colon Stretch while you are pooping.
Sometimes a tiny change in your Colon Stretch or
Splash Factor will barely make a difference. But
other times, it can change everything!
There are millions of possible poops.
You will always get the same score for the same
Colon-Stretch/Splash-Factor combo. For example,
a Colon Stretch of 90.250 and a Splash Factor of
55 will always give you a score of 29.
Shape Points
1
2
5
7
10
20
30
40
Thanks

Michael Frame and David Peak for Chaos Under Control. The Art and Science of Complexity.
gskinner.com for CreateJS.com.
Vairag for naming Potty Candy!



The Math Behind The Bouncing Ball

Pick some (x1,y1) that are on y=x.
NOTE: x1 needs to be bounded by [0.0,2.0]
Let COLON_STRETCH be some val from 0.0 to 2.0

The first movement goes vertical from (x1,y1) to a point on the curve (x2,y2).
x2 = x1 (since we're moving vertical!)
y2 = COLON_STRETCH * ((-1 * ((x1-1)^2)) + 1)
The second movement goes horizontal from (x2,y2) to a point on the line y=x (x3,y3).
y3 = y2 (since were moving horizontal)
x3 = y3 (since y=x!)
Rinse and Repeat.



The Math Behind The Curve

Use a link like this to follow along.
The function f(x)=x^2 is a parabola with the open end facing up.
I needed the Colon Stretch to face downward, so I did this: f(x) = -1 * (x^2)
To make my math a little simpler, I moved the parabola above the x-axis with this: f(x) = (-1 * (x^2)) + 1
Now I need to shift it to the right so I change x^2 to (x-1)^2: f(x) = 2 * ((-1 * ((x-1)^2)) + 1)
At this point, the parabola above the x-axis is the same thing as the Colon Stretch (quadrant I).
But how does one go about stretching their colon and keeping the anchor points at (-1,0) and (1,0) in place?
This did the job: f(x) = 2 * ((-1 * ((x-1)^2)) + 1)
This can be rewritten as: 2(-(x-1)^2 + 1)



Puzzle Within a Puzzle

After I finished writing Potty Candy, I started running into a problem.
I started seeing that I was getting different scores for the exact same
Colon-Stretch/Splash-Factor inputs. After some debugging, I realized that I wasn't
using the exact same inputs. When I clicked on the screen to move the curve, the
Colon Stretch would show a number like 1.82501. The actual number in the computer was
1.825012726! I was showing a truncated version of the number. That minor difference
of 0.000002726 was causing the final pattern/score to be completely different.



Deterministic Chaos

Okay, enough of the old style math, let's see what this simulation is really about!

I saw an interesting model in a book called Chaos Under Control (page 15).
From what I could tell, the model showed two things:

1) How random numbers could be generated from a model that has no random inputs.
2) That tiny changes could sometimes have a huge impact.
The ball (Splash Factor indicator) can start at any point on the diagonal line.
After you click Push, it moves vertically (up or down) towards the curve.
When it hits the curve, it moves horizontally (left or right) towards the diagonal line.
It just keeps doing this until you stop it. (In the game it stops after 100 diagonal line hits.)
Each time the ball hits the diagonal line, it draws the colored square it hits onto the grid.
So the question is, depending on which Colon Stretch and Splash Factor you use, what will
the pattern of dots look like?
For these examples, CS means Colon Stretch and SF means Splash Factor.
Try CS=0.12000 and SF=0.10

Click Push and then click the grid to speed it up. The whole grid goes red.
Now try CS=0.64000 and SF=0.10

It starts off in red but then jumps out towards yellow and sticks there.
CS=1.62000 and SF=1.57

This one basically cycles back and forth between black and green.
CS=1.95000 and SF=1.57

There doesn't seem to be much of a pattern here. It turns out there are some settings that repeat after a large
number of squares. And there are some settings that produce squares that NEVER repeat. Wait. What?
Originally I was going to make the grid squares much smaller, so that instead of 100 squares
there could be 10,000 or more. Then, after you clicked Push, I was going to have the code look
for a repeating pattern. The more I thought about it, the more I realized I don't really know what
that means.
Take this pattern: RRGGRRGG

Is this repeating? I'd say so.
But what if I added one more and it looks like this: RRGGRRGGB

Uhm... ok, maybe not.

The more I thought about it, the more confused I got.
Now imagine trying to find what repeats when there are 10,000 colors in a row...
So for now, I decided to stick to 100 dots and look for funky tetris shapes instead!
I guess I've got something new to learn about.
Tiny changes can make a big difference in the simulation.

Try CS=1.87500 and SF=1.29
Now change CS to 1.87501
The output pattern is dramatically different and all we did is change the Colon Stretch by 0.00001!

But this isn't always the case.
If you try CS=0.15000 and SF=0.10, and then change CS to 0.15001, you end up getting
a grid of red blocks either way.

Let's pretend that this is a model of a weather system and it's used to predict tomorrow's temperature.
For this example, assume these things:
  1. Think of Colon Stretch as a Pressure reading and the Splash Factor as Humidity
  2. Pretend that the Potty Candy score represents the predicted temperature
  3. This system will perfectly predict the temperature IF it gets the correct Pressure and Humidity factors
  4. You accurately predicted today's temperature of 15 using Pressure=1.82500 and Humidity=0.53
Imagine your weather instruments are telling you that tomorrow's numbers will be:
Pressure=1.82499 and Humidity=0.52.
You plug those numbers into your weather machine and see that the temperature will be 19.

The problem is that your weather instruments sometimes give you not-so-perfect readings.
Suppose the actual Pressure was 1.82501
Checking Pressure=1.82501 and Humidity=0.52 you get a temperature of 32!

We should get better instruments! Yes, that could help us get 1.82501 instead of 1.82499,
but that doesn't actually solve the problem. Because what if the Pressure was actually
1.824991? You might think, oh what could .000001 ever do to anything. Turns out that this problem
of tiny changes sometimes causing big impacts, NEVER goes away - No matter how many decimals
you go out. Technically it might go away if you could calculate using infinitely long numbers...



An Unrelated Number Thingy

Here are the decimals of PI to 42 of digits:
14 15 92 65 35 89 79 32 38 46 26 43 38 32 79 50 28 84 19 71 69

I've spaced them apart in pairs of two for a reason. Computers store letters
as numbers. Let's convert these pairs of numbers into letters (where xx means unreadable).

14 15 92 65 35 89 79 32 38 46 26 43 38 32 79 50 28 84 19 71 69
xx xx \ A # Y 0 ' ' & . x + & ' ' 0 2 xx T xx G E

Now the same message, with all the unreadable characters removed:
\A#YO &.+& O2TGE

This little message doesn't make much sense. But don't forget, PI has an infinitely long,
non-repeating decimal. It's possible that if we kept going, maybe another 5,000 digits,
that a few small words like AND, HI, or HEY might appear.

But what if we went on for 10 millions digits? We'd probably find a lot more words,
and maybe some small sentences like HEY YOU!

What if we went out for 10 trillion digits. It's possible that we might find entire sentences
out there! But infinitely long. That's really.... long....! Maybe in such a 'long' set of numbers
we'd find things like:
  1. Full paragraphs
  2. Entire books
  3. Every possible book ever written
  4. Every possible book that will ever be written
  5. Every answer to every test you'll ever take
  6. Even a biography about your life
  7. Even a biography about your life with the future written in it
  8. But also books with every possible future you might ever have
  9. Maybe even a whole crazy story about you reading this very sentence and thinking - no way!



Deeper

Movie #1 Macro View