pakt18

#include "cinder/app/AppBasic.h"
#include "cinder/cairo/Cairo.h"

using namespace ci;
using namespace ci::app;
using namespace std;

const int WIDTH= 640;
const int HEIGHT= 480;

class pakt18App : public AppBasic {
public:
void prepareSettings(Settings *settings);
void setup();
void draw();
int index;
float w, h;
float a, b, c, d;
float spread;
int n;
};

void pakt18App::prepareSettings(Settings *settings) {
settings->setWindowSize(WIDTH, HEIGHT);
settings->setResizable(false);
}

void pakt18App::setup() {
index= 0;
w= getWindowWidth();
h= getWindowHeight();
n= 50;
}

void pakt18App::draw() {

spread= sin(index*0.002f)*50.0f+(sin(index*0.003f)*40.0f);

cairo::Context ctx= cairo::Context(cairo::createWindowSurface());
ctx.setSourceRgb(0.0, 0.0, 0.0);
ctx.paint();
ctx.setLineWidth(1.0);
for(int i= 0; i