Downloadable Programs

by Ed Pegg Jr.

There are lots of resources available for those who want to try programs.

NKS Forum

Many of the items in the NKS Forum have downloadable programs.  For example, I've posted code for the all the art seen here at the conference.

http://forum.wolframscience.com/showthread.php?s=&threadid=317

DensityPlot[
        Abs[1/(x + I y) 220 - 
            Floor[1/(x + I y) 220]], {x, -220, 220}, {y, -220, 
          220}, PlotPoints -> 400, ColorFunction -> Hue, 
        Mesh -> False, Frame -> False];

Stephen Wolfram has put several of his experiments on the forum:

http://forum.wolframscience.com/showthread.php?s=&threadid=107

wolframscience.com/downloads/

Programs from the Notes

This page gives access to the programs in the Notes at the end of A New Kind of Science. Included are both verbatim code from the book and complete runnable functions with examples. 

Here is an example from the chapter 4 downloads.

({{Gray code, (page 901)}})

\(\(\(GrayCode[m_] := 
      Nest[Join[#, Length[#] + Reverse[#]] &, {0}, m]\)\(
\)
    \)\)
BitXor[i, Floor[i/2]]

GrayCode[m_] := 
      Nest[Join[#, Length[#] + Reverse[#]] &, {0}, m]

GrayCode[4]

Table[BitXor[i, Floor[i/2]], {i, 0, 15}]

Further information on Gray Codes available at MathWorld.

mathworld.wolfram.com

Mathworld has thousands of downloadable programs.  For example, we can look at an exploration I did of two dimensional Turing Machines, often called Turmites. (see NKS page 930).

We can look at http://mathworld.wolfram.com/Turmite.html.  There, we can find downloadable code.

PixelPerfect[
      Transpose[
        Flatten[Map[
            Function[x, 
              Transpose[
PadCenter[NestWhile[
                      moundstep[#, myturmites[[x]]] &, mound, 
                      Length[#] > 1  &, 1, 1000000][[1]], {131, 
                    131}]]], {18, 10, 9, 16}], 1]]]

functions.wolfram.com

Michael Trott has made extensive amounts of code available.  For example, we can look at his code for the Sine function.

Show[{lcpRe, lcpIm},
      DisplayFunction -> $DisplayFunction,FrameLabel -> {"x","y"},
      FrameTicks -> {xTicks, yTicks, None, None}];

Mathematica Information Center

This is what I run.  Thosands of programs are available, of all sorts.  For example, here is a piece I did in an exploration of flu epidemics.

http://library.wolfram.com/infocenter/MathSource/4906/

Show[ApplyColorScheme[L03Picture]];

NKS Summer School

The NKS Science group made a number of programs for the NKS Summer School, and many of them are available for download.

Show[
        NiceRasterGraphics[
          Transpose[
            Table[IntegerDigits[Fibonacci[n], 2, 440], {n, 1, 
                615}]]]];

Summary

We have lots of programs.  If you have a program, then I want to hear about it.