You might find this interesting.
It uses "ANSI Escape Sequences" to plot things on the console - or at least it does under Linux. I haven't tested it in a Windows Console.
Code:
#include <stdio.h>
#include <unistd.h>
#include <math.h>
static const char ansi_clear[] = "\033[3J\033[H\033[2J";
static const char ansi_goto[] = "\033[%i;%iH";
void clear(void) {
printf(ansi_clear);
}
void plot(int x, int y, char c) {
printf(ansi_goto,y,x);
putchar(c);
putchar('\b');
fflush(stdout);
}
int main(int argc, char *argv[]) {
int i;
clear();
for(i=0; i < 1000; i++) {
// Map to screen coordinates
int pos_x = sin(i*M_PI/200)*30+40+0.5;
int pos_y = cos(i*M_PI/200)*10+16+0.5;
plot(pos_x, pos_y,'O');
usleep(50000);
plot(pos_x, pos_y,'.');
}
}