text:
Golfing for Domino Day
Given a setup of dominoes your task is to figure out which dominoes fall and which don't.
Input
Take a rectangular ASCII representation of a domino setup. The following characters are used for the ASCII grid:

 (space): empty cell
|, -, /, \: dominoes

Dominoes can fall in 8 directions, which are represented by the following letters (similar to WASD orientations):
Q W E
A   D
Z X C

One or more of the dominoes will be replaced by one of these letters to indicate that the domino is pushed over at the start. Here is an example:
D||||/
  -   /
  -    -
  -    -
  /|||||

I don't want this challenge to turn into an exercise in input parsing so any of the following input forms are allowed:

A string with the grid (optionally preceded by its dimensions if that helps)
An array/list/tuple with one string for each line (optionally along with width and height integers)
A (nested) array/list/tuple with one string/character for each grid cell (optionally along with width and height variables)

You can read from STDIN or take a function argument or even expect the input to be stored in a variable.
Output
Write to STDOUT or return (or save in a variable) the resulting grid in any of the valid input formats, indicating which dominoes have fallen and which haven't. That is, replace each fallen domino with # and leave each standing domino as it was in the input.
Rules
Of course, dominoes propagate their fall through the setup. As there may be race conditions, we assume that there are fixed time steps and the falling propagates one grid cell per time step.
Dominoes generally fall the way you would intuitively expect them to, but a rigorous specification of common sense turns out to be quite lengthy. Sorry for that, I hope the examples help. Here is a gist with all unique two-tile combinations (up to rotation and reflection). Read on for the rigorous rules.
Each domino can fall in only two directions:
           W       Q          E
A | D      -        /        \
           X         C      Z

Whenever a domino falls it affects the cell in the direction of the fall. If that cell contains a domino which can fall in the same direction or in a direction which differs by 45 degrees, that domino does so in the next time step.
Examples:
D|    ->    DD      (falls in same direction)

D/    ->    DC      (falls at 45 degrees)

C     ->    C       (falls at 45 degrees)
 -           X

Whenever a diagonally oriented domino (/ or \) falls, it also affects the two cells which touch both its cell and the cell in the direction of its fall. If these cells contain a domino which can fall in the same direction as the original domino, or in the axis-aligned direction away from it, that domino does so in the next time step.
Examples:
C/     ->   CC      (the cell in the direction of the fall is the one below
                     the /, so it falls in the same direction)

C|     ->   CD      (falls in the axis-aligned direction away from the C)

C-     ->   C-       (the direction away from the Q is W,
  or                  but neither - nor \ can fall to W)
C\     ->   C\

