Live data from Hacker News

The Sierpinski triangle page to end most Sierpinski triangle pages

oftenpaper.net

11–20 of 61 posts

Re: The Sierpinski triangle page to end most Sierpinski triangle pages

#12
Is is just me or is the code source really hard to understand? It's cool that you can represent such complex shapes with just a few lines of code in Mathmatica, but without comments and with all the single letter variables, it's hard for me to follow what's going on.

Re: The Sierpinski triangle page to end most Sierpinski triangle pages

#13
This is amazingly cool and stimulating to think about. It's also a compelling reason to take another look at Mathematica. The code is clearly dense and hard to understand, but I wouldn't even know how to go about performing some of these computations in another language.

Re: The Sierpinski triangle page to end most Sierpinski triangle pages

#14

A few years ago, I accidentally found this way of creating a Sierpinski Gasket-like structure: https://vimeo.com/7690310 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) + bla…

[deleted]

Re: The Sierpinski triangle page to end most Sierpinski triangle pages

#15

Is is just me or is the code source really hard to understand? It's cool that you can represent such complex shapes with just a few lines of code in Mathmatica, but without comments and with all the single letter variables, it's hard for me to follow what's going on.

I agree, but do realize this is written for a mathematical audience, not a CS audience. It's reductive, but it's not that reductive to your average math major/grad student.

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.

Re: The Sierpinski triangle page to end most Sierpinski triangle pages

#17
That is truly impressive and mostly all over my head. I feel that somewhere on that page we should be able to find a graphical solution to the factorization of large primes unless maybe that code would need to run on a computer residing in the fourth or fifth dimension?

Re: The Sierpinski triangle page to end most Sierpinski triangle pages

#18
post #5

That's amazing. It just goes on and on with beautiful plots. About halfway down, there's a section on understanding the Riemann sphere: > 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 a…

I'll attempt a layman's explanation of a Riemann sphere for anyone who has no idea what this is about:

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.

Re: The Sierpinski triangle page to end most Sierpinski triangle pages

#19
post #15

Is is just me or is the code source really hard to understand? It's cool that you can represent such complex shapes with just a few lines of code in Mathmatica, but without comments and with all the single letter variables, it's hard for me to follow what's going on.

I agree, but do realize this is written for a mathematical audience, not a CS audience. It's reductive, but it's not that reductive to your average math major/grad student. 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}] re…

That makes sense; I'm not the target audience. It was just a little off-putting to see some code and think "Whoa! That reminds me of Perl golf!!".
Post reply on HN