• fullscreen
• doppelkreise.pde
• kreisObjekt.pde
• ```int anzahlKreise =4;
int faktor = 3;

//Objekte
kreisObjekt[] kreis;

void setup()
{
size (400*faktor,200*faktor);
background (220,220,200);
kreis = new kreisObjekt[anzahlKreise];
for (int i=1; i<anzahlKreise;i++)
{
kreis[i] = new kreisObjekt(i);
}
}

void draw()
{
for (int i=1; i<anzahlKreise; i++)
{
kreis[i].kreisBerechnen();
kreis[i].sinusKreisBerechnen();
kreis[i].draw();
}

}

```
```class kreisObjekt
{
// Variablen der Kreisberechnung
int kIndex;
float kStartX;
float kStartY;
float kx;
float ky;
float kRadius;
float kRand = 80;
float kWinkel = 0;
float kZunahme = 0.004;  //Zunahme des Winkels bei Kreisfunktion

//Variablen der Sinuskreisberechnung
float skx;
float sky;
float skRadius;
float ska;
float sk;
float kphi= 0;
float SKzunahme = 0.2;

kreisObjekt(int index)
{
kIndex = index;
kRadius = 0.5*(width - kRand*(anzahlKreise))/(anzahlKreise-1);
//Berechnung der Kreiszentren
kStartX = (kIndex * (kRand + 2 * kRadius))-kRadius;
//println (kStartX);
kStartY = height/2;
skRadius = kRadius/3;
ska = (2*kRadius)/3;
sk = 1;
}

void kreisBerechnen()
{
kx = kStartX + cos(kWinkel) * kRadius;
ky = kStartY + sin(kWinkel) * kRadius;
kWinkel += kZunahme;
}

void sinusKreisBerechnen()
{
skx = (skRadius +ska * sin(kphi*sk))*cos(kphi)+kStartX;
sky = (skRadius +ska * sin(kphi*sk))*sin(kphi)+kStartY;
kphi += 0.002;
println (skx + " " +sky);
stroke (0,0,0,2);
line (skx,sky,kx,ky);
}

void draw()
{
stroke ( 0,0,0,2);
point (kx,ky);
stroke ( 0,0,255,2);
point (skx,sky);
}
}
```

### about this sketch

This sketch is running as Java applet, exported from Processing.

### advertisement

Report Sketch

Report for inappropriate content

Please provide details if possible:

Your have successfully reported the sketch. Thank you very much for helping to keep OpenProcessing clean and tidy :)

Make a Copyright Infringement claim

## something like circles

You must login/register to add this sketch to your favorites.

combination of circles and sinus curve

You need to login/register to comment.