これだけのプログラムでbballが描けます。
#include "bla_easy.h"
int col[8] = { 0x000000, 0xff0000, 0x00ff00, 0xffff00, 0x0000ff, 0xff00ff, 0x00ffff, 0xffffff };
struct aPoint {
int x, y;
} p[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 }
};
int main()
{
Window *win = openWin(200, 200, "bball");
setMode(win, MODE_OR);
int i, j, c;
for (i = 0; i < 15; i++) {
for (j = 0; j < 16; j++) {
c = i - j + 8;
if (c <= 0)
c = 1 - c;
if (c <= 7)
drawLineEx(win, p[i].x, p[i].y, p[j].x, p[j].y, col[c]);
}
}
end();
}