// title: SC Cube (from the list archives) // author: rukano // description: // 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 // code: ( 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; )