Simple Code As An Algorithm To Generate Nature

Page 1

1 of 13 Simple Code As An Algorithm To Generate Nature by Ian Beardsley copyright © 2016 by Ian Beardsley (February 4, 2016)


2 of 13 The Code


3 of 13 print("The basic substances from which life formed on early earth are: ") print("CH4 (Methane), NH3 (Ammonia), H2O (water), H2 (hydrogen gas)") print("The idea of Wolfram is if we can describe something complex,...") print("with a few short lines of source code, then ") print("this can be an alternative to using mathematics ") print("to describe Nature. ") print("Because these substances from which life are made of, ") print("elements 6 (C), 7 (N). 8(O) of the period table and H, ") print("a simple loop can be written, because the C, N, and O, ") print("progress in increments of one, while the H decrements. ") print("as such we write code to make the pyramid of life.") k=4; x=1; z=4; while (x!=k): x=x+1 z=z-1 print(x*"H"+z*"C"); print("Where we say HH=H2, HHH=H3, HHHH=H4, and,...") print("CCC = O, CC = N, and C = C.") print("Cellular Automata For The Ductile Conducting Wires") print("Cu=1, Ag=2, Au=3") x=0 while (x!=3): x=x+1 print(str(x)) print("The regular tessellators are the regular geometries that can") print("cover a surface without leaving gaps.") print(" ") print("regular hexagon:") x=0 while (x!=3): x=x+1 if (x==1 or x==3): print(2*" "+"***"+" ") if (x==3): break; print("*"+5*" "+"*") print("regular triangle (equilateral triangle):") z=0 print(3*" "+"*"+2*" ")


4 of 13 while (z!=2): z=z+1 print(3*" ") print("*"+5*" "+"*") print("regular parallelagram (square):") y=0 while (y!=3): y=y+1 if (y==1 or y==3): print("*"+3*" "+"*") if (y==3): break; print(4*" ") print("Pythagoras thought the tetractys was the key to the universe") print("It is the triangle such that: 1, 1+1=2, 2+1=3, 3+1=4") print("which is 1+2+3+4=10") print(" ") y=4 x=0 while (x!=4): x=x+1 y=y-1 print(y*" "+x*"* ") print ("It is useful to make the code, "); print ("that produces the four molecular structures, "); print ("of the hydrocarbons, which make up organic substances."); print print print print print print print print print print print print print print print print print print print print

(" "); (" "); ("Arenes"); (" "); (" "); (" "); (" "); (" | "); (" C "); ("--C = --C --"); (" | || "); ("--C C --"); (" = C-"); (" | "); (" "); (" "); (" "); ("Alkanes"); (" "); (" ");


5 of 13 print print print print print print print print print print print print print print print print print print print print print print print print print print print print print print print print print print print print print print print print print print print print print print print print print

(" "); (" | | "); (" -- C -- C -- "); (" | | "); (" "); (" "); (" "); ("Alkenes"); (" "); (" "); (" "); (" | | "); (" -- C = C -- "); (" "); (" "); (" "); ("Alkynes"); (" "); (" "); (" "); (" -"); ("-- C -- C -- "); (" -"); (" "); (" "); (" "); ("We define galaxies in their classification scheme"); ("with source code:"); (" "); (" "); (" "); ("Barred Spiral Galaxy (SBc)"); (" "); (" "); (" "); (2*" " + "*" ); ("*"); (2*"*"+10*" " +2*"*"); (7*"*"+12*" "+7*"*"); (12*" "+2*"*"+10*" "+2*"*"); (25*" "+ "*"); (24*" "+"*"); (" "); (" "); (" "); ("Spriral Galaxy (Sc)"); (" "); (" "); (" ");


6 of 13 print (25*" "+ "*"); print (33*" "+"*"); print (35*" "+"*"); print (9*" "+"*"+" " +"*"+24*" " + "*"); print (6*" "+4*"*"+10*" "+ 2*"*"+13*" "+2*"*"); print (4*" "+3*"*"+12*" "+4*"*"+11*" "+3*"*"); print (3*" "+2*"*"+15*" "+2*"*"+10*" "+4*"*"); print (4*" "+24*" " +"*"+" "+"*"); print (6*" "+"*"); print (9* " "+"*"); print (15*" "+"*"); print(" "); print (" "); print (" "); print ("Elliptical Galaxy (E0)"); print (5*" "+"*"); print (4*" "+3*"*"); print (5*" "+ "*"); print ("water chemistry:"); print (" "); print (" "); print (2*"H"+"O"+2*" "+2*"H"+"O"+2*" "+"O"+"="+"2-"); print ("-HH"+ " " + "-O"+2*" "+"H"+"="+"+"); print ( " O"+" "+ "HH"+" "+ "=""Neutral H2O"); print (" "); print (" "); print ("Dehydration Synthesis"); print ("HHO"+" "+"HHO"); print ("-OH"+" "+"-H" ); print ("H+" +" "+" OH-"); print ("Neutral HHO=H2O"); print (" "); print (" "); print ("Hyrolosis"); print (" "); print (" "); print ("HHO"); print ("OH-"+" "+"H+"); print ("+H+"+" "+"+OH-"); print ("H2O and H2O�); print(" ")


7 of 13 print("i1=Boron") print("j =Silicon") print("i2=Gallium") print("k1=Nitrogen") print("k2=Arsenic") print("integrated circuitry") print(" ") x=0 while (x!=3): x=x+1 if (x==1 or x==3): print("i"+" "+"k") if (x==3): break; print(" "+"j"+" ")  


8 of 13

Running The Code 


9 of 13


10 of 13


11 of 13


12 of 13


13 of 13

The Author


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.