pakt03

#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 pakt03App : public AppBasic {
public:
void prepareSettings(Settings *settings);
void setup();
void draw();
int index, n;
};

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

void pakt03App::setup() {
index= 0;
n= 50;
}

void pakt03App::draw() {

float x= getWindowCenter().x;
float y= getWindowCenter().y;
float w= getWindowWidth()*0.4;
float h= getWindowHeight()*0.4;
float spreadx= sin(index*0.005);
float spready= sin(index*0.011);
float phaseshift= sin(index*0.001)*M_PI*2;
float wx= w*(sin(index*0.004)*0.45+0.55);
float hy= h*(sin(index*0.004)*0.45+0.55);

cairo::Context ctx(cairo::createWindowSurface());

cairo::GradientRadial radialGrad(getWindowCenter(), 0, getWindowCenter(), getWindowWidth());
radialGrad.addColorStop(0, Color(0.7, 0.6, 0.5));
radialGrad.addColorStop(1, Color(0, 0, 0));
ctx.setSource(radialGrad);
ctx.paint();

for(int i= 0; i