int x, y; openWin(256, 256); for (y = 0; y < 256; y++) { for (x = 0; x < 256; x++) setPix(x, y, rgb(x, y, 0)); }
int i; setCol(0x0000ff); setBCol(0xc6c6c6); openWin(160, 144); for (i = 0; i <= 60; i += 3) drawRect(19 + i * 2, 139 - i * 2, 71 - i, 3 + i);
struct POINT { int x, y; }; static struct POINT t[16] = { { 196, 100 }, { 187, 61 }, { 164, 29 }, { 129, 9 }, { 90, 5 }, { 53, 17 }, { 23, 44 }, { 7, 81 }, { 7, 119 }, { 23, 156 }, { 53, 183 }, { 90, 195 }, { 129, 191 }, { 164, 171 }, { 187, 139 }, { 196, 100 } }; static int c[8] = { 0x000000, 0xff0000, 0x00ff00, 0xffff00, 0x0000ff, 0xff00ff, 0x00ffff, 0xffffff }; int i, j, d; openWin(200, 200); setMode(BL_POR); for (i = 0; i <= 14; i++) { for (j = i + 1; j <= 15; j++) { d = j - i; /* 2つの点の距離 */ if (d >= 8) d = 15 - dis; /* 逆回りに数える */ if (d != 0) { setCol(c[8 - d]); if (t[i].x <= t[j].x) drawLine(t[i].x, t[i].y, t[j].x, t[j].y); else drawLine(t[j].x, t[j].y, t[i].x, t[i].y); } } }
int x, y; openWin(256, 256); for (y = 0; y < 256; y++) { for (x = 0; x < 256; x++) setPix(x, y, rgb(x, y, 0)); } locate(13, 8); color(7, 0); printf("hello");
(This host) = http://osask.net