Author Topic: The Beauty of Mathematics  (Read 13856 times)

0 Members and 1 Guest are viewing this topic.

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
The Beauty of Mathematics
« on: July 21, 2011, 02:11:49 pm »
As most of us are know, mathematics can be very brutal and ugly, especially when dealing with algebraic equations. Here are a few of its prettier sides.

Warning: the images in spoilers are large.

This image was generated during a search for a more efficient way to compute A Mod B. It's a plot of the error between the true answer and my approximation over all possible 16 bit operands. I'm not sure why the resulting graph is so complex given the simplicity of the underlying function, but the remarkable self-similarities and other fractal qualities make it interesting.

Spoiler For Spoiler:

Spoiler For Atrocious Mathematica code to generate the image:
Quote
t=2^8;
TestMod[k_,b_,y_,x_]:=Mod[k,b]-Mod[k-y,b-x];
Array1=Array[0&,t^2];
Array2=Array[0&,t^2];
Array3=Array[0&,t^2];
Array4=Array[0&,t^2];
j=0;
For[b = 1, b < t, b++,

For[k = 1, k < t, k++,
y=k;
x=b;
x=BitOr[x,BitShiftRight[x,1]];
x=BitOr[x,BitShiftRight[x,2]];
x=BitOr[x,BitShiftRight[x,4]];
x=BitOr[x,BitShiftRight[x,8]];
x=BitOr[x,BitShiftRight[x,16]];
x=x-BitShiftRight[x,1];

y=BitOr[y,BitShiftRight[y,1]];
y=BitOr[y,BitShiftRight[y,2]];
y=BitOr[y,BitShiftRight[y,4]];
y=BitOr[y,BitShiftRight[y,8]];
y=BitOr[y,BitShiftRight[y,16]];
y=y-BitShiftRight[y,1];

Array1[[t*(b-1)+k]]=Mod[k,b];
Array2[[t*(b-1)+k]]=Mod[k-y,b-x];
Array3[[t*(b-1)+k]]=TestMod[k,b,y,x];
If[TestMod[k,b,y,x]==0,j=j+1]
]
]

ListPlot[Array3]
External link: http://img.removedfromgame.com/imgs/graph.png


The next picture is a strange attractor that belongs to a family of functions known as Lorenz equations. This particular family is characterized by their extreme sensitivity to initial conditions. A change of one in a hundred parts can result in a completely different system.
Spoiler For Lorenz attractor:
External link: http://img.removedfromgame.com/imgs/Lorenz_fractal.bmp


Here is an example of such a change. A single constant in the equations was changed to produce this graph from the previous one.

Spoiler For Spoiler:
External link: http://img.removedfromgame.com/imgs/Lorenz_lines.bmp


