How To Play
Poop out as much Potty Candy as possible.
The shape of your Potty Candy depends on two things...
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.|
|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)
|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.
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
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:
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...
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).
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: