Karl DD – Project Zero
Noll
GDE Error: Unable to load profile settings
size(700, 700); background(255); smooth(); int yOffset = 50; int waveHeight = 40; for(int j = 0; j<90; j++){ for(int i = 0; i<750; i++){ float divider = map(i, 0, 749, 10, 35); line(i, yOffset + -sin(i / divider) * waveHeight, i+1, yOffset + -sin((i + 1) / divider) * waveHeight); } yOffset += 6; } |
Pong
I decided to OOP my PONG out a little.
I couldn’t add an IFRAME here because WordPress kept removing it when I saved the draft. So here is the separate page anyway:
The .pde file links are dead because the .pde file type gets rejected on upload 🙁
PongBall ball; PongPaddleUser myPaddle; PongPaddleBot theirPaddle; void setup(){ size(600, 600); rectMode(CENTER_RADIUS); ellipseMode(CENTER_RADIUS); noStroke(); smooth(); myPaddle = new PongPaddleUser(width - PongPaddle.width * 2, height / 2); theirPaddle = new PongPaddleBot(PongPaddle.width * 2, height / 2); ball = new PongBall(myPaddle, theirPaddle, width / 2, height / 2); } void draw(){ background(0); ball.draw(); myPaddle.draw(); theirPaddle.draw(); } |
Comments Off on Karl DD – Project Zero