[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/sci/ - Science & Math


View post   

File: 233 KB, 800x755, Screen shot 2012-01-29 at 3.44.37 AM.png [View same] [iqdb] [saucenao] [google]
4306063 No.4306063 [Reply] [Original]

Math is truly beautiful
I was pretty bored so I decided to graph the Ulam spiral in Java

its a 800x800 matrix, the red dots are prime numbers, and the circles are composite numbers (their radius is one tenth of the amount of divisors the number has, in pixels)

The result is quite beautiful...

>> No.4306071

That's....actually pretty cool

>> No.4306072
File: 144 KB, 798x754, Screen shot 2012-01-29 at 2.56.34 AM.png [View same] [iqdb] [saucenao] [google]
4306072

Here is the same Ulam Spiral but without the composite numbers... you can see a lot of diagonals forming, and a couple of weird horizontal/vertical asymptotes (while the Composite numbers have diagonal sort-of asymptotes)

>> No.4306079

I have to agree, I have just been taking in this picture and the only word to describe it beautiful.

>> No.4306077

>>4306071
Tell me two colours
or three if you want to change the white background

I'm gonna try doing it in a 1280x800 grid so I can make a wallpaper

>> No.4306087

for anyone interested

http://en.wikipedia.org/wiki/Ulam_spiral

>> No.4306099

Some cool work with prime spirals, complete with great visuals.
http://www.divisorplot.com/6.html

>> No.4306111

put that source up

>> No.4306116

it's a bunch of dots

>> No.4306120
File: 459 KB, 1280x1007, Screen shot 2012-01-29 at 4.03.06 AM.png [View same] [iqdb] [saucenao] [google]
4306120

This one is quite bigger, 1280x1000 (just for a 1280x800 wallpaper with some trimming hehe)

Panel class
http://pastie.org/3274799
Main class
http://pastie.org/3274793

My method for finding primes is shit

>> No.4306121

Looks gay, OP.

Are you gay?

>> No.4306122
File: 592 KB, 1282x1006, Screen shot 2012-01-29 at 4.08.15 AM.png [View same] [iqdb] [saucenao] [google]
4306122

>>4306116
its SCIENCE

>> No.4306133

>>4306120
thanks man

>> No.4306140
File: 467 KB, 1280x1007, Screen shot 2012-01-29 at 4.21.54 AM.png [View same] [iqdb] [saucenao] [google]
4306140

This one I like

>> No.4306146

Cool

>> No.4306179

this looks beautiful
indeed maths are beautiful, specially when they get some sort of cool visual representation

>> No.4306184

What's it look like if you spiral starting with 1 in the upper left, then going around the outside and ending in the center?

>> No.4306208
File: 2.02 MB, 2007x2007, the_rational_numbers_by_maximal_ideal-d2zk5pi.jpg [View same] [iqdb] [saucenao] [google]
4306208

Rational Numbers

>> No.4306216

>>4306184
it must have a completely varying result, depending on the dimensions of the square.

starting on the center does not vary, with high scales stuff begins to form, but maintains the same structure overall

>> No.4306220

>>4306208
What about them?

>> No.4306223

>>4306208
Primes > Rationals

>> No.4306233

I'm gonna try doing it in a 1280x800 grid so I can make a wallpaper
>1280x1800
such low quality
recommended you double it

>> No.4306241

>>4306208

No fucking way.

>> No.4306245

>>4306233
The problem is that I don't know how to save the image from Java's panel into a file, I have to take screenshots, so I have to resort taking 1280x800 screenshots (laptop res) or stitching stuff very poorly and time consuming (like that 1280x1000 I did)

if there was a way to put whats painted on the Java panel into a file, I'd fire it up until 2048x2048 and have the program save the file itself

>> No.4306252

>>4306208
explain

>> No.4306260
File: 66 KB, 437x818, CollatzConjectureGraphMaxValues.jpg [View same] [iqdb] [saucenao] [google]
4306260

>> No.4306463

Has anyone tried to perform an Ulam Spiral using other planar tilings? Squares tile the plane. So do triangles and hexagons. So do an Ulam Spiral using hexagons, for instance.

>> No.4306764
File: 125 KB, 460x460, surrealpaterns.png [View same] [iqdb] [saucenao] [google]
4306764

I did the same as op once but for surreal numbers.

>> No.4306769

BOOMP! Still looking for an Ulam Spiral performed for other planar tilings.

>> No.4307377

>>4306764
what program or programming language/libraries did you use for this?

>> No.4307388

>>4306769
your best bet would be one with

5 4 3
6 1 2
7 8 9...
the diference is that above the central horizontal line, the lines are shifted to the left, and below, shifted to the right, so its like having a inclined plane. will look about it later and post results

>> No.4307390

>Java

>> No.4307530

You niggers need to post your code. This is really interesting.

>> No.4307617

>>4307388
shit, its

5 4 3
   6 1 2
      7 8 9...
>>4307390
tell me then about a language that allows to do even the most basic graphic stuff (like drawing a square with x1,y1,x2,y2 coordinates, drawing a circle with x,y coordinates and radius, or drawing a line. with that, I'm set)

I'm already tired of doing this with Java.

>>4306120
code is here, two small classes.

>> No.4307790

The fouriertransform also looks nice (i took a picture from wiki, looks slightly better then yours)

Also you could try python instead of java, its much easier for drawing simple stuff

>> No.4307792
File: 220 KB, 1024x1024, FFT of Spirale_Ulam_150.jpg [View same] [iqdb] [saucenao] [google]
4307792

forgot the picture

>> No.4307822
File: 784 KB, 2048x2048, test.png [View same] [iqdb] [saucenao] [google]
4307822

>>4307792
awesome
I finally found out how to make Java dump the rendered 2d image into a file

>> No.4308052

>>4307792
can you explain me what FFT is?

>> No.4308068

>>4308052
http://en.wikipedia.org/wiki/Fast_fourier_transform

>> No.4308076 [DELETED] 

>>4307790
>python

and slower, great trade off!

>> No.4308082

dots everywhere, whats the point?

>> No.4308084
File: 13 KB, 1262x636, thomae.png [View same] [iqdb] [saucenao] [google]
4308084

Not mine but kind of cool: Thomae's function, continuous at the irrationals but discontinuous everywhere else.

>> No.4308085

>>4308082
*What is a "point"?

>> No.4308086

>>4307790
show an example

>> No.4308188

>>4308086
here, its right after the post
>>4307792

>> No.4309234

>>4307617
Octave

>> No.4309244

math's beauty is comprised of its forms and functions, and it's amazing how we can see a strange form of this beauty in our most primitive perception: the visual. humans just love pretty patterns.

>> No.4309244,1 [INTERNAL] 

I wonder if you'd all humor a complete noob for a moment? I have had a look at the code above for generating ulam spirals in java and for the life of me I can't figure out how to double,quadruple, etc. etc. it to generate more intricate arrays. Can anyone maybe help me out? I tried adjusting the "mat = new int" dimensions, as well as the "while(cont<" number and I just keep getting bugs! Either that, or the window clips any array bigger than 1280X1050! Can any of you guys maybe tell me which variables in the code I'd need to modify in order to make a more detailed array that will fit in a 1280X1050 window? Or even better, what variables control what? Sorry to be a bother!