> From what I can tell, one of the settings used to deal with division by 0 is the so-called Riemann sphere, which is where we take a space shuttle and use it to fly over and drop a cow on top of a biodome, and then have the cow indiscriminately fire laser beams at the grass inside and around the biodome. That's my intuitive understanding of it anyway.
And there's even animation (with Mathematica source) for this one. However:
> (Note the cow cannot be spherical or it will roll off).
This site is amazing though. It just keeps going...
Lines "flow" from left to right (horizontally) or bottom to top (vertically), and all lines start out white. When two lines cross, they might switch color depending on which color they come across, as follows:
* white (h) + white (v) = black (h) + black (v)
* black (h) + black (v) = black (h) + black (v)
* white (h) + black (v) = white (h) + white (v)
* black (h) + white (v) = white (h) + white (v)
As of yet, fruitless. It's a cute little project that shades of the standard presentation of three squares forming a center 3 4 5 triangle, with an interesting twist.
http://roadtolarissa.com/triangles
Only a couple of lines of codes too:
https://github.com/1wheel/BizarreSierpinskiTriangle/blob/mas...
Code by/for mathematicians is particularly ugly to a professional programmer. There is significant historical (pencil & paper) precedent for what single-letter variables represent in a given context. For a mathematician, ConstantArray[0, {m,n}] reads more cleanly than ConstantArray[0, {cols,rows}].
Similarly, seeing variables like p1, p2, p3 is off-putting to me as a programmer, but I still immediately recognize them as 3 arbitrary points in a triangle.
The Riemann sphere lets you deal with dividing by 0 by adding one more point to the complex plane: ∞[1]. Imagine putting it in the air above the origin, 0, and folding the midpoints of the four sides of your graph paper to meet there. (Yup, put all 4 points of the arrows in the same spot!) That's the Reimann sphere[2].
Going from a point the sphere back to the plane is a little weird.
1. Put a cow (point) on the top of the biodome (sphere) at infinity.
2. Pick the point on the sphere that you want to give a home on the complex plane.
3. Have the cow fire a laser beam (draw a line from infinity) through the point.
4. Follow that line back to wherever it hits the plane. That's the equivalent point on your complex plane.
Play with this a bit. Points near the top of the sphere (near the cow, at infinity) will shoot laser beams way off into the distance. Points near the bottom of the sphere will burn the grass right nearby on the plane itself.
You can then reverse the process ("If my cow were to shoot a laser at this grass, what part of the the biodome will get hit?"), to go from the plane to the sphere, because "folding up the sides of paper" doesn't accurately model what happened to make the sphere.
[1] Math with ∞ is what you'd expect: 3/0 = ∞. 3/∞ = 0.
[2] Since there is an infinite number of points on a sphere, this is entirely possible, and only mildly unsettling.
seriously going to have to look more closely at this some time, it's fascinating in a "look what you can do with math/programming/mathematica" kind of way.
JuliaFP = Compile[
{{const,_Complex}, {init,_Complex}},
Module[{val=init,n=0},
While[Abs[val] < 5 && n < 25, val = val^2 + const; n++];
{Mod[Arg[val]/(2*3.14159), 1], 1 - Abs[val]/5, 1 - Abs[val]/100}
],
CompilationTarget -> "C",
RuntimeAttributes -> Listable,
RuntimeOptions -> "Speed"
];
{fine, coarse} = Table[Complex[j,i],
{dx, {0.008, 0.002}}, {i,-1.5,1.5,dx}, {j,-1.5,1.5,dx}
];
pt = {0.0,0.0};
Graphics[{
Raster[
JuliaFP[Complex @@ pt/2, If[ControlActive[], fine, coarse]],
{{-2.0,-2.0}, {2.0,2.0}},
ColorFunction-> Hue
],
Locator[Dynamic[pt]]},
ImageSize -> 800
] // Dynamic
P.S. Original post is awesome. I love the cow!one he missed, from the early 90s
Can't resist posting my Clojure implementation of the chaos game: https://github.com/Hendekagon/card
to quote:
1 start at any point. call it p
2 pick one of the three vertices at random
3 find the point halfway between p and that vertex
4 call that point p and draw it
5 goto 2
He goes into great depth about this strategy. HV | O
---+---
11 | 0
00 | 0
10 | 1
01 | 1
You can do it very similarly with the coordinates of the pixels on the screen[1]. It's really interesting how often that shape comes out of places. Which is why I think that this page got started.[1] http://www.stilldreamer.com/mathematics/sierpinskis_triangle...
The XOR Sierpinksi's triangle is at http://sciencevsmagic.net/logicgrid/#282800 but there are other ways make it too. For example XNOR makes an inverse http://sciencevsmagic.net/logicgrid/#828200
If you keep hitting random you'll find plenty of surprising analogues to Sierpinksi's.
Don't get me wrong, it's a powerful tool and well worth it's price. But adoption is extremely low outside of academia, and I don't see that changing anytime soon unless Wolfram adopts more developer-friendly licensing. Which is a pity because it's definitely the "right tool for the job" in a lot of cases.
On classic, Euclid, plane a pair of parallel lines would never intersect. Given a line and a point outside of the line, there can be only one line through the point which would be parallel to the first line.
If one modify the axiom to allow for many such lines through the point (the lines which would never intersect the first line) - that would result in hyperbolic plane geometry.
If one modify the axiom to state that no such line through the point is possible (i.e. any line through the point would intersect the original line) - that would result in the Riemann sphere geometry.
Interestingly, I was just reading the Book (hardcover) with the recursive Title: "The Fractal Geometry of Nature" by Benoit Mandelbrot. And this brings an entirely new meaning into my world view after combining the ideas behind this and http://en.wikipedia.org/wiki/Multifractal_analysis#technique...
Anyone have any insights?
I'll also note that Mathematica looks quite awesome indeed.
[1] http://nbviewer.ipython.org/url/beowulf.csail.mit.edu/18.337...
We (Wolfram) are working on a web frontend for the Wolfram Language that will make the language "effectively" open, even if it is still proprietary.
And after the next version, we're going to be concentrating hard on defining a typed subset of the language that can compile via LLVM to all kinds of targets, including the browser.
Regarding Julia, although the syntax is superficially similar to Matlab and we've intentionally made many things compatible, Julia isn't really modeled on Matlab. Julia is much more influenced by Lisp – much like Mathematica via Macsyma and Maclisp. Julia's dynamic multiple dispatch is somewhat reminiscent of Mathematica's pattern matching dispatch system too, although, of course, the evaluation semantics are radically different.
I hate to quibble, but having a web frontend for Mathematica that you don't charge people to use does not make it "effectively" open. Mathematica is a shining example of excellence in closed-source software and I have no problem with it as such, but calling it "open" because there is a web version is just disingenuous b.s.
[1] http://www.wolfram.com/products/mathematica/newin7/content/D...
[2] http://www.wolfram.com/mathematica/new-in-8/probability-and-...
My intent was to wander into quote-unquote "advanced topics" but not necessarily dwell on them, so the math is intended to be casual, even though I didn't hold back on the formulas. I.e. you're not supposed to understand everything. From a larger point of view, you could think of the page as a response to the inanity of the logic-only expositional style that passes as higher math education today.
Regarding the code, to me most of the code snippets on that page are "scripts." There's maybe 2 or 3 snippets that might cross over into being "applications." The MovieMaker[1] utility is probably the most application-y. (Apologies for having to squint at the code in some cases. I felt that the visceral immediacy of the source code was critical, in the "this is not magic" kind of way, which is why it's all plaintext rather than, say, links to Mathematica notebooks.)
For better or worse, however, the source was one of those places where I had trouble holding back. I tried to make the code educational in the process, though. In particular, if you want to learn or expand on function-oriented/functional programming skills, the code may learn you some insights.
By the way everybody, thanks for the comments. It's been hilarious/endearing reading them, and I'm happy that one of my minor magnum opii is irreversibly burning such a healthy number of man-hours from the coffers of society. I should also mention that all the imagery/source/audio is public domain. Also if you want to link to a specific slide view, View Source/Inspect Element on it to find its name (the CSS class is "flipbook"). So if you see
name="game of life 2"
That becomes http://www.oftenpaper.net/flipbook-gameoflife2.htm
Where it has its own page. Of course, my inimitable laziness is why this process isn't automated.[1] http://www.oftenpaper.net/flipbook-fadeleafanimation.htm