Improved Manipulate, 2D/3D Tab, Color Styles, Equation Labels ... Enjoy!
TabView[{
"2D" -> Manipulate[n = 1000;
r := RandomInteger[{1, n}];
f := (#/(.01 + Sqrt[#.#])) & /@ (x[[#]] - x) &;
s := With[{r1 = r}, p[[r1]] = r; q[[r1]] = r];
x = RandomReal[{-1, 1}, {n, 2}];
{p, q} = RandomInteger[{1, n}, {2, n}];
Graphics[{Opacity[opacity], PointSize[size],
Dynamic[If[r < 200, s];
Point[y = x; x = c*x + ps*f[p] - qs*f[q],
VertexColors -> (ColorData[col][color*Norm[#]] & /@ (x - y))]]}, PlotRange -> Range, ImageSize -> {700, 600},
Background -> Black], Delimiter, Style[" 2D Dancing with
friends and enemies", Bold, Large], Delimiter, Style["Equation
x = c x + ps f[p] - qs f[q]
where
\!\(\*FormBox[\(\(\\\ \\\ \\\ \\\ \\\ \\\ \\\ \\\ \\\ \\\ \\\ \
\\\ \\\ \\\ \\\ \\\ \\\ \\\ \\\ \\\ \\\ \\\ \\\ \\\ \\\ \\\ \\\ \\\ \
\\\ \)\(f[a] = \*FractionBox[\((a - x)\), \(0.01 + \*SqrtBox[\(\((a - \
x)\) . \((a - x)\)\)]\)]\)\),
TraditionalForm]\)
", Bold, Medium], Delimiter,
Dynamic[Graphics[{Style[
Text@TraditionalForm@
Style[Row[{"x = ", c "x + ", ps " f[p] -", qs "f[q]"}]],
15]}, ImageSize -> {240, 50}]], Delimiter,
Style["Step towards their friend", Bold,
Medium], {{ps, 0.02, "Step Size ps"}, 0, 1,Appearance -> "Open"}, Delimiter,
Style["Step away from their enemy", Bold,
Medium], {{qs, 0.01, "Step Size qs"}, 0, 1, Appearance -> "Open"},
Delimiter, {{c, 0.995, "Contraction c"}, 0.5, 1.1, Appearance -> "Open"},
Delimiter, {{size, 0.015, "Point Size"}, 0.001, 0.05}, {{Range, 1, "Plot Range"}, 0.1, 5}, {{opacity, 1, "Opacity"}, 0.1, 1}, {{color, 62, "Color Scale"}, 0, 100},
Control[{{col, "SolarColors", "Color Style"},
(# -> Row[{Show[ColorData[#, "Image"], ImageSize -> 100], Spacer[10], #}]) & /@ ColorData["Gradients"], PopupMenu}],
ControlPlacement -> Left],
"3D" -> Manipulate[n = 1000;
r := RandomInteger[{1, n}];
f3d := (#/(.01 + Sqrt[#.#])) & /@ (x3d[[#]] - x3d) &;
s := With[{r1 = r}, p[[r1]] = r; q[[r1]] = r];
x3d = RandomReal[{-1, 1}, {n, 3}];
{p, q} = RandomInteger[{1, n}, {2, n}];
Graphics3D[{Opacity[opacity], PointSize[size],
Dynamic[If[r < 200, s];
Point[y = x3d; x3d = c*x3d + ps*f3d[p] - qs*f3d[q],
VertexColors -> (ColorData[col][color*Norm[#]] & /@ (x3d - y))]]}, PlotRange -> Range, ImageSize -> {700, 600},
Background -> Black, Boxed -> boxed], Delimiter,
Style[" 3D Dancing with
friends and enemies", Bold, Large], Delimiter, Style["Equation
x = c x + ps f[p] - qs f[q]
where
\!\(\*FormBox[\(\(\\\ \\\ \\\ \\\ \\\ \\\ \\\ \\\ \\\ \\\ \\\ \
\\\ \\\ \\\ \\\ \\\ \\\ \\\ \\\ \\\ \\\ \\\ \\\ \\\ \\\ \\\ \\\ \\\ \
\\\ \)\(f[a] = \*FractionBox[\((a - x)\), \(0.01 + \*SqrtBox[\(\((a - \
x)\) . \((a - x)\)\)]\)]\)\),
TraditionalForm]\)
", Bold, Medium], Delimiter,
Dynamic[Graphics[{Style[
Text@TraditionalForm@
Style[Row[{"x = ", c "x + ", ps " f[p] -", qs "f[q]"}]],
15]}, ImageSize -> {240, 50}]], Delimiter,
Style["Step towards their friend", Bold,
Medium], {{ps, 0.02, "Step Size ps"}, 0, 1, Appearance -> "Open"}, Delimiter,
Style["Step away from their enemy", Bold,
Medium], {{qs, 0.01, "Step Size qs"}, 0, 1, Appearance -> "Open"},
Delimiter, {{c, 0.995, "Contraction c"}, 0.5, 1.1, Appearance -> "Open"},
Delimiter, {{size, 0.015, "Point Size"}, 0.001, 0.05}, {{Range, 1, "Plot Range"}, 0.1, 5}, {{opacity, 1, "Opacity"}, 0.1, 1}, {{color, 62, "Color Scale"}, 0, 100},
Control[{{col, "SolarColors", "Color Style"},
(# ->Row[{Show[ColorData[#, "Image"], ImageSize -> 100], Spacer[10], #}]) & /@ ColorData["Gradients"],
PopupMenu}], {boxed, {True, False}}, ControlPlacement -> Left]},
ControlPlacement -> Left]
Thanks to Andre and Vitaliy for suggesting some of these improvements.