Exception: if a domino is pushed in both valid directions at once (i.e. if any of the above rules are in conflict), it doesn't fall.
Examples:
D|A   ->    D|A     (central domino in pushed in both directions)

  Z           Z     (although it's pushed in one direction by two dominoes
D\A   ->    D\A      and in the other by only one, it doesn't fall)

 X           X      (the domino is being pushed from two opposing sides
D-A   ->    DXA      D and A, but neither is valid for that domino. Hence,
                     there is no conflict and the X can push the domino over)

 Z           Z      (pushed in the same direction by two dominoes, so falls)
\A    ->    ZA

   Z           Z           Z    (once the conflict arises, the affected
  \   ->      Z   ->      Z      domino is locked in its position and can't
D|A         D|A         D|A      be pushed over by future dominoes)

Examples
8 5
D||||/            ######
  -   /             -   #
  -    -    -->     -    #
  -    -            -    #
  /|||||            /|||||

===============================================

17 9
E|/|||/                    #######
  -   -                      #   #
  -   -                      #   #
  -   -                      #   #
  /|||/|||||||||/    -->     ###############
       /        -                 #        #
        /       -                  #       -
         /      -                   #      #
          /|||||\                    #######

===============================================

19 8
       \|/                        ###
       - -                        # #
D||||/|\ /|||/             ######## #####
      /      -                   #      #
       -    \-       -->          -    \#
      \-   \ -                   #-   \ #
D||||\ /  \  /             ###### /  \  #
        |\    |||||                |\    #####

==============================================

11 11
-\\\/|\|\-|         -\##/|###-|
-|\\||\-|\-         -|#####-|\-
|\//\//|-/-         |#//\//|#/-
\|//|-|\-\|         #####-|##\|
---||/-\//|         #-######//|
///|||\----   -->   #/#####----
-|/---|-|-\         #|##--|-|-\
--|--\/|///         ####-\/|///
/|//--|//-|         ####--|//-|
|/\-|||-/-\         |/\####-/-\
E||\-|\---/         ####-|\---/

Let me know if you think I made a mistake (especially with the last one).

C# 1048 907 850bytes
Now heavily golfed, pretty much just a jumble of bit operations on a two-dimensional array of integer enums. Could probably be made somewhat shorter by using a 1-dimensional array, but I'm not prepared to try and re-work this at this point. Reads the dimensions and string from stdin, for example:
11 11 -\\\/|\|\-|-|\\||\-|\-|\//\//|-/-\|//|-|\-\|---||/-\//|///|||\-----|/---|-|-\--|--\/|////|//--|//-||/\-|||-/-\E||\-|\---/

Golfed:
using L=System.Console;class R{static void Main(){int p=255,e,c,E=7,D,C,X,Z,A,m=-1,t=m,f=t,u,i=t;for(;t<0;)for(t=f,f=0;(C=L.Read())>47;)f=f*10+C-48;var T=new int[f,t];for(;++i<f;)for(c=0;c<t;T[i,c++]=(C>99?68:C>91?34:C>89?112:C>87?56:C>86?131:C>80?193:C>68?7:C>67?14:C>66?28:C>64?224:C>46?136:C>44?17:0)*(C>64&C<91?1:257))C=L.Read();for(;i+E>0;E=-E)for(i=c=m;++c<f;)for(C=m;++C<t;){if(E>0&(A=D=T[c,C])>0&D<p){T[c,C]=m; X=C+(i=(D&4)>0?1:(D&64)/-64);Z=c+(u=(D&16)>0?1:D%2*m);System.Action v=()=>{if(Z>m&Z<f&X>m&X<t&&(e=T[Z,X])>p&(e>>8&A)>0)T[Z,X]&=65280|A;};v();if((i&u)!=0){X=i==u?C:X;Z=i==u?Z:c;A=((D&128)/128+D*2)&D;v();X=C+i-X+C;Z=c+u-Z+c;A=(D%2*128+D/2)&D;v();}i=8;}if(E<0&D>p&((D=D&p)&(D-1))<1&D>0)T[c,C]=D<2?131:D>64?193:D/2*7;}for(D=m;++D<f;L.WriteLine())for(c=0;c<t;L.Write(C<0?'#':(C=C>>8)>99?'/':C>67?'|':C>33?'\\':C>9?'-':' '))C=T[D,c++];}}

Because I have too much time I've modified the ungolfed version to output an animated gif of the dominoes falling (with help from this SO question and these documents 1 2). This has only added code, and it's either in a #if gifness block or clearly marked.
To create the gifs you provide a pair of command line arguments describing the frame times, output file, etc,
dominoGolf.exe console_delay (out_file_name (gif_frame_time (final_frame_time)))
dominoGolf.exe 0 outfile.gif 1 100

The third argument is the frame time for each frame (1/100s of seconds). The fourth argument is the frame time for last frame (1/100s of seconds). The second argument is the output filename for the gif. You can omit the filename, delay, and final delay if you just want the console output. The first argument is a delay between frames rendered to the terminal in milliseconds. You can omit all arguments if you don't want an animation at all and just want to see the result. It reads the domino data from stdin just like the golfed version. This code is horrible in it's own way (butchers the gif so that it loops).
Ungolfed gif-generating code:
#define gifness

using L=System.Console;

class R
{
    static void Main(string[] args) // don't need args
    {
        int p=255,P=0xFF00,m=15,M=240, // might be able to inline a couple of these
        w=1,e=2,d=4,c=8,x=16,z=32,a=64,q=128, // most of these are reusable
        W=131,E=7,D=14,C=28,X=56,Z=X*2,A=Z*2,Q=193, // most (all?) of these are reusable
        Y=w+x,U=a+d,N=c+q,B=z+e, // one of these atleast is pre-evalable

        // recognise this?
        t=-1,f=t,k,u,i=t,j,J,K,o,O,b;
        for(;t<0;)
            for(t=f,f=0;(k=L.Read())>47;)
                f=f*10+k-48;

        var T=new int[f,t]; // main arr
        // domino: dir, copy(for render)
        // motion: pickup

        // input
        for(;++i<f;) // values of i and j don't matter, just counters
        {
            for(j=0;j<t;) // increment done 3down
            {
                k=L.Read();
                T[i,j++]=(
                // fallen
                k=='W'?W:k=='E'?E:k=='D'?D:k=='C'?C:k=='X'?X:k=='Z'?Z:k=='A'?A:k=='Q'?Q:
                // dominos
                k==' '?0:k=='-'?Y:k=='/'?N:k=='|'?U:B // ASCII, order for >
                )*(k>64&k<91?1:257);
            }
        }

        #if gifness
        System.Drawing.Font font1 = null;
        System.Windows.Media.Imaging.GifBitmapEncoder genc = null;
        System.Drawing.Bitmap bmp = null;
        System.Drawing.Graphics g = null;
        if (args.Length > 1)
        {
            font1 = new System.Drawing.Font(System.Drawing.FontFamily.GenericMonospace, 12, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
            genc = new System.Windows.Media.Imaging.GifBitmapEncoder();
            bmp = new System.Drawing.Bitmap(t * 8, f * 14); // I have no clue what these should be in relation to em size
            g = System.Drawing.Graphics.FromImage(bmp);
        }
        #endif

        if (args.Length > 0) // not important
        {
            L.Clear();
        }

        // main
        for(;i>0;) // can do i=1-i and swap setting 1 for 0 to remove {}
        {

            if (args.Length > 0) // non-critical, renders the current state to the console/gif
            {
                var os="";
                for (o=0;o<f;o++) // values of i and j don't matter, just counters
                {
                    for (j=0;j<t;j++)
                    {
                        k=T[o,j];
                        os += k==0?' ':k<p?'#':(k=k>>8)==Y?'-':k==N?'/':k==U?'|':'\\'; // order for >
                    }
                    os+="\n";
                }
                L.SetCursorPosition(0, 0);
                L.Write(os);

                #if gifness
                if (args.Length > 1)
                {
                    g.Clear(System.Drawing.Color.White);
                    g.DrawString(os, font1, System.Drawing.Brushes.Black, 0, 0);
                    System.IO.MemoryStream bms = new System.IO.MemoryStream();
                    bmp.Save(bms, System.Drawing.Imaging.ImageFormat.Gif);
                    var bmpf = System.Windows.Media.Imaging.BitmapFrame.Create(bms);
                    genc.Frames.Add(bmpf);

                    // do I chose the frame duraton1??!?!?! (take from args[2] is present else args[0])
                }
                #endif

                System.Threading.Thread.Sleep(int.Parse(args[0]));
            }

            // back to important stuff
            i=0; // set me to 1 if we do anything (8 in golfed version due to E being 7)

            // move motions
            for (j=0;j<f;j++) // careful!!
            {
                for (k=0;k<t;k++) // careful!!
                {
                    O=o=T[j,k];
                    if (o>0&o<p) // we are motion
                    {
                        T[j,k]=-1; // do this so we can't skip it

                        K=k+(i=((o&d)>1?1:(o&a)>0?-1:0));
                        J=j+(u=((o&x)>1?1:(o&w)>0?-1:0));

                        System.Action v=()=>{
                            if(J>=0&J<f&K>=0&K<t&&(b=T[J,K])>p&&((b>>8)&O)>0)
                            {
                                T[J,K]&=(P|O);
                            }
                        };

                        v();
                        if (i!=0&u!=0)
                        {
                            K=i==u?k:K; // k+i == K
                            J=i==u?J:j; // j+u == J
                            O=(((o&q)>0?w:0)+o*2)&o;
                            v();

                            K=K==k?k+i:k;
                            J=J==j?j+u:j;
                            O=(((o&w)>0?q:0)+o/2)&o;
                            v();
                        }

                        i=1;
                    }
                }
            }

            // move dominos
            for (j=0;j<f;j++) // careful!!
            {
                for (k=0;k<t;k++) // careful!!
                {
                    o=T[j,k];
                    if (o>p) // we are domino
                    {
                        o=o&p;
                        if ((o&m)<1!=(o&M)<1)
                        { // we have motion
                            T[j,k]=o==w?W:o==q?Q:o+o/2+o*2;
                        }
                    }
                }
            }
        }

        if (args.Length > 0)
        {
            L.SetCursorPosition(0, 0);
        }

        // output
        for (o=0;o<f;o++)
        {
            for (j=0;j<t;j++)
            {
                k=T[o,j];
                L.Write(k<0?'#':(k=k>>8)==0?' ':k==Y?'-':k==N?'/':k==U?'|':'\\'); // order for >
            }
            L.WriteLine();
        }

        #if gifness
        if (args.Length > 1)
        {
            g.Dispose();
            bmp.Dispose();

            System.IO.MemoryStream ms = new System.IO.MemoryStream();

            genc.Save(ms);
            byte[] data = ms.GetBuffer();
            byte[] netscape = { 0x21, 0xFF, 0x0B, 0x4E, 0x45, 0x54, 0x53, 0x43, 0x41, 0x50, 0x45, 0x32, 0x2E, 0x30, 0x03, 0x01, 0x00, 0x00, 0x00 };

            if (args.Length > 2)
            {
                int last = -1;
                int duration = int.Parse(args[2]);

                // promise yourself now you will never use this in production code
                // I've not read enough of the GIF spec to know if this is a bad idea or not
                for (i = 0; i < ms.Length - 5; i++)
                {
                    if (data[i] == 0x21 && data[i+1] == 0xF9 && data[i+2] == 0x04 && data[i+3] == 01)
                    {
                        data[i+4] = (byte)(duration & p); // something endian (least significant first)
                        data[i+5] = (byte)((duration & P) >> 8);
                        last = i+4;
                    }
                }

                if (last != -1 && args.Length > 3)
                {
                    duration = int.Parse(args[3]);
                    data[last] = (byte)(duration & p);
                    data[last+1] = (byte)((duration & P) >> 8);
                }
            }

            using (System.IO.FileStream fs = new System.IO.FileStream(args[1], System.IO.FileMode.Create))
            {
                fs.Write(data, 0, 13);

                // behold
                fs.Write(netscape, 0, netscape.Length);

                fs.Write(data, 13, (int)ms.Length - 13); // lets hope these arn't in excess of 2GBs
            }
        }
        #endif
    }
}

An example gif for the 3rd example input (and that shown above)

Example randomly generated 100x25 domino layout

"Domino" in dominoes

Python 1188
Basically just loops through continuously matching some hefty regex until it stops changing. It actually matches all the pushes of each direction separately (through regex), and then composes the different results making sure there are no conflicts and such.
The regex can probably be done much more compactly, but for now here is what I have (it assumes the grid is stored in a string, g, and the dimensions are in x and y):
import re;L='QWEADZXC';a='';m=(x*y+y);o=[0]*m;X='(.{%s})';t=X%x;u=X%(x+1);v=X%(x-1);R=range
def S(s,l):
 f=s
 for p,r in l:
    n=re.sub(p,r,s,flags=re.DOTALL)
    for i in R(len(n)):
     if n[i]!=s[i]:f=f[:i]+n[i]+f[i+1:]
 return f
while g != a:
 a=g;n='';d=[S(g,[(r'D\|','DD'),(r'D\\','DE'),('D/','DC')]),S(g,[(r'\|A','AA'),(r'\\A','ZA'),('/A','QA')]),S(g,[('-%sW'%t,r'W\1W'),(r'\\%sW'%t,r'E\1W'),('/%sW'%t,r'Q\1W')]),S(g,[('X%s-'%t,r'X\1X'),(r'X%s\\'%t,r'X\1Z'),(r'X%s/'%t,r'X\1C')]),S(g,[('C%s/'%u,r'C\1C'),('C%s-'%u,r'C\1X'),(r'C%s\|'%u,r'C\1D'),('C%s/'%t,r'C\1C'),('C%s-'%t,r'C\1X'),('C/','CC'),(r'C\|','CD')]),S(g,[(r'Z%s\\'%v,r'Z\1Z'),('Z%s-'%v,r'Z\1X'),(r'Z%s\|'%v,r'Z\1A'),(r'Z%s\\'%t,r'Z\1Z'),('Z%s-'%t,r'Z\1X'),(r'\\Z','ZZ'),(r'\|Z','AZ')]),S(g,[('/%sQ'%u,r'Q\1Q'),('-%sQ'%u,r'W\1Q'),(r'\|%sQ'%u,r'A\1Q'),('/%sQ'%t,r'Q\1Q'),('-%sQ'%t,r'W\1Q'),('/Q','QQ'),(r'\|Q','AQ')]),S(g,[(r'\\%sE'%v,r'E\1E'),('-%sE'%v,r'W\1E'),(r'\|%sE'%v,r'D\1E'),(r'\\%sE'%t,r'E\1E'),('-%sE'%t,r'W\1E'),(r'E\\','EE'),(r'E\|','ED')])]
 for i in range(m):
    c=0
    for r in d:
     if r[i]in L:
        if c==0:c=r[i]
        elif r[i]!=c:o[i]=1;break
    n+=g[i]if c==0 or o[i]else c
 g=n
print re.sub(r'\w','#',g)

More ungolfed:
import re

L = 'QWEADZXC'

def sub_all(string,lst):
    final = string
    for p,r in lst:
        new = re.sub(p,r,string,flags=re.DOTALL)
        for i in range(len(new)):
            if new[i]!=string[i]:
                final=final[:i]+new[i]+final[i+1:]
    return final

def dominoes(grid,x,y):
    print len(grid),x*y+y
    print grid

    last = ''
    locked = [0]*(x*y+y)
    while grid != last:
        last = grid

        Dgrid = sub_all(grid,[(r'D\|','DD'),(r'D\\','DE'),('D/','DC')])
        Agrid = sub_all(grid,[(r'\|A','AA'),(r'\\A','ZA'),('/A','QA')])
        Wgrid = sub_all(grid,[('-(.{%s})W'%x,r'W\1W'),(r'\\(.{%s})W'%x,r'E\1W'),('/(.{%s})W'%x,r'Q\1W')])
        Xgrid = sub_all(grid,[('X(.{%s})-'%x,r'X\1X'),(r'X(.{%s})\\'%x,r'X\1Z'),(r'X(.{%s})/'%x,r'X\1C')])

        Cgrid = sub_all(grid,[('C(.{%s})/'%(x+1),r'C\1C'),('C(.{%s})-'%(x+1),r'C\1X'),(r'C(.{%s})\|'%(x+1),r'C\1D'),
                        ('C(.{%s})/'%x,r'C\1C'),('C(.{%s})-'%x,r'C\1X'),
                        ('C/','CC'),(r'C\|','CD')])

        Zgrid = sub_all(grid,[(r'Z(.{%s})\\'%(x-1),r'Z\1Z'),('Z(.{%s})-'%(x-1),r'Z\1X'),(r'Z(.{%s})\|'%(x-1),r'Z\1A'),
                        (r'Z(.{%s})\\'%x,r'Z\1Z'),('Z(.{%s})-'%x,r'Z\1X'),
                        (r'\\Z','ZZ'),(r'\|Z','AZ')])

        Qgrid = sub_all(grid,[('/(.{%s})Q'%(x+1),r'Q\1Q'),('-(.{%s})Q'%(x+1),r'W\1Q'),(r'\|(.{%s})Q'%(x+1),r'A\1Q'),
                        ('/(.{%s})Q'%x,r'Q\1Q'),('-(.{%s})Q'%x,r'W\1Q'),
                        ('/Q','QQ'),(r'\|Q','AQ')])

        Egrid = sub_all(grid,[(r'\\(.{%s})E'%(x-1),r'E\1E'),('-(.{%s})E'%(x-1),r'W\1E'),(r'\|(.{%s})E'%(x-1),r'D\1E'),
                        (r'\\(.{%s})E'%x,r'E\1E'),('-(.{%s})E'%x,r'W\1E'),
                        (r'E\\','EE'),(r'E\|','ED')])

        grids = [Dgrid,Agrid,Wgrid,Xgrid,Cgrid,Zgrid,Qgrid,Egrid]
        ngrid = ''

        for i in range(x*y+y):
            c = None
            for g in grids:
                if g[i] in L:
                    if c==None: c = g[i]
                    elif g[i] != c:
                        ngrid += grid[i]
                        locked[i]=1
                        break
            else:
                ngrid += grid[i] if c==None or locked[i] else c
        grid = ngrid
        print grid
    return re.sub(r'\w','#',grid)

The listed inputs all produce their outputs except the third, in which I'm pretty sure there's a mistake (the \-/ at the very top should be \|/ if the given output is desired). I'm also assuming that the . in the bottom left corner of the last one was intended to be a D.

You're right, those were two typos, although the last one was supposed to be an E (not that it makes a difference...). It looks like you can save a bunch of characters by reducing the indentation depths to the bare minimum.

I'm not sure whether I made some mistake copy-pasting the third example, but the backslashes won't fall their (they seemed to work in the fourth example though)

@MartinBüttner, though I did have some trouble copy-pasting (make sure there is no trailing whitespace at the end of lines, and no tabs, only spaces) it seems to work once I got it correct. It might help to have the example inputs in a format easier to copy-paste, without the expected results on the same lines.


text:
Make a circle illusion animation
Your job is to animate this circle illusion. It looks like the points rotating inside of the circle, but they are actually just moving in straight lines.

Criterias

The result has to be animated. The way you do the animation is irrelevant, it can generate a .gif, it can draw to a window, some device screen or whatever.
This is a popularity contest, so you might want to add some additional features to your program to get more upvotes, for example varying the number of points.
The winner is the most upvoted valid answer 7 days after the last valid submission.
The answers that will actually implement points moving on straight lines and not another way around are more welcomed

"winner is the most upvoted valid after 7 days". So if someone posts something every 6 days until the stars die, we have no winner?

@KevinL that is unlikely to happen and I don't think those 15 extra rep are that important compared to all the upvotes you'd get from this question being bumped to the top every 6 days.

@KevinL: If that happens, we will have a winner after the stars die.

look closely, and focus on any one of the balls. They are just oscillating along one of their pass axis.

Sometimes I wonder if some people do these just to get a job done...

@DantheMan I really enjoyed this question... I think I know what you mean - that need to do something that can be finished quickly for a sense of completion.

"It looks like the points rotating inside of the circle, but they are actually just moving in straight lines.", or, maybe they are really rotating inside a circle and appear to move in straight lines ...

Can't.. get this animation.. out of my mind.. especially the 3-point version!

Python 3.4
Using the turtle module. The turtles are different colours and they always face in the same direction, so they can be easily seen to be moving along straight lines by just focusing on one of them. Despite this the circle illusion is still strong.

The illusion still seems quite strong even with just 3 or 4 turtles:

The framerate is reduced considerably for all of these GIF examples, but it doesn't seem to detract from the illusion. Running the code locally gives a smoother animation.
import turtle
import time
from math import sin, pi
from random import random

def circle_dance(population=11, resolution=480, loops=1, flip=0, lines=0):
    population = int(population)
    resolution = int(resolution)
    radius = 250
    screen = turtle.Screen()
    screen.tracer(0)
    if lines:
        arrange_lines(population, radius)
    turtles = [turtle.Turtle() for i in range(population)]
    for i in range(population):
        dancer = turtles[i]
        make_dancer(dancer, i, population)
    animate(turtles, resolution, screen, loops, flip, radius)

def arrange_lines(population, radius):
    artist = turtle.Turtle()
    for n in range(population):
        artist.penup()
        artist.setposition(0, 0)
        artist.setheading(n / population * 180)
        artist.forward(-radius)
        artist.pendown()
        artist.forward(radius * 2)
    artist.hideturtle()

def make_dancer(dancer, i, population):
    dancer.setheading(i / population * 180)
    dancer.color(random_turtle_colour())
    dancer.penup()
    dancer.shape('turtle')
    dancer.turtlesize(2)

def random_turtle_colour():
    return random() * 0.9, 0.5 + random() * 0.5, random() * 0.7

def animate(turtles, resolution, screen, loops, flip, radius):
    delay = 4 / resolution      # 4 seconds per repetition
    while True:
        for step in range(resolution):
            timer = time.perf_counter()
            phase = step / resolution * 2 * pi
            draw_dancers(turtles, phase, screen, loops, flip, radius)
            elapsed = time.perf_counter() - timer
            adjusted_delay = max(0, delay - elapsed)
            time.sleep(adjusted_delay)

def draw_dancers(turtles, phase, screen, loops, flip, radius):
    population = len(turtles)
    for i in range(population):
        individual_phase = (phase + i / population * loops * pi) % (2*pi)
        dancer = turtles[i]
        if flip:
            if pi / 2 < individual_phase <= 3 * pi / 2:
                dancer.settiltangle(180)
            else:
                dancer.settiltangle(0)
        distance = radius * sin(individual_phase)
        dancer.setposition(0, 0)
        dancer.forward(distance)
    screen.update()

if __name__ == '__main__':
    import sys
    circle_dance(*(float(n) for n in sys.argv[1:]))

For contrast here are some that really do rotate:

...or do they?
The code can be run with 5 optional arguments: population, resolution, loops, flip and lines.

population is the number of turtles
resolution is the time resolution (number of animation frames per repetition)
loops determines how many times the turtles loop back on themselves. The default of 1 gives a standard circle, other odd numbers give that number of loops in the string of turtles, while even numbers give a string of turtles disconnected at the ends, but still with the illusion of curved motion.
flip if non-zero causes the turtles to flip direction for their return trip (as suggested by aslum so that they are never moving backwards). As default they keep a fixed direction to avoid the visual distraction at the endpoints.
lines if non-zero displays the lines on which the turtles move, for consistency with the example image in the question.

Examples with flip set, with and without lines. I've left my main example above without flip as I prefer not to have the sporadic jump, but the edge of the circle does look smoother with all the turtles aligned, so the option is there for people to choose whichever style they prefer when running the code.

It might not be immediately obvious how the images above were all produced from this same code. In particular the image further up which has a slow outer loop and a fast inner loop (the one that looks like a cardioid that someone accidentally dropped). I've hidden the explanation of this one below in case anyone wants to delay finding out while experimenting/thinking.

 The animation with an inner and outer loop of different sizes was created by setting the number of loops to 15 and leaving the number of turtles at 23 (too low to represent 15 loops). Using a large number of turtles would result in 15 clearly defined loops. Using too few turtles results in aliasing (for the same reason as in image processing and rendering). Trying to represent too high a frequency results in a lower frequency being displayed, with distortion.

Trying out different numbers I found some of these distortions more interesting than the more symmetrical originals, so I wanted to include one here...

I like turtles.

I shelled out +1 for the turtles

@ProgramFOX thanks for the syntax highlighting! I searched through the help and meta and convinced myself we didn't have syntax highlighting on code golf - I'm much happier with this now.

Hey, what would happen if turtles will also rotate?

@swish you could try it if you like - the code is there to be used. It wouldn't be a valid answer to this question, but if you post it somewhere else you could melt people's brains with it...

Only improvement would be if the turtles flipped 180 degrees when they changed directions... so they are always going 'forward'.

@aslum that would be a straightforward change to make, but I wanted their orientation frozen to really emphasise that they do not deviate from their straight line course. Maybe I should add it to the code as an option so people can choose the approach they prefer.

@aslum since someone upvoted my comment saying maybe I should, I've added the option to flip the turtle directions. Thanks for the suggestion!

+1 - It'd be awesome to see a marching band do some of these funkier ones!

C
Result:

#include <stdio.h>
#include <Windows.h>
#include <Math.h>

int round (double r) { return (r > 0.0) ? (r + 0.5) : (r - 0.5); }
void print (int x, int y, char c) {
    COORD p = { x, y };
    SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), p);
    printf("%c", c);
}