Another group of functions with interesting graphs are the one dimensional elementary cellular automata. In addition to their interesting computational properties (several of them are Turing-equivalent), some of them are chaotic to the point that they can safely be used for cryptographic grade random number generators. One particularly well known automaton is Rule 110 (following Wolfram's notation). The picture, which started from random initial conditions, clearly shows the propagating structures that form the basis of this rule's universal computation.

Spoiler For Spoiler:
External link: http://img.removedfromgame.com/imgs/Rule_110.png

Cellular automata can occupy more than one dimension, though. Here's a model of a two dimensional cellular automaton known as Conway's life rendered over time.
Spoiler For Spoiler:
External link: http://www.frank-buss.de/automaton/symmetric_rabbits.gif

If anyone has anything else, feel free to link it below.
« Last Edit: July 22, 2011, 01:22:48 pm by Qwerty.55 »
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline p2

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 849
  • Rating: +51/-11
  • I'm back :)
    • View Profile
Re: The Beauty of Mathematics
« Reply #1 on: July 21, 2011, 02:36:58 pm »
The last pic shows a ship of the "Replicatoren" (german) of Stargate SG1!
*insert supercool signature*

Offline ZippyDee

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 729
  • Rating: +83/-8
  • Why not zoidberg?
    • View Profile
Re: The Beauty of Mathematics
« Reply #2 on: July 21, 2011, 03:09:14 pm »
Wow! These are awesome! Thanks, Qwerty!
There's something about Tuesday...


Pushpins 'n' stuff...


Offline Anima

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 133
  • Rating: +4/-0
    • View Profile
Re: The Beauty of Mathematics
« Reply #3 on: July 21, 2011, 05:51:57 pm »
The second pic is pretty awesome.


Sorry for my bad English. I'm German.

Offline Darl181

  • «Yo buddy, you still alive?»
  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3408
  • Rating: +305/-13
  • VGhlIEdhbWU=
    • View Profile
    • darl181.webuda.com
Re: The Beauty of Mathematics
« Reply #4 on: July 21, 2011, 07:15:55 pm »
How do you make pics of the fractals like that--is there a generator somewhere or something?
Vy'o'us pleorsdti thl'e gjaemue

Offline Scipi

  • Omni Kitten Meow~ =^ω^=
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1547
  • Rating: +192/-3
  • Meow :3
    • View Profile
    • ScipiSoftware
Re: The Beauty of Mathematics
« Reply #5 on: July 21, 2011, 07:22:07 pm »
I want a 3D Game of Life Generator now! :P

Imma Cat! =^_^= :3 (It's an emoticon now!)
Spoiler For Things I find interesting:
Spoiler For AI Programming:
Spoiler For Shameless advertising:

Spoiler For OldSig:





Spoiler For IMPORTANT NEWS!:
Late last night, Quebec was invaded by a group calling themselves, "Omnimaga". Not much is known about these mysterious people except that they all carried calculators of some kind and they all seemed to converge on one house in particular. Experts estimate that the combined power of their fabled calculators is greater than all the worlds super computers put together. The group seems to be holding out in the home of a certain DJ_O, who the Omnimagians claim to be their founder. Such power has put the world at a standstill with everyone waiting to see what the Omnimagians will do...

Wait... This just in, the Omnimagians have sent the UN a list of demands that must be met or else the world will be "submitted to the wrath of Netham45's Lobster Army". Such demands include >9001 crates of peanuts, sacrificial blue lobsters, and a wide assortment of cherry flavored items. With such computing power stored in the hands of such people, we can only hope these demands are met.

In the wake of these events, we can only ask, Why? Why do these people make these demands, what caused them to gather, and what are their future plans...

Offline DrDnar

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 546
  • Rating: +97/-1
    • View Profile
Re: The Beauty of Mathematics
« Reply #6 on: July 21, 2011, 07:23:21 pm »
Make a plot of the length of all Roman numerals less than some value and you get a bell curve.

EDIT: Code for the lazy:
Code: [Select]
FUNCTION decToRom$ (num AS INTEGER)
DIM rom AS STRING
DIM dec AS INTEGER
DIM i AS INTEGER
DIM j AS INTEGER
DIM x AS INTEGER

dec = num + 1 - 1 ' Bonus points if you can explain why this is here.


IF dec < 1 OR dec > 3999 THEN ERROR 5

i = 1
DO WHILE dec / 10 > 0
    x = dec - INT(dec / 10) * 10 ' Mod is for losers.
    dec = INT(dec / 10)
    IF x >= 1 AND x <= 3 THEN
        FOR j = 1 TO x
            rom = romchar(i) + rom
        NEXT j
    END IF
    IF x = 4 THEN rom = romchar(i) + romchar(i + 1) + rom
    IF x = 5 THEN rom = romchar(i + 1) + rom
    IF x >= 6 AND x <= 8 THEN
        FOR j = 1 TO x - 5
            rom = romchar(i) + rom
        NEXT j
        rom = romchar(i + 1) + rom
    END IF
    IF x = 9 THEN rom = romchar(i) + romchar(i + 2) + rom
    i = i + 2
LOOP
decToRom$ = rom
END FUNCTION

FUNCTION romchar$ (quark AS INTEGER)
romchar$ = MID$("IVXLCDM", quark, 1)
END FUNCTION
« Last Edit: July 21, 2011, 07:28:28 pm by DrDnar »
"No tools will make a man a skilled workman, or master of defense, nor be of any use to him who has not learned how to handle them, and has never bestowed any attention upon them. . . . Yes, [] the tools which would teach men their own use would be beyond price."—Plato's The Republic, circa 380 BC

Offline apcalc

  • The Game
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1393
  • Rating: +120/-2
  • VGhlIEdhbWUh (Base 64 :))
    • View Profile
Re: The Beauty of Mathematics
« Reply #7 on: July 21, 2011, 07:30:08 pm »
Wow!  Math can be amazing at many, many times.  Those images are truly beautiful! :D


Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: The Beauty of Mathematics
« Reply #8 on: July 21, 2011, 09:03:13 pm »
@Darl: I used Chaosope to generate the second and third pictures. There are a lot of other attractor/fractal generating packages, but I find that one produces nice images without too much fuss. The first and fourth pictures were generated using Mathematica, which I don't recommend purchasing unless you have some means of obtaining it for free/small cost (generally schools or piracy).

I want a 3D Game of Life Generator now! :P

Here you go. Requires Golly, Blender, and Python.

@DrDnar: I presume that the Dec+1-1 somehow detects/fixes integer overflow? Anyway, while the mathematics behind Gaussians are very elegant and pretty, I made a conscious choice not to include them because they don't generally look terribly impressive.
« Last Edit: July 21, 2011, 09:04:32 pm by Qwerty.55 »
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline DrDnar

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 546
  • Rating: +97/-1
    • View Profile
Re: The Beauty of Mathematics
« Reply #9 on: July 21, 2011, 10:03:26 pm »
Nope. I put it there because QuickBASIC uses pass-by-reference by default.
"No tools will make a man a skilled workman, or master of defense, nor be of any use to him who has not learned how to handle them, and has never bestowed any attention upon them. . . . Yes, [] the tools which would teach men their own use would be beyond price."—Plato's The Republic, circa 380 BC

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: The Beauty of Mathematics
« Reply #10 on: July 22, 2011, 12:50:28 am »
That's (part of) why I love math :)

And there's another beauty outside the graphs. Aren't equations like eπi+1=0 just amazing to think about? Even with all those proofs, many of which aren't even that advanced, I still can't wrap my head around the idea.

The last pic shows a ship of the "Replicatoren" (german) of Stargate SG1!

lol :P

I want a 3D Game of Life Generator now! :P

Plot three dimensions against time O.O
« Last Edit: July 22, 2011, 12:51:48 am by Deep Thought »




Offline p2

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 849
  • Rating: +51/-11
  • I'm back :)
    • View Profile
Re: The Beauty of Mathematics
« Reply #11 on: July 22, 2011, 01:17:29 pm »
This is a Replikator:

















I only know these three types of Replikatoren-ships, but it looks like a ship of them, too!
*insert supercool signature*

Offline Scipi

  • Omni Kitten Meow~ =^ω^=
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1547
  • Rating: +192/-3
  • Meow :3
    • View Profile
    • ScipiSoftware
Re: The Beauty of Mathematics
« Reply #12 on: July 22, 2011, 04:23:12 pm »
Replicators were the awesomest enemies in the series. :P Even the Ori would have trouble with them.

Here's something else the Game of Life can do:

Spoiler For Spoiler:


It can make you lose :P
« Last Edit: July 22, 2011, 05:08:25 pm by HOMER-16 »

Imma Cat! =^_^= :3 (It's an emoticon now!)
Spoiler For Things I find interesting:
Spoiler For AI Programming:
Spoiler For Shameless advertising:

Spoiler For OldSig:





Spoiler For IMPORTANT NEWS!:
Late last night, Quebec was invaded by a group calling themselves, "Omnimaga". Not much is known about these mysterious people except that they all carried calculators of some kind and they all seemed to converge on one house in particular. Experts estimate that the combined power of their fabled calculators is greater than all the worlds super computers put together. The group seems to be holding out in the home of a certain DJ_O, who the Omnimagians claim to be their founder. Such power has put the world at a standstill with everyone waiting to see what the Omnimagians will do...

Wait... This just in, the Omnimagians have sent the UN a list of demands that must be met or else the world will be "submitted to the wrath of Netham45's Lobster Army". Such demands include >9001 crates of peanuts, sacrificial blue lobsters, and a wide assortment of cherry flavored items. With such computing power stored in the hands of such people, we can only hope these demands are met.

In the wake of these events, we can only ask, Why? Why do these people make these demands, what caused them to gather, and what are their future plans...

Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: The Beauty of Mathematics
« Reply #13 on: July 22, 2011, 05:18:04 pm »
Aw, that's cheating. You actually have to make a pattern that displays that, like the Golly ticker pattern. ;D
« Last Edit: July 22, 2011, 05:18:16 pm by calcdude84se »
"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Spoiler For "PartesOS links":
I'll put it online when it does something.

Offline Scipi

  • Omni Kitten Meow~ =^ω^=
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1547
  • Rating: +192/-3
  • Meow :3
    • View Profile
    • ScipiSoftware
Re: The Beauty of Mathematics
« Reply #14 on: July 22, 2011, 05:19:48 pm »
I don't have to, I have a program that does it for me :P

http://tlrobinson.net/blog/2009/02/07/game-of-life-generator/

Imma Cat! =^_^= :3 (It's an emoticon now!)
Spoiler For Things I find interesting:
Spoiler For AI Programming:
Spoiler For Shameless advertising:

Spoiler For OldSig:





Spoiler For IMPORTANT NEWS!:
Late last night, Quebec was invaded by a group calling themselves, "Omnimaga". Not much is known about these mysterious people except that they all carried calculators of some kind and they all seemed to converge on one house in particular. Experts estimate that the combined power of their fabled calculators is greater than all the worlds super computers put together. The group seems to be holding out in the home of a certain DJ_O, who the Omnimagians claim to be their founder. Such power has put the world at a standstill with everyone waiting to see what the Omnimagians will do...

Wait... This just in, the Omnimagians have sent the UN a list of demands that must be met or else the world will be "submitted to the wrath of Netham45's Lobster Army". Such demands include >9001 crates of peanuts, sacrificial blue lobsters, and a wide assortment of cherry flavored items. With such computing power stored in the hands of such people, we can only hope these demands are met.

In the wake of these events, we can only ask, Why? Why do these people make these demands, what caused them to gather, and what are their future plans...