«SC Cube (from the list archives)» by rukano

on 14 Feb'12 19:58 in supercollidercubelogofanboy

One face of the SC cube. Code originally by Batuhan Bozkurt (iirc). Feel free to fork and pimp or make a 3D version of the cube ;)

Code taken from: http://comments.gmane.org/gmane.comp.audio.supercollider.user/58758

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
(
var w, v, r, c;
var sideLength = 360;
w = SCWindow("icon", Rect(100, 100, sideLength * 1.2, sideLength * 1.2));
w.view.background = Color(0.5,0.5,0.8);

r = Rect(20, 20, sideLength, sideLength);
c = [ -0.0625, 1.0625 ]; 

8.do {|i|
v = SCStaticText(w, r);
v.background = Gradient( Color.grey(c[i>>1+1&1]), Color.grey(c[i>>1&1]), [\v, \h][i&1], 512);
r = r.insetBy(sideLength / 16, sideLength / 16);
r.postln;
c = c + [1/16, -1/16];
c.postln;
};

w.front;
)
raw 477 chars (focus & ctrl+a+c to copy)
reception
comments