xxxxxxxxxx
var text;
function preload () {
text = loadFont ("Anton-Regular.ttf");
}
var book;
function preload () {
book = loadFont ("RobotoCondensed-Regular.ttf");
}
function setup() {
createCanvas(568, 800);
background(100);
}
function draw() {
rectMode(CENTER);
translate(width/2, height/2);
//Hintergrund
fill(0);
rect(0,0,490,730);
rectMode(CORNER)
fill(83,146,177);
rect(-245,-367,491,210);
//Kopfzeilen
stroke(0);
line(-245,-307,460,-307);
line(-245,-205,460,-205);
strokeWeight(1);
noStroke();
fill(100);
rect(246,-367,491,210);
//Planetenbahnen
noFill();
stroke(83,146,177);
strokeWeight(3);
ellipse(0, 0, 220*2, 120*2);
ellipse(0, 0, 150*2, 78*2);
strokeWeight(1);
noStroke();
//Planeten
fill(83,146,177);
ellipse(-179,69,40,40);
ellipse(-110,50,40,40);
ellipse(148,10,40,40);
ellipse(179,-70,40,40);
ellipse(0, 0, 100, 92);
//Fußzeile
fill (220);
ellipse(-216,260,40,39);
ellipse(-150,260,64,61);
ellipse(-62,260,82,77);
ellipse(42,260,96,93);
ellipse(174,260,130,120);
stroke(83,146,177);
strokeWeight(2);
line(-235,260,520,260);
strokeWeight(1);
noStroke();
fill(100);
rect(246, 230, 491, 210);
//Animation
if (mouseIsPressed) {
fill(0);
ellipse(-179,69,40,40);
ellipse(-110,50,40,40);
ellipse(148,10,40,40);
ellipse(179,-70,40,40);
noFill();
stroke(83,146,177);
strokeWeight(3);
ellipse(0, 0, 220*2, 120*2);
ellipse(0, 0, 150*2, 78*2);
strokeWeight(1);
noStroke();
var x = sin(millis()/1000) * 220;
var y = cos(millis()/1000) * 120;
fill(83,146,177);
noStroke();
ellipse(x, y, 40, 40);
var a = sin(millis()/1000) * 150;
var b = cos(millis()/1000) * 78;
fill(83,146,177);
noStroke();
ellipse(a, b, 40, 40);
var c = sin(millis()/1000) * 150;
var d = cos(millis()/1000) * 78;
fill(83,146,177);
noStroke();
ellipse(c, d, 40, 40);
}
var g = sin(0.1*millis()/1000) * 2;
var h = cos(millis()/1000) * 5;
noFill();
stroke(83,146,177);
strokeWeight(15);
ellipse(g,h,130,60);
strokeWeight(1);
noStroke();
//Text
fill(255);
textFont(text);
textSize(78);
textStyle(BOLD);
text('The Nature',-60,-260);
text('of the Universe',-60,-230);
fill(0);
textFont(text);
textSize(15);
textStyle(BOLD);
text('Fred Hoyle',-60,-175);
fill(0);
textFont(book);
textSize(25);
text('a Pelican Book',-60,-330);
}