Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* This code creates a picture of expanding "star".
- Based on 'Fun Programming' video tutorials
- */
- float r = 0;
- void setup() {
- size(600, 600);
- background(0);
- smooth();
- noStroke();
- }
- void draw() {
- translate(width/2, height/2);
- rotate(r);
- fill(random(255), 0, random(10, 100), 60);
- float circle_size = random(5, 8);
- //change parameters below to get different versions of the image
- quad(100 + r, 10, circle_size, circle_size, 0, cos(r), 100, 10);
- r = r + 0.9;
- }
Advertisement
Add Comment
Please, Sign In to add comment