leonardo - January 12th, 2008
View:Recent Entries.
View:Archive.
View:Friends.
View:User Info.
View:Website (My Website).
Missed some entries? Then simply jump to the previous day or the next day.

Tags:, ,
Subject:Links, Wolfram demonstrations
Time:01:58 am
FreeArc may become the next free widespread compressor:
http://sourceforge.net/projects/freearc/

Old notes regarding the iteration of collections:
http://home.pipeline.com/~hbaker1/Iterator.html

This site is growing, it shows how to solve common little programming tasks in many languages:
http://www.codecodex.com/wiki/index.php?title=Main_Page

------------------------

Mathematica is a commercial software, and its syntax is bad if you want to use it to program, but it has lot of capabilities and its visualization features are quite flexible. Lately they have added GUI widgets too, so you can use it to write little interactive applications. Here you can find almost 2300 of such tiny applications with GUI, Wolfram demonstrations project:
http://demonstrations.wolfram.com/

Among them you can learn lot of bits of basic computer science and mathematics, it's a mine. Here are some of the ones I have found more interesting:

http://demonstrations.wolfram.com/SurvivalOfTheQuasispecies/
http://demonstrations.wolfram.com/EmbryonicCleavage/
http://demonstrations.wolfram.com/IterativePolygonSimplification/
http://demonstrations.wolfram.com/OneTermNestedlyRecursiveFunctions/
http://demonstrations.wolfram.com/PassiveSonar/
http://demonstrations.wolfram.com/AreaBisectorsViaMonteCarlo/
http://demonstrations.wolfram.com/TouchingPolygonConcurrence/
http://demonstrations.wolfram.com/LocalGrowthInAnArrayOfDisks/
http://demonstrations.wolfram.com/TexturePerceptionPatterns/
http://demonstrations.wolfram.com/ImageCompressionViaTheSingularValueDecomposition/
http://demonstrations.wolfram.com/GabrielsHorn/
http://demonstrations.wolfram.com/PrimeGeneratingCellularAutomaton/
http://demonstrations.wolfram.com/CanonicalPolygons/
http://demonstrations.wolfram.com/IntrinsicallyDefinedCurves/
http://demonstrations.wolfram.com/SubstitutionSystemsInTwoDimensions/
http://demonstrations.wolfram.com/DoublingCellularAutomata/

http://demonstrations.wolfram.com/SortingNetworks/
Related:
http://blog.wolfram.com/2007/08/the_space_of_all_possible_bridge.html


Few of them have made me write similar Python code (it uses my baseconvert, to convert among different bases, and primes_list(n) that gives the first n primes):

http://demonstrations.wolfram.com/BinaryPatternsOfIntegerFunctions/
The Python code:
from baseconvert import baseconvert as bc
to2 = lambda n: bc(n, outbase=2, outdigits=" #")

from primes import primes_list as pri
for p in pri(200): print to2(p).rjust(20)
This is part of the output, you can see very nice patterns:
      # 
      ##
     # #
     ###
    # ##
    ## #
   #   #
   #  ##
   # ###
   ### #
   #####
  #  # #
  # #  #
  # # ##
  # ####
  ## # #
  ### ##
  #### #
 #    ##
 #   ###
 #  #  #
 #  ####
 # #  ##
 # ##  #
 ##    #
 ##  # #
 ##  ###
 ## # ##
 ## ## #
 ###   #
 #######
#     ##
#   #  #
#   # ##
#  # # #
#  # ###
Other patterns can be seen in the binary representation of the Fibonacci numbers:
from comb import fibonacciList as fibs
for f in fibs(100): print to2(f).rjust(70)
This is part of the output:
                 #
                # 
                ##
               # #
              #   
              ## #
             # # #
            #   # 
            ## ###
           # ##  #
          #  #    
          ### #  #
         # ####  #
        #  ##   # 
        #### ## ##
       ##   #### #
      # #    ##   
     #     # # # #
     ## #  ## ## #
    # # # ##    # 
   #   # #  # ####
   ## ########   #
  # ## # #  #     
 #  #  # #   #   #
 ### ## #   ##   #
# ######## #    # 

More patterns can be found with this simple rule, adding a number to the inverted base-2 representation of itself:
http://demonstrations.wolfram.com/ReversalAdditionSystems/
from baseconvert import baseconvert as bc
to2 = lambda n: bc(n, outbase=2, outdigits=".#")

n = 16 # 35 59 83 155
for i in xrange(35):
    print to2(n)
    n += int(bc(n, outbase=2)[::-1], 2)
This the output (if you print more lines you can see more interesting patterns, they become very cyclic later, for n = 16):
#....
#...#
#...#.
##..##
##..##.
#..##..#
#..##..#.
###..#.##
##.###..#.
#..#.#.##.#
#.#..#.#.##.
#....#####.##
#.##..##.###..
###.###.#.#..#
##....#..#.....
##...##.##...##
##...##.##...##.
#..#.#.#...#.#..#
#..#.#..#.##.#..#.
##.############.##
##.############.##.
#.#..###########...#
#..##.#########.#.##.
#.....#########.#.####
#.####..#######.###....
##..#.########.#.#.##.#
##......#.#####.#.......
##....#...###.###.....##
##....#.....#.#####...##.
#..#..#.#####.#.......#..#
#..#...##...#...###.#.#..#.
##.###...##.#.##...##.##.##
##.##.####....#.####...#.##.
#.#...#..#.##.###..#.####...#
#..##...##.#.#.#..##.#..##.##.
From such things you can see how much close are the usual cellular automata to the normal integer operations like the sum following a bit inversion...
comments: Leave a comment Add to Memories Tell a Friend

Advertisement

leonardo - January 12th, 2008
View:Recent Entries.
View:Archive.
View:Friends.
View:User Info.
View:Website (My Website).
Missed some entries? Then simply jump to the previous day or the next day.