int main ()
{
    float pi = 3.14159265358979323846;
    float circle = pi * 2;
    int len = 12;
    int hlen = len / 2;
    int cx = 13;
    int cy = 8;
    float w = 11.0;
    float h =  8.0;
    float step = 0.0;

    while (1)
    {
        system("cls"); // xD

        for (int i = 0; i < len; i++)
        {
            float a = (i / (float)len) * circle;
            int x = cx + round(cos(a) * w);
            int y = cy + round(sin(a) * h);
            print(x, y, 'O');

            if (i < hlen) continue;

            step -= 0.05;
            float range = cos(a + step);
            x = cx + round(cos(a) * (w - 1) * range);
            y = cy + round(sin(a) * (h - 1) * range);
            print(x, y, 'O');
        }

        Sleep(100);
    }

    return 0;
}

In some frames it's a bit off. But congrats for doing it in ASCII!

+1 for ASCII and system("cls"); // xD

This is beautiful.

This one works on linux. (although quite miserably)

Obligatory hater comment: "This isn't C! The standard doesn't define Sleep, COORD or SetConsoleCursorPosition!"

SVG (no Javascript)
JSFiddle link here
<?xml version="1.0"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 380 380" width="380" height="380" version="1.0">
  <g transform="translate(190 190)">
    <circle cx="0" cy="0" r="190" fill="#000"/>
    <line x1="0" y1="-190" x2="0" y2="190" stroke="#fff" stroke-width="1.5"/>
    <line x1="72.71" y1="175.54" x2="-72.71" y2="-175.54" stroke="#fff" stroke-width="1.5"/>
    <line x1="134.35" y1="134.35" x2="-134.35" y2="-134.35" stroke="#fff" stroke-width="1.5"/>
    <line x1="175.54" y1="72.71" x2="-175.54" y2="-72.71" stroke="#fff" stroke-width="1.5"/>
    <line x1="190" y1="0" x2="-190" y2="0" stroke="#fff" stroke-width="1.5"/>
    <line x1="175.54" y1="-72.71" x2="-175.54" y2="72.71" stroke="#fff" stroke-width="1.5"/>
    <line x1="134.35" y1="-134.35" x2="-134.35" y2="134.35" stroke="#fff" stroke-width="1.5"/>
    <line x1="72.71" y1="-175.54" x2="-72.71" y2="175.54" stroke="#fff" stroke-width="1.5"/>
    <g transform="rotate(0)">
      <animateTransform attributeType="xml" attributeName="transform" type="rotate" from="0" to="360" begin="0" dur="8s" repeatCount="indefinite"/>
      <g transform="translate(0 90)">
        <g transform="rotate(0)">
          <animateTransform attributeType="xml" attributeName="transform" type="rotate" from="0" to="-360" begin="0" dur="4s" repeatCount="indefinite"/>
          <circle cx="0" cy="90" r="10" fill="#fff"/>
          <circle cx="63.64" cy="63.64" r="10" fill="#fff"/>
          <circle cx="90" cy="0" r="10" fill="#fff"/>
          <circle cx="63.64" cy="-63.64" r="10" fill="#fff"/>
          <circle cx="0" cy="-90" r="10" fill="#fff"/>
          <circle cx="-63.64" cy="-63.64" r="10" fill="#fff"/>
          <circle cx="-90" cy="0" r="10" fill="#fff"/>
          <circle cx="-63.64" cy="63.64" r="10" fill="#fff"/>
        </g>
      </g>
    </g>
  </g>
</svg>

Hmmm, I'm sure this passes muster with the rules, but I was, personally, disappointed that you are in fact doing the opposite. Rather than “It looks like the points [are] rotating inside of the circle, but they are actually just moving in straight lines.”, yours implements: “It looks like the points [are] moving in straight lines, but they are actually just rotating inside of the circle.”

Smoothest answer!

@mkoistinen I see what you mean, but the points really are moving in straight lines. It just happens to be easier to calculate their positions with two rotations :-)

Did you do it all 'by hand' or did you use any kind of (non-text-) editor?

@flawr I just used a plain text editor and the calculator in my phone to work out the numbers :-)

http://jsfiddle.net/z6vhD/13/
intervaltime changes the FPS (FPS = 1000/intervaltime).
balls changes the # balls.
maxstep adjusts the # steps in a cycle, the larger the 'smoother' it is. 64 should be large enough where it appears smooth.
Modeled as a circle moving, instead of moving the balls along the lines, but the visual effect (should be?) the same. Some of the code is pretty verbose, but this isn't code golf, so...
var intervalTime = 40;
var balls = 8;
var maxstep = 64;

var canvas = $('#c').get(0); // 100% necessary jquery
var ctx = canvas.getContext('2d');
var step = 0;

animateWorld = function() {
    createBase();
    step = step % maxstep;
    var centerX = canvas.width/2 + 115 * Math.cos(step * 2 / maxstep * Math.PI);
    var centerY = canvas.height/2 + 115 * Math.sin(step * 2 / maxstep * Math.PI);

    for (var i=0; i<balls; i++) {
        drawCircle(ctx, (centerX + 115 * Math.cos((i * 2 / balls - step * 2 / maxstep) * Math.PI)), (centerY + 115 * Math.sin((i * 2 / balls - step * 2 / maxstep) * Math.PI)), 10, '#FFFFFF');
    }

    step++;
}

function createBase() {
    drawCircle(ctx, canvas.width/2, canvas.height/2, 240, '#000000');
    for(var i=0; i<balls*2; i++) {
        drawLine(ctx, canvas.width/2, canvas.height/2, canvas.width/2 + 240 * Math.cos(i / balls * Math.PI), canvas.height/2 + 240 * Math.sin(i / balls * Math.PI), '#FFFFFF');
    }
}

function drawLine(context, x1, y1, x2, y2, c) {
    context.beginPath();
    context.moveTo(x1,y1);
    context.lineTo(x2,y2);
    context.lineWidth = 3;
    context.strokeStyle = c;
    context.stroke();
}

function drawCircle(context, x, y, r, c) {
    context.beginPath();
    context.arc(x, y, r, 0, 2*Math.PI);
    context.fillStyle = c;
    context.fill();
}

function drawRect(context, x, y, w, h, c) {
    context.fillStyle = c;
    context.fillRect(x, y, w, h);
}

$(document).ready(function() {
    intervalID = window.setInterval(animateWorld, intervalTime);
});

It's so smooth! Very nice.

Don't use setInterval for animations, take requestAnimationFrame instead.
Modified JSFiddle using requestAnimationFrame.

With just a few parameter tweaks you get a very different thing.

@KevinL Yep, just noticed that too. Updated.

@FreeAsInBeer Oh, when you said very different thing, I thought you meant like the ones in http://jsfiddle.net/z6vhD/100/

Heh, that's cool too.

+1 for using balls as a variable.  Instead of drawing balls * 2 radii you could draw balls diameters for a small savings.

CSS animations
A solution using only css animations (see animation on JSFiddle - note that I added the browser specific prefixes in the fiddle so that it can work in most recent versions).

div {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 20px;
    background: red;
    animation-duration: 4s;
    animation-iteration-count: infinite;
    animation-direction: alternate;
    animation-timing-function: ease-in-out;
}

#w1 { animation-name: s1; animation-delay: 0.0s }
#w2 { animation-name: s2; animation-delay: 0.5s }
#w3 { animation-name: s3; animation-delay: 1.0s }
#w4 { animation-name: s4; animation-delay: 1.5s }
#w5 { animation-name: s5; animation-delay: 2.0s }
#w6 { animation-name: s6; animation-delay: 2.5s }
#w7 { animation-name: s7; animation-delay: 3.0s }
#w8 { animation-name: s8; animation-delay: 3.5s }

@keyframes s1 { from {top: 100px; left:   0px;} to {top: 100px; left: 200px;} }
@keyframes s2 { from {top:  62px; left:   8px;} to {top: 138px; left: 192px;} }
@keyframes s3 { from {top:  29px; left:  29px;} to {top: 171px; left: 171px;} }
@keyframes s4 { from {top:   8px; left:  62px;} to {top: 192px; left: 138px;} }
@keyframes s5 { from {top:   0px; left: 100px;} to {top: 200px; left: 100px;} }
@keyframes s6 { from {top:   8px; left: 138px;} to {top: 192px; left:  62px;} }
@keyframes s7 { from {top:  29px; left: 171px;} to {top: 171px; left:  29px;} }
@keyframes s8 { from {top:  62px; left: 192px;} to {top: 138px; left:   8px;} }

