Sunday, April 14, 2013

Clicktagon Redux

First jab at random clicktagon. For those of you who haven't seen the original, it's a little flash game where you have to identify different shapes (just play it and you'll understand).
Some things to do:
Equalize out the size of the different polygons (to make it harder).
Framerate is choppy.
Find out a smart way to do collision with the mouse.

Saturday, March 16, 2013

The Octagon Problem

Here's my video showing that the pythagorean theorem applies to regular octagons as well as squares:


Many thanks to Jack Eustis for his camera work and moral support.

Wednesday, March 13, 2013

Friday, March 1, 2013

Number of Triples to...

1
2
3
4
5
6
7
8
Up to 10: 0 triples, 0 primitives.
Up to 100: 17 triples, 7 primitives.
Up to 1000: 325 triples, 70 primitives.
Up to 10000: 4858 triples, 703 primitives.
Up to 100000: 64741 triples, 7026 primitives.
Up to 1000000: 808950 triples, 70229 primitives.
Up to 10000000: 9706567 triples, 702309 primitives.
Up to 100000000: 113236940 triples, 7023027 primitives.
 By Paul and Vikram using C because we're just that good.
Take that Harry and Josh


typedef unsigned long xint;

xint total, prim, max_peri;
xint U[][9] =  {{ 1, -2, 2,  2, -1, 2,  2, -2, 3},
{ 1,  2, 2,  2,  1, 2,  2,  2, 3},
{-1,  2, 2, -2,  1, 2, -2,  2, 3}};
void new_tri(xint in[])
{
int i;
xint t[3], p = in[0] + in[1] + in[2];
if (p > max_peri) return;
prim ++;

total += max_peri / p;
for (i = 0; i < 3; i++) {
t[0] = U[i][0] * in[0] + U[i][1] * in[1] + U[i][2] * in[2];
t[1] = U[i][3] * in[0] + U[i][4] * in[1] + U[i][5] * in[2];
t[2] = U[i][6] * in[0] + U[i][7] * in[1] + U[i][8] * in[2];
new_tri(t);
}
}
int main()
{
xint seed[3] = {3, 4, 5};
for (max_peri = 10; max_peri <= 100000000; max_peri *= 10) {
total = prim = 0;
new_tri(seed);
printf( "Up to "FMT": "FMT" triples, "FMT" primitives.\n",
max_peri, total, prim);
}
return 0;
}

Thursday, February 28, 2013

Hey, guess how many Pythagorean Triplets there are?

You guessed it! But how many do you think you can actually find? I bet you 13228 moneyz in geometric currency that you can't beat my supercomputer. I dare you to check all of them:

Click Here For a Lot of Numbers

At the start, Wolfram Mathematica was being a little obtuse with me, but then I switched to Python, and it turned out just fine. Here is the Python file for those of you who are interested.

Thursday, February 21, 2013

A Cute Triangle Walks into a Bar...

Just kidding, I don't have a knock knock joke. But I do have a fascinating mathematical exploration to tell you about! After figuring out how to identify the acuteness of a triangle with only knowing side lengths in class (shoutout to Vikram for helping me/telling me what the answer was), I decided to write a little program to do these calculations.

Its nice. It does nice things. But I'm starting to worry about its accuracy. Here is the algorithm I am using:

Right triangle (never happens because I use random coordinate inputs that are decimals):
     A^2 + B^2 = C^2
Acute:
     A^2 + B^2 < C^2
Obtuse:
     A^2 + B^2 > C^2

Also note that these are all real triangles, no floppy arm business like this: https://docs.google.com/drawings/d/1vqFSweJkqJm-2oSSe6q3nbhRDJ4l1LDcGIFDeid5STQ/edit

The thing that perplexed me was that there seemed to be A LOT more acute triangles than obtuse. I've been running this program with random triangles (in a finite 500 by 500 space) 200 times a second for over 10 minutes and the obtuse to acute ratio seems to be wavering around 1:2.645. Why? Is it a problem with my program, or a problem with...MATH?

Update: Whoops, I think I got my alligator teeth mixed up again! Its 2.645:1 which makes a bit more sense.

Another update: As you change the dimensions of the rectangle you are generating the triangles in the ratio changes. What is the correlation between the dimensions of the rectangle and the acute/obtuse ratio?

Tuesday, January 29, 2013

A Wild Obtuse Chase: Discovering the Hard Truth of Mathematical Identity in a Foggy World

Words are dangerous things. They're confusing, blurry, overly-complicated, emotional, and sometimes downright unpleasant. Unfortunately, words possess a rather complete monopoly on communication, and so all we can do is try our hardest to avoid falling into their numerous traps. However, being dangerous things, words always seem to find a way to get the best of you in the end, no matter how carefully you tread; experience will postpone this moment, but it will come. This is a tale of how two young, foolish students of mathematics managed to trip over the very first hurdle, and how they then spent several minutes running in completely the wrong direction, and how they eventually realized their mistake and turned around, and how they then, finally, wound up back at the starting line, having made absolutely no progress in the race, but having become a little bit wiser for it.

Let's start with angles. We are all familiar with angles in two dimensions, and how we represent them as fractions of a 360 degree circle. However, my esteemed colleague Vikram and I decided to try and extend our logic. What about three dimensional angles? That is to say, how can we better visualize the relationship between 3D angle and sphere, in the same we we do for 2D angle and circle? The answer is rather simple, actually.


Above, we have two images, on with a circle, the other with a sphere. In both cases, the point labeled 'O' is the center. As you can see, in the first image, two rays extend from the center of the circle, with the points at which they intersect the perimeter labeled 'A' and 'B'. The segment of circle in between the two rays is a certain number of degrees out of 360, and this is an angle. In the second image, we have a sphere, with three rays rather than two extending from the center and carving a patch out of the surface area. And as you can see, the patch it carves is in the shape of a triangle. And, since we know how to deal with the angles of triangles, this is cause for rejoice. So far, so intuitive. However, a problem quickly arises. Look below.



In this image, the 3D angle is more cone-y, and not so neat. Notice that when we looked at our 2D angle, the patch the rays carved out of our circle was a 1D shape (i.e., a line). And now, looking at our 3D angle, the patches cut out of the sphere's surface by the rays will all be 2D polygons. Because of this, finding a way to talk about and visualize these angles is a daunting task.

Now, Vikram and I faced up against this problem, but immediately wasted a good amount of our name doddling about with words and descriptions, rather than getting to the point of mathematical identity. We kept trying to express the 3D angle in terms of degrees (out of 3600, perhaps), in some attempt to tie it back to familiar 2D territory. However, the clear folly in this is that the number 360 is fully arbitrary. The patch of circle is 1/4 of the whole, the patch of sphere is 2/7 of the whole, and any further description just confuses the matter.

So, we wound up without having made any progress on the language front. And since that is where our research stopped, it seems right to end my report here as well. However, I am fully aware that we haven't even scratched the surface of these ideas; I'm particularly interested in the relationship between areas and angles. This has simply been an overview of the thoughts we had that day, and of how we came to better understand what the word 'angle' means. And so... The End.

Sunday, January 13, 2013

I am the ox cart; Mathematica is the ox.

After finishing writing this post, I realized that I may have already written this exact same post a couple weeks ago. I couldn't find it though, so I'm posting this. This one is probably better anyway.

So I was trying to make a brute force approach to figuring out different combinations of regular polygons that fit around a point. (For example, 3 hexagons, or a triangle and 2 dodecahedrons) So into Mathematica I went.

First I tried this:


FindInstance[(180 - (360/x)) + (180 - (360/y)) + (180 - (360/z)) + (180 - (360/w)) == 360, {x, y, z, w}, Integers, 100]


In normal person language, this finds 100, 4 integer combinations that fulfill that equation up there where the 4 integers are x, y, z, and w. The thinking behind this equation is this: 180 - (360/x) is the formula for the interior angle of a regular polygon with x number of sides. So, in fact, this equation only solves for combinations of polygons with a maximum of 4 polygons.

Anyways, this didn't work. If you don't understand this equation, message me up in the comments. I think the main reason why this made Mathematica go crazy was the it overflowed. So I added some minimum and maximums for the number of sides.

FindInstance[(180 - (360/x)) + (180 - (360/y)) + (180 - (360/z)) + (180 - (360/w)) == 360 && x > min && y > min && z > min && w > min && x < max && y < max && z < max && w < max, {x, y, z, w}, Integers, 100]

You don't really need to understand this. All you need to know is that I put restrictions on the number of sides for each polygon so that the computer didn't explode.

After a couple more trivial little Mathematica troubles I finally got it to work. This is what is output:

{{2, 3, 10, 15}, {4, 6, 12, 2}, {15, 10, 3, 2}, {6, 3, 4, 4}, {6, 6, 2,
  6}, {3, 8, 2, 24}, {5, 10, 5, 2}, {20, 5, 2, 4}, {3, 10, 2, 15}, {2, 9, 3,
  18}, {12, 2, 3, 12}, {12, 6, 2, 4}, {4, 8, 2, 8}, {6, 4, 3, 4}, {5, 20, 4,
  2}, {4, 8, 8, 2}, {4, 12, 3, 3}, {4, 20, 2, 5}, {5, 10, 2, 5}, {10, 3, 2,
  15}, {12, 4, 3, 3}, {15, 3, 2, 10}, {3, 4, 3, 12}, {4, 12, 2, 6}, {5, 5, 10,
   2}, {4, 2, 20, 5}, {10, 2, 15, 3}, {4, 20, 5, 2}, {2, 12, 12, 3}, {15, 2,
  3, 10}, {9, 3, 18, 2}, {4, 4, 6, 3}, {4, 2, 12, 6}, {8, 2, 4, 8}, {2, 4, 6,
  12}, {3, 3, 12, 4}, {10, 3, 15, 2}, {5, 5, 2, 10}, {12, 2, 6, 4}, {3, 2, 12,
   12}, {2, 4, 12, 6}, {2, 8, 3, 24}, {4, 6, 3, 4}, {6, 6, 6, 2}, {3, 2, 18,
  9}, {2, 8, 24, 3}, {3, 4, 4, 6}, {2, 20, 5, 4}, {3, 18, 9, 2}, {18, 9, 2,
  3}, {5, 2, 10, 5}, {18, 3, 2, 9}, {18, 2, 9, 3}, {12, 4, 2, 6}, {18, 9, 3,
  2}, {2, 6, 12, 4}, {12, 3, 4, 3}, {8, 2, 8, 4}, {2, 12, 3, 12}, {6, 3, 3,
  6}, {2, 5, 10, 5}, {6, 6, 3, 3}, {2, 5, 4, 20}, {24, 3, 8, 2}, {3, 24, 8,
  2}, {2, 15, 10, 3}, {2, 10, 15, 3}, {6, 4, 4, 3}, {3, 6, 3, 6}, {4, 5, 20,
  2}, {2, 10, 5, 5}, {2, 12, 4, 6}, {10, 15, 3, 2}, {5, 2, 5, 10}, {6, 2, 6,
  6}, {8, 2, 24, 3}, {2, 5, 5, 10}, {3, 6, 6, 3}, {8, 3, 2, 24}, {24, 8, 3,
  2}, {8, 24, 3, 2}, {4, 3, 12, 3}, {3, 4, 6, 4}, {8, 8, 4, 2}, {3, 12, 4,
  3}, {4, 12, 6, 2}, {9, 2, 18, 3}, {2, 15, 3, 10}, {18, 2, 3, 9}, {12, 2, 4,
  6}, {12, 3, 2, 12}, {4, 6, 2, 12}, {24, 3, 2, 8}, {2, 6, 6, 6}, {9, 3, 2,
  18}, {6, 2, 12, 4}, {2, 12, 6, 4}, {10, 2, 5, 5}, {2, 4, 20, 5}, {2, 18, 9,
  3}}

These are 100 different combinations. For instance, the first combination--{2,3,10,15} is saying a triangle, a dodecahedron, and a 15-gon will fit around a point. The 2 represents a line, which takes up 0 degrees around angle. This is caused by me using 4 variables. In other words, just ignore any 2s.

Question: are there infinite combinations?

It would be nice to organize this data a little bit better. For instance, in this case, order does matter, but it shouldn't. I'd also like to think about writing a process like this but for full tilings. It might be a lot more difficult though. Also, making Mathematica output graphics would be nice.



Saturday, January 5, 2013

A Tessellation of Fat Pigs Wearing Capes and Party Hats.

Hello all. I have been working for the past few weeks on a tessellation of pigs. However, these are not just any ordinary pigs. These are pigs have remarkably fleshy bellies and are sporting fashionable party hats and capes.
I wasn't really sure how to go about making a tessellation at first, so I began by making random shapes out of rectangles and triangles and other shapes on graph paper. I would then tweak those shapes to try to get them to fit together. I ended up getting something a bit like this:
I thought it was pretty cool, but I wanted to try making a tessellation of an actual object. Again, I didn't really know how to start, and it was more difficult to just sketch it this time because unlike in the the above shape, not all the lines in the objects I was drawing were straight.
I later found a website that showed different methods for making tessellations, and I chose one of them to loosely follow for mine (here is the link to the page: http://www.tessellations.org/methods-tracing-paper-0.shtml). I didn't follow all of the steps exactly, and only used one sheet of paper to sketch out my tessellation, but it did help a lot to use a grid with even rectangles for more structure. I turned the sides of those rectangles into squiggly lines and tried to to think of what they looked like--like when you try to figure out what clouds look like. I thought they looked slightly like disproportionate pigs, so I decided to go with it. I tweaked the shapes to get them to look more pig-like. Here is my first draft:
As you can see, the pigs are roughly the same shape and size, but they are still not completely equal. I had to keep adjusting the back of the pig so that the front would fit, and same for the top and bottom. The pigs went through many changes until they fit together just right:
^The final pig is on the bottom. To get my final tessellation, I traced and re-traced that pig on a grid, added details, and... voila! Pigs!






Wednesday, December 19, 2012


An awesome Tessellation created by Jack and Josh 

Thursday, December 6, 2012

Coming soon, in Math3D, from Angus, Vikram, Tiger, and Paul, an amazing presentation of the world's hardest angle chasing problem, made easy by two-variable algebra. Musical Accompaniment provided by the Triangles, and GarageBand. We will wow you with the amazing mathematics involved with finding angles with angles. All shall be illuminated.

Wednesday, December 5, 2012

Tuesday, November 27, 2012

Thursday, November 15, 2012



               In the illustration above, A is the centerpoint of the red circle. The red circle is reflected across the yellow lines in four directions to create the ring of overlapping identical circles around the red one. Each respective reflection of the original red circle is marked by their center points-A’, A’1, A’2, and A’3. I added a quadrilateral (the rotated blue square) drawn between the four center points of each outer circle, and the space marked by Inner consists of all the area not overlapped by the reflection circles. Given that the blue quadrilateral square has a perimeter of 16, is it possible to identify the Inner area of the object?







Angle Chasing Problem


Solve it...I dare you...

Wednesday, November 14, 2012

Angle Chasing Shortcut #1

This nifty little diagram is of a triangle with angles a, b, and c.  The exterior angles are marked a+b and a+c because they equal the sum of angles a and b, or however they are written out.

A simple proof of this is that since that the "sum angle" has to be a, b, or c minus 180˚, reason being that a line has an angle of 180˚ so the missing "sum angle" has to be the difference of the given angle and 180˚.  Since the "sum angle"+b=180 and a+c=180, the "sum angle" has to be a+c or the other two angles.


I posted a slightly less complex version of the first image on the "Geometry Web" in the classroom without a proof just so nobody has a panic attack because they can't figure out why this is true. This diagram is useful for angle chasing because it allows us to skip over some angles that aren't necessary to solve, and we can all agree that addition is less time consuming than subtraction, so once applied to the sheet, you will just breeze through them at like 2 minutes per sheet or something really fast.

Tuesday, November 13, 2012

Stellated Dodecahedron

 I was messing around with shapes and created a dodecahedron (12 sided shape) I then put spike like things on it and asked Justin if it had a name.  He said it was type of stellated dodecahedron which is a dodecahedron with points coming off it although usually it has five points like the one I later made below.


After a little while I constructed a dodecahedron out of paper and figured out how to make paper spikes to go on it. 


Below is the finished dodecahedron. If you look you can see that it could be seen as consisting of 12 stars going through it not entirely sure how to type that but if you have any interest you can ask me in class some time and I will explain


In addition here are some links for anyone interested in learning more about stellation or stellated dodecahedrons :
http://en.wikipedia.org/wiki/Small_stellated_dodecahedron
http://en.wikipedia.org/wiki/Stellation

Brouwer's Fixed-Point Theorem: A Proof in the Works

Brouwer's fixed-point theorem goes thusly: if you hold two equal-sized sheets of paper, one above the other, and then crumpled the top sheet into a ball (while still keeping it above the bottom sheet), there will be one point on the top sheet that is still directly above the same point on the bottom sheet. It's a little bit difficult to wrap one's mind around, so I tried to find an image that would illustrate the idea.



The above image uses circular planes instead of rectangular ones, so I hope you can cope with that. But besides that, it's quite nice. Function f is the act of crumbling the paper, and, as you can see, point a remains unchanged. The location of a depends on how exactly you choose to crumple the paper, but it will always exist somewhere. Or so goes the theorem. We decided to prove it.

So, first, we decided to head back into two dimensions, where we felt more at home. In the second dimension, we must imagine two lines above one another, rather than two planes, but the concept is the same: transform the top plane, and one point on it will always remain at the same x coordinate once all the changes are made.


Here is our starting point. Now, let's make some transformations. First, we can translate.



If the line is six units long, the top line has been moved two units to the right. But we can't be done here, because the top line is no longer fully above the second one. So we must transform again.

Now, the top line is fully above the bottom, and every point has been moved at least once. The top line is officially 'crumpled', albeit simply. So, let's take a closer look. Is there a point on the top line that is aligned with its partner on the bottom? 

Well, if there is, it is obviously between point 4 and point 6, as everything else has been shifted to the left. All the points between 4 and 6 were shifted to left in step one as well, but they were then folded back to the right in step two, which, you'll remember, was necessary in order to balance out the offsetting of the translation. So, among the points between 4 and 6, it cannot be below 5, because the points between 4 and 5 on the top line do not overlap whatsoever with the points between 4 and 5 on the bottom. Just by looking at it, we can surmise that the point, is somewhere just above 5 - in a perfect world, we could approximate it to an infinitely accurate degree by counting points on both lines. Now, onto the cool bit: how do we prove this?

The answer lies in these two principles: the numbers we chose to mark units on the lines are completely arbitrary, and we can eliminate possible points based on our markers. Armed with these two facts, we can narrow down the possible locations of this point until we reach one remaining conclusion. For example, in our above example, the only conclusion we were able to reach was that the point lies somewhere just above 5 - not a very satisfying result. But what if we had decided to make the line 12 units long rather than 6, putting another marker between 5 and 6 (which would then be 10 and 12). Well, that would give us some more information (i.e., it can't be between 11 and 12, because the points between 11 and 12 on the top line do not overlap whatsoever with the same points on the bottom line). And you see if we added more markers, that would give us even more information as to where it cannot be, and we can do this to an infinite degree.

This is about where we are so far. There were a few more stray ideas out there, but this is the meat of it. This example illustrates that translating must be counteracted in some way so as to keep it from misaligning the two planes, and that counteraction can be measured in terms of knowable markers. I would hope the ideas carry over into 3D, but there is much we haven't accounted for (such as other forms of transformation), and there is much work to be done. So, I'll turn this one over to you guys.


Problem Solving by Jack E., Vikram A., William S., and Justin L.

Writeup by Jack E.

Tuesday, November 6, 2012

Fractals

Fractals are weird. We can all agree on that. But, in reality, Fractals are useful geometric objects, which can provide vital advances in technology, medicine, and other stuff that concerns daily life. 
Fractals according to Merriam Webster dictionary are: any of various extremely irregular curves or shapes for which any suitably chosen part is similar in shape to a given larger or smaller part when magnified or reduced to the same size. 
Fractals according to Wolfram Alpha are: (010101 Technical error 404; image not available)
But that is really technical, so my definition is: a shape or a line or a geometric form, that if you zoom in on a particular place on that shape or a line or a geometric form, you will see a similar image there, so a figure which repeats itself over and over and over again, the smaller you go. 
But what are some uses of Fractals you may ask? Or you may not, but I'll still answer. 
Fractals are used in Training programs for pilots in developing mountains, by stacking triangle on each other over and over again to the thousandth of an inch. The same goes for video games. How do you think the landscapes in Halo and CoD were made? How about Cellphone antennas. There is a reason the Android, iPhone, and Blackberry, Windows, Symbian phones don't have large radio antennae that you pull out; they have these;220px-Fractal_antenna_patent.gif (220×208)
That is a phone antenna in all its unmasked glory. Because of some forgotten or too complex equation, the larger the surface are of an object, the more radio waves, or things can connect with it, and the better the signal becomes. Also, in medicine, fractals are everywhere. Veins and arteries are fractals, because the more you zoom in, they continue to look the same while branching off. Same applies to tree branches.'
Here are some examples;fractal_veins_by_brokenchaoz-d4thye7.jpg (900×675)
fractals-in-nature-fractal-tree-400x334.jpg (400×334)Tree_Branches_At_Dusk.jpg (720×480)
So there are some nature examples.
Here are some more traditional examples:
Mandelbrot's Set:322px-Mandel_zoom_00_mandelbrot_set.jpg (322×242)
Gosper island:320px-Gosper_curve_3.svg.png (320×320)
Sierpinski curve:S5.gif (364×364)
But how are these related to Transformations?
Well, we get these transformations using two, possibly three ways. First, we copy the figure, or part of the figure. Then we dilate the figure and paste that figure at a certain part of the figure.
How we discovered Fractals, you ask?
Well, a guy by the name of Mandelbrot published a book about fractals, in which he talked about Fractals, and their uses, and examples, and how to make them. That book was published in 1975, and then the world was never the same again.
Written by Paul A. Goldgisser