Fiddle not working for me on latest Chrome =/

@mkoistinen - You have to add different prefixes for it to be working in different browsers. (-webkit- for Webkit-based and -moz- for Mozilla-based) Here is the same fiddle with updated prefixes: http://jsfiddle.net/nBCxz/3/

@mkoistinen You're right. The new fiddle adds all necessary browser prefixes and works on latest Chrome.

The raw link text is just missing the closing parenthesis - still perfectly usable just letting you know in case you wanted to fix it (I can't as it's less than 6 characters to change).

Mathematica
Here is a pretty straight-forward submission.
animateCircle[n_] := Animate[Graphics[
   Flatten@{
     Disk[],
     White,
     Map[
      (
        phase = #*2 \[Pi]/n;
        line = {Cos[phase], Sin[phase]};
        {Line[{-line, line}],
         Disk[Sin[t + phase]*line, 0.05]}
        ) &,
      Range[n]
      ]
     },
   PlotRange -> {{-1.1, 1.1}, {-1.1, 1.1}}
   ],
  {t, 0, 2 \[Pi]}
  ]

If you call animateCircle[32] you'll get a neat animation with 32 lines and circles.

It's completely smooth in Mathematica, but I had to limit the number of frames for the GIF a bit.
Now what happens if you put two discs on each line? (That is, add Disk[-Sin[t + phase]*line, 0.05] to the list within the Map.)

You can also put them 90° out of phase (use Cos instead of -Sin):

I dunno what glitches do you mean, probably you need to change {t, 0, 2 \[Pi]} to {t, 0, 2 \[Pi] - 2 \[Pi]/60, 2 \[Pi]/60} so that there won't be two identical frames and change Animate to Table. Then you'll be able to export GIF.

@swish No it actually renders weird additional lines that aren't there and the discs in places where they shouldn't be (and where they never are in the actual result of Animate). I'll try using Table again though.

@swish That worked. I thought I tried something like this yesterday, but apparently I didn't.

Excel (no VBA)

=2*PI()*(NOW()*24*60*60/A2-FLOOR(NOW()*24*60*60/A2,1))
=ROUND(7*SIN(A1),0)
=ROUND(5*SIN(A1+1*PI()/4),0)
=ROUND(7*SIN(A1+2*PI()/4),0)
=ROUND(5*SIN(A1+3*PI()/4),0)

A2 (period) determines the time (seconds) for a full 'revolution'.
Each cell within the lines is a basic conditional relating to the value of the corresponding line.  For example, K2 is:
 =1*(A5=7)

And the center cell (K9) is:
=1*OR(A5=0,A6=0,A7=0,A8=0)

Forced the animation by holding 'delete' on a random cell to constantly trigger a refresh.
I know this is an old topic, but recent activity brought it to the top and it seemed appealing for some reason.  Long time pcg listener, first time caller.  Be gentle.

Wow, that's incredible that you can do that with Excel :D

VBScript + VBA + Excel Pie Chart
This will make your processor cry a little but it looks pretty and I believe it works according to spec. I used @Fabricio's answer as a guide to implement the circle movement algorithm.
EDIT: Made some adjustments to improve render speed.

The code:
'Open Excel
Set objX = CreateObject("Excel.Application")
objX.Visible = True
objX.Workbooks.Add

'Populate values
objX.Cells(1, 1).Value = "Lbl"
objX.Cells(1, 2).Value = "Amt"
For fillX = 2 to 17
    objX.Cells(fillX, 1).Value = "V"+Cstr(fillX-1)
    objX.Cells(fillX, 2).Value = "1"
Next

'Create pie
objX.Range("A2:B17").Select
objX.ActiveSheet.Shapes.AddChart.Select
With objX.ActiveChart
    .ChartType = 5 'pieChart
    .SetSourceData  objX.Range("$A$2:$B$17")
    .SeriesCollection(1).Select
End with

'Format pie
With objX.Selection.Format
    .Fill.ForeColor.RGB = 0 'black
    .Fill.Solid
    .Line.Weight = 2
    .Line.Visible = 1
    .Line.ForeColor.RGB = 16777215 'white
End With

'animation variables
pi = 3.14159265358979323846
circle = pi * 2 : l  = 16.0
hlen = l / 2    : cx = 152.0
cy = 99.0       : w  = 90.0
h  = 90.0       : s  = 0.0
Dim posArry(7,1)

'Animate
While 1
  For i = 0 to hlen-1
    a = (i / l) * circle
    range = cos(a + s)
    x = cx + cos(a) * w * range
    y = cy + sin(a) * h * range

    If whileInx = 1 Then
        createOval x, y
    ElseIf whileInx = 2 Then
        objX.ActiveChart.Legend.Select
    ElseIf whileInx > 2 Then
        ovalName = "Oval "+ Cstr(i+1)
        dx = x - posArry(i,0)
        dy = y - posArry(i,1)
        moveOval ovalName, dx, dy
    End if

    posArry(i,0) = x
    posArry(i,1) = y
  Next

  s=s-0.05
  wscript.Sleep 1000/60 '60fps
  whileInx = 1 + whileInx
Wend

'create circles
sub createOval(posX, posY)
    objX.ActiveChart.Shapes.AddShape(9, posX, posY, 10, 10).Select '9=oval
    objX.Selection.ShapeRange.Line.Visible = 0
    with objX.Selection.ShapeRange.Fill
       .Visible = 1
       .ForeColor.RGB = 16777215 'white
       .solid
    end with
end sub

'move circles
sub moveOval(ovalName, dx, dy)
    with objX.ActiveChart.Shapes(ovalName)
        .IncrementLeft dx
        .IncrementTop  dy
    end with
end sub

It crashes for me at line 81, error 80070057, "element with the given name does not exist" or something like this (translated back from Hungarian, that's why I don't know the exact error message).

Szervusz, @marczellm. I can reproduce that error when I click outside of the chart while it is "animating". You have to allow it focus or the program will error. Otherwise, this may be due to an incompatibility with Office. I'm on Office 2010 on Win7.

Office 2007, Win7. Seems like in my case the chart doesn't get focus at all.

Just for fun with PSTricks.

\documentclass[preview,border=12pt,multi]{standalone}
\usepackage{pstricks}

\psset{unit=.3}

% static point
% #1 : half of the number of points
% #2 : ith point
\def\x[#1,#2]{(3*cos(Pi/#1*#2))}
\def\y[#1,#2]{(3*sin(Pi/#1*#2))}

% oscillated point
% #1 : half of the number of points
% #2 : ith point
% #3 : time parameter
\def\X[#1,#2]#3{(\x[#1,#2]*cos(#3+Pi/#1*#2))}
\def\Y[#1,#2]#3{(\y[#1,#2]*cos(#3+Pi/#1*#2))}

% single frame
% #1 : half of the number of points
% #2 : time parameter
\def\Frame#1#2{%
\begin{pspicture}(-3,-3)(3,3)
    \pstVerb{/I2P {AlgParser cvx exec} bind def}%
    \pscircle*{\dimexpr3\psunit+2pt\relax}
    \foreach \i in {1,...,#1}{\psline[linecolor=yellow](!\x[#1,\i] I2P \y[#1,\i] I2P)(!\x[#1,\i] I2P neg \y[#1,\i] I2P neg)}
    \foreach \i in {1,...,#1}{\pscircle*[linecolor=white](!\X[#1,\i]{#2} I2P \Y[#1,\i]{#2} I2P){2pt}}
\end{pspicture}}

\begin{document}
\foreach \t in {0,...,24}
{
    \preview
    \Frame{1}{2*Pi*\t/25} \quad \Frame{2}{2*Pi*\t/25} \quad \Frame{3}{2*Pi*\t/25} \quad \Frame{5}{2*Pi*\t/25} \quad \Frame{10}{2*Pi*\t/25}
    \endpreview
}
\end{document}

Fortran
Each frame is created as an individual gif file using the Fortran gif module at: http://fortranwiki.org/fortran/show/writegif
Then I cheat a little by using ImageMagick to merge the individual gifs into one animated gif.

UPDATE: Set new = .true. to get the following:

program circle_illusion

use, intrinsic :: iso_fortran_env, only: wp=>real64
use gif_util  !gif writing module from http://fortranwiki.org/fortran/show/writegif

implicit none

logical,parameter :: new = .false.

integer,parameter  :: n        = 500  !550  !size of image (square)
real(wp),parameter :: rcircle  = n/2  !250  !radius of the big circle
integer,parameter  :: time_sep = 5    !deg

real(wp),parameter :: deg2rad = acos(-1.0_wp)/180.0_wp
integer,dimension(0:n,0:n):: pixel     ! pixel values
integer,dimension(3,0:3)  :: colormap  ! RGB 0:255 for colors 0:ncol
real(wp),dimension(2)     :: xy
integer,dimension(2)      :: ixy
real(wp)                  :: r,t
integer                   :: i,j,k,row,col,m,n_cases,ang_sep
character(len=10)         :: istr

integer,parameter  :: black = 0
integer,parameter  :: white = 1
integer,parameter  :: red   = 2
integer,parameter  :: gray  = 3
colormap(:,0) = [0,0,0]          !black
colormap(:,1) = [255,255,255]    !white
colormap(:,2) = [255,0,0]        !red
colormap(:,3) = [200,200,200]    !gray

if (new) then
    ang_sep = 5
    n_cases = 3
else
    ang_sep = 20
    n_cases = 0
end if

do k=0,355,time_sep

    !clear entire image:
    pixel = white

    if (new) call draw_circle(n/2,n/2,black,n/2)

    !draw polar grid:
    do j=0,180-ang_sep,ang_sep
        do i=-n/2, n/2
            call spherical_to_cartesian(dble(i),dble(j)*deg2rad,xy)
            call convert(xy,row,col)
            if (new) then
                pixel(row,col) = gray
            else
                pixel(row,col) = black
            end if
        end do
    end do

    !draw dots:
    do m=0,n_cases
        do j=0,360-ang_sep,ang_sep
            r = sin(m*90.0_wp*deg2rad + (k + j)*deg2rad)*rcircle
            t = dble(j)*deg2rad
            call spherical_to_cartesian(r,t,xy)
            call convert(xy,row,col)
            if (new) then
                !call draw_circle(row,col,black,10)  !v2
                !call draw_circle(row,col,m,5)       !v2
                call draw_circle(row,col,white,10)   !v3
            else
                call draw_square(row,col,red)        !v1
            end if
        end do
    end do

    !write the gif file for this frame:
    write(istr,'(I5.3)') k
    call writegif('gifs/test'//trim(adjustl(istr))//'.gif',pixel,colormap)

end do

!use imagemagick to make animated gif from all the frames:
! from: http://thanosk.net/content/create-animated-gif-linux
if (new) then
    call system('convert -delay 5 gifs/test*.gif -loop 0 animated.gif')
else
    call system('convert -delay 10 gifs/test*.gif -loop 0 animated.gif')
end if

!delete individual files:
call system('rm gifs/test*.gif')

contains

    subroutine draw_square(r,c,icolor)

    implicit none
    integer,intent(in) :: r,c  !row,col of center
    integer,intent(in) :: icolor

    integer,parameter :: d = 10 !square size

    pixel(max(0,r-d):min(n,r+d),max(0,c-d):min(n,c+d)) = icolor

    end subroutine draw_square

    subroutine draw_circle(r,c,icolor,d)

    implicit none
    integer,intent(in) :: r,c  !row,col of center
    integer,intent(in) :: icolor
    integer,intent(in) :: d  !diameter

    integer :: i,j

    do i=max(0,r-d),min(n,r+d)
        do j=max(0,c-d),min(n,c+d)
            if (sqrt(dble(i-r)**2 + dble(j-c)**2)<=d) &
                pixel(i,j) = icolor
        end do
    end do

    end subroutine draw_circle

    subroutine convert(xy,row,col)

    implicit none
    real(wp),dimension(2),intent(in) :: xy  !coordinates
    integer,intent(out) :: row,col

    row = int(-xy(2) + n/2.0_wp)
    col = int( xy(1) + n/2.0_wp)

    end subroutine convert

    subroutine spherical_to_cartesian(r,theta,xy)

    implicit none
    real(wp),intent(in) :: r,theta
    real(wp),dimension(2),intent(out) :: xy

    xy(1) = r * cos(theta)
    xy(2) = r * sin(theta)

    end subroutine spherical_to_cartesian

end program circle_illusion

I like the impact 'squish' for the vertical & horizontal elements.

Mandatory C64 version.
Copy&paste in your favorite emulator:

1 print chr$(147)
2 poke 53281,0
3 for p=0 to 7
5 x=int(11+(cos(p*0.78)*10)):y=int(12+(sin(p*0.78)*10))
6 poke 1024+x+(y*40),15
9 next p
10 for sp=2040 to 2047:poke sp,13:next sp
20 for i=0 to 62:read a:poke 832+i,a:next i
30 for i=0 to 7:poke 53287+i,i+1:next i
40 rem activate sprites
50 poke 53269,255
60 an=0.0
70 rem maincycle
75 teta=0.0:k=an
80 for i=0 to 7
90 px=cos(k)*64
92 s=i:x=px*cos(teta): y=px*sin(teta): x=x+100: y=y+137: gosub 210
94 teta=teta+0.392699
95 k=k+0.392699
96 next i
130 an=an+0.1
140 goto 70
150 end
200 rem setspritepos
210 poke 53248+s*2,int(x): poke 53249+s*2,int(y)
220 return
5000 data 0,254,0
5010 data 3,199,128
5020 data 7,0,64
5030 data 12,126,96
5040 data 25,255,48
5050 data 59,7,152
5060 data 52,1,200
5070 data 116,0,204
5080 data 120,0,100
5090 data 120,0,100
5100 data 120,0,100
5110 data 120,0,36
5120 data 104,0,36
5130 data 100,0,108
5140 data 54,0,72
5150 data 51,0,152
5160 data 25,131,16
5170 data 12,124,96
5180 data 4,0,64
5190 data 3,1,128
5200 data 0,254,0

A compact javascript version, changing the default settings to something different
http://jsfiddle.net/yZ3DP/1/
HTML:
<canvas id="c" width="400" height="400" />

JavaScript:
var v= document.getElementById('c');
var c= v.getContext('2d');
var w= v.width, w2= w/2;
var num= 28, M2= Math.PI*2, da= M2/num;
draw();
var bw= 10;
var time= 0;
function draw()
{
    v.width= w;
    c.beginPath();
    c.fillStyle= 'black';
    circle(w2,w2,w2);
    c.lineWidth= 1.5;
    c.strokeStyle= c.fillStyle= 'white';
    var a= 0;
    for (var i=0; i< num*2; i++){
        c.moveTo(w2,w2);
        c.lineTo(w2+Math.cos(a)*w2, w2+Math.sin(a)*w2);
        a+= da/2;
    }
    c.stroke();
    a= 0;
    for (var i=0; i< num; i++){
        circle(w2+Math.cos(a)*Math.sin(time+i*Math.PI/num)*(w2-bw),
               w2+Math.sin(a)*Math.sin(time+i*Math.PI/num)*(w2-bw), bw);
        a+= da/2;
    }
    time+=0.03;
   requestAnimationFrame(draw);
}

function circle(x,y,r)
{
    c.beginPath();
    c.arc(x, y, r, 0, M2);
    c.fill();

}

You made ... a doughnut?? Actually your animation looks nice with smaller dots (try bw=10). Please edit your answer to show your code. Oh, and while you're at it, there's a bug you should fix: replace time+i*0.39*0.29 with time+i*Math.PI/num in the trig calculations so that the coordinates are calculated correctly for any value of num. (P.S. Updated JSFiddle here. And welcome to codegolf.stackexchange.com)

I just wanted to make something different (like the turtles one). Newbie here in codegolf :)
Oh, and thank you for the formula :D I just did it in a hurry and tried random values, didn't stop a minute  to get to the correct formula :P

+1 Small change for a little visual fun: http://jsfiddle.net/9TQrm/ or http://jsfiddle.net/Wrqs4/1/

My take with Elm. I am a total beginner who will happily accept PRs to improve this solution (GitHub):

Note that this submission is really moving points on straight lines:
import Color exposing (..)
import Graphics.Collage exposing (..)
import Graphics.Element exposing (..)
import Time exposing (..)
import Window
import List exposing (..)
import AnimationFrame -- "jwmerrill/elm-animation-frame"
import Debug

-- CONFIG

size = 600
circleSize = 240
dotCount = 12
dotSize = 10
velocity = 0.01

-- MODEL

type alias Dot =
    { x : Float
    , angle : Float
    }

type alias State = List Dot

createDots : State
createDots = map createDot [ 0 .. dotCount - 1 ]

createDot : Int -> Dot
createDot index =
    let angle = toFloat index * pi / dotCount
    in { x = 0
       , angle = angle
       }

-- UPDATE

update : Time -> State -> State
update time dots = map (moveDot time) dots |> Debug.watch "Dots"

moveDot : Time -> Dot -> Dot
moveDot time dot =
  let t = velocity * time / pi
      newX = (-circleSize + dotSize) * cos(t + dot.angle)
  in { dot | x <- newX }

-- VIEW

view : State -> Element
view dots =
   let background = filled black (circle circleSize)
       dotLinePairs = map viewDotWithLine dots
   in collage size size (background :: dotLinePairs)

viewDotWithLine : Dot -> Form
viewDotWithLine dot =
  let dotView = viewDot dot
      lineView = createLineView
  in group [dotView , lineView] |> rotate dot.angle

viewDot : Dot -> Form
viewDot d = alpha 0.8 (filled lightOrange (circle dotSize)) |> move (d.x, 0)

createLineView : Form
createLineView = traced (solid white) (path [ (-size / 2.0, 0) , (size / 2.0, 0) ])

-- SIGNALS

main = Signal.map view (animate createDots)

animate : State -> Signal State
animate dots = Signal.foldp update dots time

time = Signal.foldp (+) 0 AnimationFrame.frame

That cursor fooled me good, and mine isn't even black or that size.

Second Life LSL

start of turtle alpha image (right click below to save image)

end of turtle alpha image (right click above to save image)
building the object:
make a root prim cylinder size <1, 1, 0.01> slice 0.49, 0.51, color <0, 0, 0>
make the description of this cylinder "8,1,1,1" without the quotes (very important)
make a cylinder, name it "cyl", color <0.25, 0.25, 0.25> alpha 0.5
duplicate the cyl 48 times
make a box, name it "sphere", color <1, 1, 1> transparency 100 except for the top transparency 0
put your turtle texture on face 0 of the box, turtle should face +x
duplicate the box 48 times
select all the boxes and the cylinders, make sure to select the root cylinder last, link (control L)
put these 2 scripts in the root:
//script named "dialog"
default
{
    state_entry()
    {

    }

    link_message(integer link, integer num, string msg, key id)
    {
        list msgs = llCSV2List(msg);
        key agent = (key)llList2String(msgs, 0);
        string prompt = llList2String(msgs, 1);
        integer chan = (integer)llList2String(msgs, 2);
        msgs = llDeleteSubList(msgs, 0, 2);
        llDialog(agent, prompt, msgs, chan);
    }
}

//script named "radial animation"
float interval = 0.1;
float originalsize = 1.0;
float rate = 5;
integer maxpoints = 48;
integer points = 23; //1 to 48
integer multiplier = 15;
integer lines;
string url = "https://codegolf.stackexchange.com/questions/34887/make-a-circle-illusion-animation/34891";

list cylinders;
list spheres;
float angle;
integer running;
integer chan;
integer lh;

desc(integer on)
{
    if(on)
    {
        string desc =
            (string)points + "," +
            (string)multiplier + "," +
            (string)running + "," +
            (string)lines
            ;

        llSetLinkPrimitiveParamsFast(1, [PRIM_DESC, desc]);
    }
    else
    {
        list params = llCSV2List(llList2String(llGetLinkPrimitiveParams(1, [PRIM_DESC]), 0));
        points = (integer)llList2String(params, 0);
        multiplier = (integer)llList2String(params, 1);
        running = (integer)llList2String(params, 2);
        lines = (integer)llList2String(params, 3);
    }
}

init()
{
    llSetLinkPrimitiveParamsFast(LINK_ALL_OTHERS, [PRIM_POS_LOCAL, ZERO_VECTOR,
        PRIM_COLOR, ALL_SIDES, <1, 1, 1>, 0]);
    integer num = llGetNumberOfPrims();
    integer i;
    for(i = 2; i <= num; i++)
    {
        string name = llGetLinkName(i);

        if(name == "cyl")
            cylinders += [i];
        else if(name == "sphere")
            spheres += [i];
    }

    vector size = llGetScale();
    float scale = size.x/originalsize;

    float r = size.x/4;
    vector cylindersize = <0.01*scale, 0.01*scale, r*4>;
    float arc = 180.0/points;

    for(i = 0; i < points; i++)
    {
        float angle = i*arc;
        rotation rot = llEuler2Rot(<0, 90, 0>*DEG_TO_RAD)*llEuler2Rot(<0, 0, angle>*DEG_TO_RAD);

        integer cyl = llList2Integer(cylinders, i);
        integer sphere = llList2Integer(spheres, i);

        llSetLinkPrimitiveParamsFast(1, [PRIM_LINK_TARGET, cyl, PRIM_POS_LOCAL, ZERO_VECTOR, PRIM_ROT_LOCAL, rot, PRIM_SIZE, cylindersize, PRIM_COLOR, ALL_SIDES, <0.25, 0.25, 0.25>, 0.5*lines,
        PRIM_LINK_TARGET, sphere, PRIM_COLOR, ALL_SIDES, <0.25 + llFrand(0.75), 0.25 + llFrand(0.75), 0.25 + llFrand(0.75)>, 1
        ]);
    }
}

run()
{
    vector size = llGetScale();
    float scale = size.x/originalsize;

    float r = size.x/2;
    vector spheresize = <0.06, 0.06, 0.02>*scale;
    float arc = 180.0/points;
    list params;
    integer i;
    for(i = 0; i < points; i++)
    {

        float x = r*llCos((angle + i*arc*multiplier)*DEG_TO_RAD);

        vector pos = <x, 0, 0>*llEuler2Rot(<0, 0, i*arc>*DEG_TO_RAD);
        rotation rot = llEuler2Rot(<0, 0, i*arc>*DEG_TO_RAD);
        integer link = llList2Integer(spheres, i);
        params += [PRIM_LINK_TARGET, link, PRIM_POS_LOCAL, pos,
            PRIM_ROT_LOCAL, rot,
            PRIM_SIZE, spheresize
            //PRIM_COLOR, ALL_SIDES, <1, 1, 1>, 1
            ];
    }

    llSetLinkPrimitiveParamsFast(1, params);
}

dialog(key id)
{
    string runningstring;
    if(running)
        runningstring = "notrunning";
    else
        runningstring = "running";

    string linesstring;
    if(lines)
        linesstring = "nolines";
    else
        linesstring = "lines";
    string prompt = "\npoints: " + (string)points + "\nmultiplier: " + (string)multiplier;
    string buttons = runningstring + ",points+,points-,reset,multiplier+,multiplier-," + linesstring + ",www";
    llMessageLinked(1, 0, (string)id + "," + prompt + "," + (string)chan + "," + buttons, "");
    //llDialog(id, prompt, llCSV2List(buttons), chan);
}

default
{
    state_entry()
    {
        chan = (integer)("0x" + llGetSubString((string)llGetKey(), -8, -1));
        lh = llListen(chan, "", "", "");

        desc(FALSE);
        init();
        run();
        llSetTimerEvent(interval);
    }

    on_rez(integer param)
    {
        llListenRemove(lh);
        chan = (integer)("0x" + llGetSubString((string)llGetKey(), -8, -1));
        lh = llListen(chan, "", "", "");
    }

    touch_start(integer total_number)
    {
        key id = llDetectedKey(0);
        dialog(id);
    }

    timer()
    {
        if(!running)
            return;

        angle += rate;
        if(angle > 360)
            angle -= 360;
        else if(angle < 0)
            angle += 360;

        run();
    }

    listen(integer channel, string name, key id, string msg)
    {
        if(msg == "points+")
        {
            if(points < maxpoints)
            {
                points++;
                desc(TRUE);
                llResetScript();
            }
        }
        else if(msg == "points-")
        {
            if(points > 0)
            {
                points--;
                desc(TRUE);
                llResetScript();
            }
        }
        else if(msg == "multiplier+")
        {
            multiplier++;
            desc(TRUE);
        }
        else if(msg == "multiplier-")
        {
            multiplier--;
            desc(TRUE);
        }
        else if(msg == "running")
        {
            running = TRUE;
            desc(TRUE);
        }
        else if(msg == "notrunning")
        {
            running = FALSE;
            desc(TRUE);
        }
        else if(msg == "lines")
        {
            lines = TRUE;
            desc(TRUE);
            llResetScript();
        }
        else if(msg == "nolines")
        {
            lines = FALSE;
            desc(TRUE);
            llResetScript();
        }
        else if(msg == "reset")
            llResetScript();
        else if(msg == "www")
            llRegionSayTo(id, 0, url);
        dialog(id);
    }
}

PICO-8, 271 chars
camera(-64,-64)p=8::_::s=p.." lines"cls(7)circfill(0,0,50,0)for l=0,.5,.5/p do
u=flr(50*cos(l))v=flr(50*sin(l))line(u,-v,-u,v,5)end
?s,-#s*2,-60
for l=0,.5,.5/p do
u=flr(48*cos(l))v=flr(48*sin(l))q=cos(l-t()/4)circfill(u*q,-v*q,2,7)end
flip()p+=flr(btnp()/16+1)%3-1goto _

The code for this is so short, I could post it as a tweet. In fact, I just did.

You can also change the number of lines with the X and Z keys. (Oddly enough, due to a side effect of how division by 0 is handled in PICO-8, 0 lines acts exactly like 1 line. Negative numbers of lines don't show up.)
Ungolfed source:
lines=8

while true do
 cls(7)
 -- draw circle
 circfill(64,64,50,0)
 -- draw lines
 for l=0,.5,.5/lines do
  u=flr(50*cos(l))
  v=flr(50*sin(l))
  line(64+u,64-v,64-u,64+v,5)
 end
 -- center string
 s=lines.." lines"
 print(s,64-#s*2,4)
 -- draw points
 for l=0,.5,.5/lines do
  u=flr(48*cos(l))
  v=flr(48*sin(l))
  -- one full turn every 4 secs
  q=cos(l-t()/4)
  circfill(64+u*q,64-v*q,2,7)
 end
 flip()
 -- -1 if only ❎ is pressed
 -- +1 if only  is pressed
 --  0 otherwise
 lines+=flr(btnp()/16+1)%3-1
end

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

sort: votes


text:
Calculate to how many cubes one cube can be cut
Imagine some cube which we can cut into smaller cubes without remaining pieces.
Find to how many cubes a cube can be cut.
For example, a cube can be cut into 8, 27 (obviously 3rd powers of integers) and 20 (19 small cubes plus one eight times the size of the others, see image).
See here some help: http://mathworld.wolfram.com/CubeDissection.html

Program should take as input integer n (0 <= n <= 1 000) and print all numbers less or equal to n so that a cube can be cut into that number of cubes.
Suppose that cube can be cut into 1 cube and cannot into 0 cubes.
You can use only integral data-types (no arrays, objects etc) of size no greater than 64-bits.
Shortest code wins.

This has potential but you need to specify it more clearly. A cube can indeed be cut into 20 cubes: instead of cutting it into 27 cubes of side 1/3 the original, cut it into 19 cubes of side 1/3 the original and one which is 8 times larger (side 2/3 the original.) Yes I think a picture would be helpful

That's a pretty rough cube I've drawn, feel free to change it. At first sight this seems trivial but I think there's an interesting range around 125-216 (5^3-6^3.) It's probable that for very large numbers nearly all divisions are possible.

We will see whether all numbers after some threshold will be possible.

Not all are possible. For 125, for example, you obviously have 125, then the next few down will be replacing 8 cubes with one twice as large: 125, 118, 111, 104, 97. By the time you get to 97 you can also replace 27 cubes with one three times as large: 125-26=99. At this point it there could be a large range of options, except for the fact that only one size 3 cube will fit (that restriction does not apply for 216.) The math will get quite complicated. You might want to limit the n to a smaller number (say 1000) to be able to check if the programs are giving the right answer.

I changed it from code-golf to popularity-contest because it sounds like it's too complicated, also visualisation will be cool.

I would have left it as code-golf, and someone may bring a huge mathematical insight to this that will make it much easier. On the other hand it's your call and you're right about the visualisation.

The answer is actually here: http://mathworld.wolfram.com/CubeDissection.html

There's actually proof for this, for every n>47, a cube can be cut into n different cubes.

Since we have a fairly trivial solution now, you might want to change this back to code golf or put some really hard restriction on the submissions.

With that link help I have found 52 long solution in Mathematica. Should I post it in comment/make an answer?

Make it an answer. Stack Exchange encourages to answer your own questions. 52 bytes will be difficult to beat though, except for hardcoded answers. I think the reason you don't have any answers yet is because people know their calculations can't beat a hardcoded answer. I may post a hardcoded answer in C, but I'm reluctant to because it's against the spirit of the question.

I have hard-coded answer and that's why it not so interesting.

Golfscript, 55 (or 43 42)
{.:^}{.47>20{.^>^@- 7%|!|}:/~1/38/39/{}{;}if^(}while;]`

Can be tested here (just change the number on line 2) and only uses the array (last two chars of code) for clean printing, not for any collection or problem solving. If you leave it off, all results will be concatenated.
Method: Iterate down from given n: If current number is greater than 47 or of the form 1+7x, 20+7x, 38+7x, or 39+7x where x = any non-negative integer, then keep it on the stack, otherwise drop it.
Short answer (43 bytes):
{:/6+,{7*/+}%|}:&;):a,48,^1&20&38&39&{a<},`
):a,48,^1{:/6+,{7*/+}%|}:&~20&38&39&{a<},`

Method: Similar, but with a few set theory ops. This uses arrays so it's technically not an acceptable answer. Can be tested here. Btw: nobody ever said they had to be in any particular order ;)

Mathematica, 62 bytes (or 52)
It's hardcoded answer, nothing interesting.

If[EvenQ@BitShiftRight[164015534735101,n],Print@n]~Do~{n,1000}

This one is 52 bytes long but violates my rules - it uses large integers (powers of 2) and lists (Range).

Select[Range@1000,EvenQ@Floor[164015534735101/2^#]&]

C, 72
i;main(){for(scanf("%d",&i);i;i--)0x952BD7AF7EFC>>i&1||printf("%d ",i);}

Another hardcoded answer. This counts downwards (there's nothing in the rules about the order the numbers have to be output in.) In theory it should work. The constant has a bit set to 1 for all the numbers into which a cube can NOT be cut, and a 0 for the numbers which can. In theory, the constant when right shifted by a very large number should be zero, so the large number should always be printed.
What's interesting is that in practice this does not work. The code above compiles and runs fine on GCC up to 65. But above that number there is a bug (or "feature") in the compiler. it interprets 0x952BD7AF7EFC>>i as 0x952BD7AF7EFC>>i%64. So it skips (for example) the numbers 66 through 71 (64+2 through 64+7).
To run in Visual Studio, a bit more boilerplate is needed (it doesn't let you get away with things like implied integers and #includes.) Once the program's up and running, it's fine up to 257... Then it skips 258 through 263 (256+2 through 256+7.) So it's taking i%256.
I may fix it later (if I can be bothered.) Moral: compiler manuals don't normally tell you the upper limit on bitshifts. There's a reason for that!

This uses exactly the same principle as mine answer)

Indeed, we even have basically the same constant (with bit zero unused and bit 1 representing the number 1.) In C I save a single byte by specifying the constant in hex. I have a 0 for bit zero, I could change it for a 1 like yours for the case i=0. But it never gets displayed anyway.

@steveverrill please explain how NUM>>i changes to NUM>>i%64. Also if a 64-bit number is right shifted more than 64 times it should become zero

@Manav indeed it should become zero. As I say, the compiler has a bug. NUM>>i becomes NUM>>(i%64) or equivalently NUM>>(i&63)because the compiler is truncating the leftmost bits of i before performing the bitshift. GCC only considers only the rightmost 6 bits. Visual Studio has the same bug but is slightly better, considering only the rightmost 8 bits NUM>>(i%256). Out of curiosity I will try Ideone when I get home from work.

ideone behaves exactly like GCC. http://ideone.com/EpKTpO

Ruby, 44 bytes
->n{1.upto(n){|i|i/7<777159>>i%7*3&7||p(i)}}

Try it online!
Takes advantage of the fact that solutions occur modulo 7 (as a result of the fact that a cube can be dissected into 8 cubes, adding 7.)
Below are all solutions below 49 (there is a solution for all numbers over 49.) The magic number 777159 decimal = 2755707 octal encodes the lowest value of i/7 for which a solution exists for each possible value of i%7.
n%7=0                         not possible where i/7<7
n%7=1    1,8,15,22,29,36,43                      i/7<0
n%7=2                                            i/7<7
n%7=3                 38,45                      i/7<5
n%7=4                 39,46                      i/7<5
n%7=5                                            i/7<7
n%7=6        20,27,34,41,48                      i/7<2

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
StackExchange Mustafa can't stand to be asked the same question three times

Austin: "Who sent you?"
Mustafa: "You have to kill me!"
Austin: "Who sent you?"
Mustafa: "Kiss my ass, Powers!"
Austin: "Who sent you?"
Mustafa: "Dr. Evil."
(...)
Mustafa: "I can't stand to be asked the same question three times. It just irritates me."

You are to simulate a short dialogue in the spirit of Austin Powers and Mustafa.  But the data source for the entire conversation will be a StackOverflow question (provided as input from a URL).
Rules
The question asker's username will be used in place of "Austin".  The question they will ask three times comes from the last sentence in the question title, (which has been forced to end in a question mark if it did not already).
StackExchange will be playing the part of "Mustafa".  The answer ultimately given comes from the first sentence in the answer that does not end in a question mark, and will be attributed to the name of the user who answered.
For a question to qualify for the game, it must (a) have an answer, and (b) there must be a sequence of comments on the original question that goes:

comment from someone other than questioner
(any number of skipped comments)
comment from questioner
comment from someone other than questioner
(any number of skippable comments)
comment from questioner

If this sequence is not satisfied prior to the date of the top ranked answer, the program should simply output "Oh, behave!"
StackExchange Mustafa's angry retorts come from the first sentence of the comments from someone other than the questioner that don't end with a question mark--and ensuring it ends with an exclamation mark.  If no sentence exists in the comment that doesn't end in a question mark, it is skipped as a candidate for the retort.  Comment retorts are attributed to the user name of the author.
Clarifications

Strip any leading "@XXX" response data from a comment.
Because StackOverflow summarizes the comments if there are many of them, you will probably have to use a second request to get the full list.  That request is of the form https://stackoverflow.com/posts/NNN/comments?_=MMM with the post ID in N and question ID in M.  See for instance: https://stackoverflow.com/posts/11227809/comments?_=211160
URLs should be stripped to anchor text only.
We'll define a "sentence" as anything outside of a code block that ends in a period, question mark, or exclamation point.  If a run of text has no ending punctuation of this form, then the end of the text is the end of the sentence; as if it were written with a period.
If you're looking for funny test cases that are likely to qualify, you might try using StackExchange Data Explorer, such as Posts with the Most Comments.
... more to come, I'll wager...

Samples
Sample One
Input:
https://stackoverflow.com/questions/2283937/how-should-i-ethically-approach-user-password-storage-for-later-plaintext-retrie/
Output:

shanee: "How should I ethically approach user password storage for later plaintext retrieval?"
stefanw: "I think he knows that it is not good!"
shanee: "How should I ethically approach user password storage for later plaintext retrieval?"
Rook: "Perhaps you should ask how you can implement a Buffer Overflow Vulnerability in a Secure way!"
shanee: "How should I ethically approach user password storage for later plaintext retrieval?"
Michael Burr: "Ask why the password is required to be in plaintext: if it's so that the user can retrieve the password, then strictly speaking you don't really need to retrieve the password they set (they don't remember what it is anyway), you need to be able to give them a password they can use."

Sample Two
Input:
http://scifi.stackexchange.com/questions/2611/why-dont-muggle-born-wizards-use-muggle-technology-to-fight-death-eaters
Output:

DVK: "Why don't muggle-born wizards use Muggle technology to fight Death Eaters?"
DampeS8N: "This dances on the edge again!"
DVK: "Why don't muggle-born wizards use Muggle technology to fight Death Eaters?"
DampeS8N: "Right, but this site isn't about pointing out plot holes!"
DVK: "Why don't muggle-born wizards use Muggle technology to fight Death Eaters?"
Jeff: "I believe, though I've been unable to find a reference, that JK Rowling actually mentioned this at one point."

Sample Three
Input:
https://stackoverflow.com/questions/11227809/why-is-processing-a-sorted-array-faster-than-an-unsorted-array
Output:

"Oh, behave!"

(The top rated answer time is Jun 27 '12 at 13:56, while the second follow-up comment on the question by the questioner is at time Jun 27 '12 at 14:52.  Hence, there isn't a causal link between the second follow-up and the answer.  :-P)
Winning Criteria
Code Golf - shortest code wins.

Just spent the last half hour reading that Harry Potter thread. +1 for that!

There have been no new answers to this question in a while. Maybe it is time to end it now, or at least add a deadline?

@LarsEbert Done... (though I actually was going to take a crack at it in Rebmu, the odds of it making it on my schedule are slim ATM.)

You can still add it in the future. I would love to see an alternative (and possibly shorter) solution.

PHP, 1282 chars
While 1282 quite huge for a code golf challenge, the challenge is quite complex. (And I am not very good at golf.)
<?php function a($a,$b='q'){$a=strip_tags(htmlspecialchars_decode($a,ENT_QUOTES));$a=preg_replace('/^@[^ ]+\s+/','',$a);$a=mb_split('(?<=(?:\.|!|\?))\s+',$a);if($b=='q'){return preg_replace('/(?:\.|!|\?)$/','',$a[0]).'?';}else{foreach($a as$s){if(!preg_match('/\?$/',$s)){if($b=='c'){return preg_replace('/(?:\.|!)$/','',$s).'!';}else{return preg_replace('/(?<!(?:\.|!))$/','.',$s);}}}}return 0;}function b($a){return json_decode(gzdecode(file_get_contents('http://api.stackexchange.com/2.2/questions/'.$a)));}function c($a){return $a->owner->display_name;}$n="\n";$x="Oh, behave!\n";$r=parse_url($argv[1]);$b=explode('/',$r['path']);$b=$b[2];$u=b($b.'?site='.$r['host']);$u=$u->items[0];$c=b($b.'/comments?filter=withbody&order=asc&sort=creation&site='.$r['host']);$a=b($b.'/answers?filter=withbody&order=desc&sort=votes&site='.$r['host']);if(!count($a->items)||!count($c->items))die($x);$a=$a->items[0];$s=array();$d=1;foreach($c->items as$e){if($e->creation_date>$a->creation_date)break;if($e->owner->user_id==$u->owner->user_id){$d=1;}elseif($d){$e->body=a($e->body,'c');if($e->body){$s[]=$e;}$d=0;}}if(count($s)<2)die($x);$q=c($u).': "'.a($u->title,'q').'"'.$n;echo$q.c($s[0]).': "'.$s[0]->body.'"'.$n.$q.c($s[1]).': "'.$s[1]->body.'"'.$n.$q.c($a).': "'.a($a->body,'a').'"'.$n;

Ungolfed version
<?php

    function firstSentence($string, $type = 'q') {
        $string = strip_tags(htmlspecialchars_decode($string, ENT_QUOTES));
        $string = preg_replace('/^@[^ ]+\s+/', '', $string);
        $string = mb_split('(?<=(?:\.|!|\?))\s+', $string);
        if($type === 'q') {
            return preg_replace('/(?:\.|!|\?)$/', '', $string[0]) . '?';
        } else {
            foreach($string as $s) {
                if(!preg_match('/\?$/', $s)) {
                    if($type === 'c') {
                        return preg_replace('/(?:\.|!)$/', '', $s) . '!';
                    } else {
                        return preg_replace('/(?<!(?:\.|!))$/', '.', $s);
                    }
                }
            }
        }
        return false;
    }

    $x = "Oh, behave!\n";

    $url = parse_url($argv[1]);
    $api = 'http://api.stackexchange.com/2.2/';

    $id = explode('/', $url['path']);
    $id = $id[2];

    $question = json_decode(gzdecode(file_get_contents($api . 'questions/' . $id . '?site=' . $url['host'])));
    $question = $question->items[0];
    $comments = json_decode(gzdecode(file_get_contents($api . 'questions/' . $id . '/comments?filter=withbody&order=asc&sort=creation&site=' . $url['host'])));
    $answer = json_decode(gzdecode(file_get_contents($api . 'questions/' . $id . '/answers?filter=withbody&order=desc&sort=votes&site=' . $url['host'])));
    if(!count($answer->items) || !count($comments->items))
        die($x);

    $answer = $answer->items[0];

    $selected = array();
    $usable = true;
    foreach($comments->items as $comment) {
        if($comment->creation_date > $answer->creation_date)
            break;
        if($comment->owner->user_id === $question->owner->user_id) {
            $usable = true;
        } elseif($usable) {
            $comment->body = firstSentence($comment->body, 'c');
            if($comment->body !== false) {
                $selected[] = $comment;
            }
            $usable = false;
        }
    }

    if(count($selected) < 2)
        die($x);

    $q = $question->owner->display_name . ': "' . firstSentence($question->title, 'q') . '"' . "\n";
    echo $q;
    echo $selected[0]->owner->display_name . ': "' . $selected[0]->body . '"' . "\n";
    echo $q;
    echo $selected[1]->owner->display_name . ': "' . $selected[1]->body . '"' . "\n";
    echo $q;
    echo $answer->owner->display_name . ': "' . firstSentence($answer->body, 'a') . '"' . "\n";

?>

You can chain all of those $a=function(1,2,$a) things together.


text:
The Golf (re)Sort
The Golf (re)Sort

Everyone is sorting arrays these days, and so do we at our day jobs. But we like to go out golfing. When we do, we sure like to take our time. It is important to have a stress free experience.
Since we like golfing so much, we have decided to make a sorting algorithm that will let us stay away from the desk as much as possible. We decided to make Golf (re)Sort, a sorting algorithm that takes as time long as possible to complete. This way we can spend more time doing what we like the most, golfing.

The task is easy: Sort an array of integers using an algorithm that takes as long time, and has as high O-notation, as possible.
The rules:

The algorithm must be deterministic. Thus you may not use randomness in the algorithm (so no bogosort)
You may not use any un-productive operations or loops. Eg.: sleep 2, for i<n; i++ {/*no-op*/}, Open("www.the_internet.com").download. Every operation needs to bring you closer to the goal of a sorted list. An example would be to simply reverse the array for no other reason than reversing the array to increase the Ω-notation.

Provide:

Name of the language
The code
An explanation to the approach + Ω(Big-Omega)-notation (lower bound).

Scoring:
Scoring will be done by looking at the Ω-runtime. The higher the better.

Example:
Language: Ruby
Code:
a = [6,9,7,5,7,90,9,6,4,32,9,7,4,223]
sorted = []

while a.count > 0
    min = [Float::INFINITY, -1]
    a.each_with_index do |e,i|
        min = [e,i] if e < min[0]
    end
    sorted << min[0]
    a.delete_at(min[1])
end

puts sorted.to_s

This is a variation on selection sort which have runtime of Ω(n^2). It is slow because it scans the array for the lowest value, then pushes that to the result array. It then deletes the value from the original array and starts over.

It should be Big-Omega instead of Big-O, since e.g. mergesort is in O(n!).

You should make it more clear in your question that the score is based on the algorithmic complexity of the answers. http://stackoverflow.com/a/12338937/1275256

This a a code-bowling problem, except with algorithmic complexity rather than number of characters. I suspect it will run into the same pitfalls. You need to be more precise with what you consider a useless operation, and what "closer" means in "Every operation needs to bring you closer to the goal of a sorted list."

@fabian You'r right. It should be lower bound.

There is no quicker learning than when you "did something wrong" on SO or one of it's sister-sites.

@gxtaillon I am considering scoring by time it takes to calculate on a given set of input on my machine, just for consistency and easier comparison. It would change the "course" of the question a bit since slow languages then would be preferred. What do you think of that?

There's one in a [code-trolling] question that has a C sorting program of O(n!...!) with the factorial repeated n times. Can't find it.

A fair few of the answers to http://codegolf.stackexchange.com/q/20478/194 could be reposted as is, so this is at best borderline for being a dupe.

Started a meta question about [changing the win] condition(http://meta.codegolf.stackexchange.com/).

Python
def ackermann(m, n):
    if m == 0:
        return n + 1
    if n == 0:
        return ackermann(m - 1, 1)
    return ackermann(m - 1, ackermann(m, n - 1))

def sort(lst):
    newlst = []
    while len(lst) > 0:
        a, i = min([(ackermann(n, n), i) for i, n in enumerate(lst)])
        newlst.append(lst[i])
        del lst[i]
    return newlst

Uses Ackermann function to slow things down. That may qualify as unproductive...
Use example:
print sort([3, 1, 2, 3, 0]) # --> [0, 1, 2, 3, 3]

It actually works quite well for numbers between 0 and 3. (Note that it's destructive and only works for non-negative integers.)
Runtime - I'm not quite sure.

k4 (100)
  {{if[y<z;.z.s[x]'[y,m+1;(m:_(y+z)%2),z];if[(x m)>x z;@[x;z,m;:;x m,z]];.z.s[x;y;z-1]]}[x;0](#. x)-1}

This is a fairly straightforward (i.e. not particularly golfed) implementation of slowsort.
Here's a sample run, with timing information in milliseconds (the \t instruction):
  s:{{if[y<z;.z.s[x]'[y,m+1;(m:_(y+z)%2),z];if[(x m)>x z;@[x;z,m;:;x m,z]];.z.s[x;y;z-1]]}[x;0](#. x)-1}
  l:100?1000
  \t s`l
4270

The paper (v.s.) claims that the last few paragraphs of section 5 contain a proof of the running time of the algo, but I can't make heads or tails of it; all I know is that 4.2 seconds to sort 100 ints is pretty slow.
(I should also note that this implementation is an in-place sort, as given in the paper, which is why the list to sort is passed by name, rather than by value. This is rather strongly contrary to the functional programming principles of k4/q, but it was easier than figuring out a proper functional version.)

Python
This one isn't golfed, because I'm not much of a code golfer yet.
def sorted(l):
    for i in range(1, len(l)):
        if l[i] < l[i-1]:
            return False
    return True

class T:
    def __init__(self,l1,l2):
        self.l1 = l1
        self.l2 = l2
        self.children = []

    def build(self):
        if len(self.l2) == 0:
            return
        else:
            for i in range(0, len(self.l2)):
                nl1 = self.l1[:]
                nl2 = self.l2[:]
                nl1.append(self.l2[i])
                nl2.pop(i)
                child = T(nl1, nl2)
                child.build()
                self.children.append(child)

    def find_sorted(self):
        if len(self.l2) == 0:
            if sorted(self.l1):
                return self.l1
            return None
        result = None
        for child in self.children:
            if child.find_sorted() is not None:
                result = child.find_sorted()
        return result

def sort(l):
    tree = T([],l)
    tree.build()
    return tree.find_sorted()

Been a while since I took any classes so I'm trying to think of how to word the complexity.
I know the number of nodes in the tree can be calculated with:
def numberOfNodes(n):
    if n==0:
        return 1
    return 1 + n * numberOfNodes(n - 1)

It builds this entire tree and searches through every node.  So for a list size grows very fast:
0       1
1       2
2       5
3       16
4       65
5       326
6       1957
7       13700
8       109601
9       986410
10      9864101

If searching every node is cheating I can change that.
A list of 9 elements took about 6 seconds, and a list of 10 elements ran out of memory (used at least 1.9 GB of ram before it chickened out 25 seconds in).

Python, Omega(n^(n+2))
def sort(a):
    for i in xrange(len(a)**len(a)):
        b = list(a)
        for j in range(len(a)):
            k = i / len(a)**j % len(a)
            b[0], b[k] = b[k], b[0]
        if all(b[x] <= b[y] for x in range(len(a)) for y in range(x, len(a))):
            return b

Tries all possible orderings (and then some), returning only if the array is sorted.  Uses Omega(n^2) to test if it's sorted, just to add insult to injury.

Wouldn't this just be n^n?


text:
Draw a Permutation Path
Imagine the following diagrams as sets of vertical criss-crossing tubes.
1 2    1 2    1 2 3 4
\ /    \ /    \ / \ /
 X      |      |   |
/ \    / \    / \ / \
2 1    1 2   |   X   |
              \ / \ /
               X   X
              / \ / \
              3 1 4 2

In the leftmost diagram, the 1 and 2 slide down their respective slashes, cross at the X, and come out at opposite sides from where they started.
It's the same idea in the middle diagram, but the | signifies that the paths do not cross, so nothing changes.
The rightmost diagram shows a more complex tube routing that permutes 1 2 3 4 into 3 1 4 2.
Goal
Your goal in this code golf challenge is to draw these "tube routing diagrams" given a permutation such as 3 1 4 2. The shortest program in bytes will win.
Details

Input comes from stdin as any permutation of the numbers from 1 to n separated by spaces, where n is a positive integer. You may assume all input is well formed.
The routing diagram output goes to stdout.

"Dropping" the numbers 1 through n in order into the top of the diagram should result in the input permutation coming out at the bottom. (Top and bottom are always layers of slashes.)
The diagram does not need to be optimally small. It may be as many levels as necessary as long as it is correct.
The diagram should only contain the characters \/ X| as well as newlines (no numbers).
| should always be used on the outermost intersections since using X wouldn't make sense.
A few leading or trailing spaces is fine as long as the diagram is all lined up correctly.

Examples
An input of 3 1 4 2 might produce (same as above)
 \ / \ /
  |   |
 / \ / \
|   X   |
 \ / \ /
  X   X
 / \ / \

An input of 1 might produce
 \
  |
 /
|
 \
  |
 /

An input of 3 2 1 might produce
 \ / \
  X   |
 / \ /
|   X
 \ / \
  X   |
 / \ /

An input of 2 1 3 4 6 5 might produce
\ / \ / \ /
 X   |   X
/ \ / \ / \

Great question! I can't believe it's only been two weeks that you joined -- you seem to be everywhere.

@xnor :D Thanks a bunch. But really I've been spending too much time here...

Can an X connect directly to a | the way a / does? To another X?

@xnor No. It should always be in the row of slashes, row of X's and |'s, row of slashes, row of X's and |'s, ... format.

Can n be larger than 10?

@Ourous Yes. n can be arbitrarily large (to a reasonable amount like 2^32). Remember that you don't draw the numbers in the diagram.

Should the very first tube on the very first line of tubes be \ or can it be /?

@jaybz It should always be a .

@Calvin'sHobbies: This is a great question, but I passed it by a couple times 'cause it's title seemed too technical/scary-sounding.  Maybe you'd get more views if it were simpler/funnier.

@SuperScript Thanks :) Can you suggest a more approachable title?

Python 2, 218 219 220 222 224 227 243 247 252 259 261 264
l=map(int,raw_input().split())
f=n=len(l)
o=s=n*' \ /'
while f+n%2:
 f-=1;i=f+n&1;a=s[2*i:][:2*n]+'\n|   '[::2-i]
 while~i>-n:a+='|X'[l[i+1]<l[i]]+'   ';l[i:i+2]=sorted(l[i:i+2]);i+=2
 o=a+f%2*'|'+'\n'+o
print o[:-2*n]

I took a slightly different approach: I find the swaps necessary to sort the input, then vertically invert that to get the swaps necessary to turn the sorted list into the input. As an added bonus of this approach, it can take an arbitrary list of numbers and give the permutation path to turn the sort of the input into the input.
Example:
$ python sort_path.py <<< '3 1 4 5 9 2 6 8 7'
 \ / \ / \ / \ / \
  |   |   |   |   |
 / \ / \ / \ / \ /
|   |   |   |   |
 \ / \ / \ / \ / \
  |   |   |   |   |
 / \ / \ / \ / \ /
|   |   |   |   |
 \ / \ / \ / \ / \
  |   |   |   |   |
 / \ / \ / \ / \ /
|   X   |   |   X
 \ / \ / \ / \ / \
  |   X   |   X   |
 / \ / \ / \ / \ /
|   |   X   X   |
 \ / \ / \ / \ / \
  X   |   X   |   |
 / \ / \ / \ / \ /
|   |   |   |   X
 \ / \ / \ / \ / \

Improvements:
264 -> 261: Switched outer loop from for to while.
261 -> 259: Used f%2 instead of (c^m), because in python arithmetic operators have higher priority than bitwise operators.
259 -> 252: Switched inner loop from for to while. Combined i and c variables.
252 -> 247: Changed build then reverse to just build in reverse order.
247 -> 243: Added newlines manually, instead of using join.
243 -> 227: Adopted grc's method of slash line generation (thanks grc!) and added s.
227 -> 224: Moved slash line generation to before inner while loop to remove a %4 and save a character by using extended slicing.
224 -> 222: Removed m.
222 -> 220: f%2+n%2 -> f+n&1
220 -> 219: | 1<n-1| -> |~i>-n| (removed leading space)
219 -> 218: Combined initializations of o and s and moved the slice to the end.

Python, 290
def g(o,u=1):
 s=['|']*o
 for i in range(o,n-1,2):v=r[i+1]in a[:a.index(r[i])]*u;s+=['|X'[v]];r[i:i+2]=r[i:i+2][::1-2*v]
 print'  '*(1-o)+'   '.join(s+['|']*(o^n%2))*u+'\n'*u+(' / \\'*n)[2*o:][:n*2]
a=map(int,raw_input().split())
n=len(a)
r=range(1,n+1)
o=1
g(1,0)
g(0)
while r!=a:g(o);o^=1

I went for a fairly basic approach, but it turned out a bit longer than I was hoping. It considers the list in pairs and decides whether or not to swap each pair. This is repeated for every intersecting row until the list matches the input.
Example:
$ python path.py
5 3 8 1 4 9 2 7 6
 \ / \ / \ / \ / \
  |   |   |   X   |
 / \ / \ / \ / \ /
|   X   X   X   X
 \ / \ / \ / \ / \
  X   X   X   X   |
 / \ / \ / \ / \ /
|   X   X   |   X
 \ / \ / \ / \ / \
  X   X   X   |   |
 / \ / \ / \ / \ /
|   |   |   X   |
 \ / \ / \ / \ / \

HTML JavaScript, 553 419
Thank you to @izlin and @TomHart for pointing out my errors.
p=prompt();b=p.split(" "),l=b.length,d=l%2,o="",s=["","","\\/"],n="\n",a=[];for(i=0;i<l;i++){a[b[i]-1]=i+1;s[1]+=" "+s[2][i%2];s[0]+=" "+s[2][(i+1)%2];o+=" "+(i+1)}s[1]+=n,s[0]+=n;o+=n+s[1];f=1,g=2;do{var c="";for(var i=(f=f?0:1);i<l-1;i+=2)if(a[i]>a[i+1]){c+="  x ";g=2;t=a[i];a[i]=a[i+1];a[i+1]=t;}else c+="  | ";if(g==2){o+=(d?(f?"| "+c:c+"  |"):(f?"| "+c+"  |":c))+n;o+=(s[f]);}}while(--g);o+=" "+p;alert(o);

Test here: http://goo.gl/NRsXEj

You made one little mistake: the first line should be the sorted numbers and the last line should be your input like in the examples above.

You are right.  Thanks.  I looked at @grc's output and thought the numbers were the starting position.  Oops.

I might be looking at this wrong, but in both picture you posted, isn't the last row redundant as nothing changes?

Yes you are right.  I knew this was a consensus of how I did it.  But it probably doesn't have to be.  I'll think about this.  Thanks for the comment.

@izlin - Thanks for noticing this.  I fixed this error.

@TomHart - Thanks for noticing this.  I fixed this error.

Javascript - 395
378 if i don't print the numbers on my output, but it looks much better and improves the readability.Test it here. (with ungolfed version)
golfed Version:
a=prompt(),n=a.split(" "),l=n.length,k=[],s="",i=1;for(j=0;j<l;j++){k[n[j]-1]=j+1;s+=" "+(j+1)}s+="\n";while(i++){for(j=0;j<l;j++)s+=i%2?j%2?" \\":" /":j%2?" /":" \\";for(z=0,y=0;z<l-1;z++)if(k[z]>k[z+1])y=1;if(y==0&&i!=2)break;s+="\n";for(m=i%2;m<l;m+=2){s+=i%2&&m==1?"|":"";if(k[m]>k[m+1]){[k[m],k[m+1]]=[k[m+1],k[m]];s+=i%2?"   X":"  X "}else{s+=i%2?"   |":"  | "}}s+="\n"}s+="\n "+a;alert(s)

Explanation
First I substitude the input, with the index number and change the first line with the results. For example
3 1 4 2
v v v v substitude with
1 2 3 4

so the first line will become:
1 2 3 4
v v v v
2 4 1 3

sorting 1,2,3,4 to 3,1,4,2 is equivalent to 2,4,1,3 to 1,2,3,4

With this substitution i can use a bubble-sort algorithm to sort 2,4,1,3 to 1,2,3,4 and the graph will be the shortest possible one we're searching for.
If you have any ideas how i can make the code smaller just comment :)
Example
input: 3 4 2 1 7 5 6
output:
 1 2 3 4 5 6 7
 \ / \ / \ / \
  X   |   |   |
 / \ / \ / \ /
|   X   |   X
 \ / \ / \ / \
  X   X   X   |
 / \ / \ / \ /
|   X   |   |
 \ / \ / \ / \
 3 4 2 1 7 5 6

(1) I see that you use the BR tag in a three places, and so you could save a little by putting this in a variable.  Also you could probably use \n since your outputting to a PRE.

(2) I've been trying different ways to deal with golfing JavaScript and also having convenient input and output.  I think I like my latest method inspired by your prompt and alert...  I use prompt and alert in the code so it can be pasted into a console and it works for anyone.  But I also made a webpage with a TEXTAREA and PRE to show it working.  The webpage overrides prompt and alert to use the TEXTAREA and PRE - so it's the same code and there is less confusion - maybe?

@JeffSB I used the <br> tag and textarea only on jsfiddle, because it looks much better. The alert has no monospaced font so the output looks bad. In my golfed Version I use alert and \n. Is your webpage public?

Cobra - 334 344 356 360
class P
    def main
        a,o,n=CobraCore.commandLineArgs[1:],['/','\\'],0
        c,l=a.count,a.sorted
        while (n+=1)%2or l<>a
            p,d='',(~n%4+4)//3
            for i in n%2*(c+1-c%2),p,o=p+o[1]+' ',[o.pop]+o
            for i in 1+d:c-n%2*c:2
                z=if(l[:i]<>a[:i],1,0)
                l.swap(i-z,i)
                p+=' ['|X'[z]]  '
            print[['','| '][d]+[p,p+'|'][d^c%2],p][n%2][:c*2]

It works by moving each element into place starting from the left. Due to this, it will often output a ridiculously large (although still correct) path-map.
Examples:
3 1 4 2

\ / \ /
 X   X
/ \ / \
|  X  |
\ / \ /
 X   X
/ \ / \
|  X  |
\ / \ /
 X   X
/ \ / \
|  X  |
\ / \ /