Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- float y;
- float speed = .5;
- void setup() {
- size(500, 500);
- background(bg);
- noStroke();
- for (int i=0; i<lines.length; i++) {
- float _y = i*(height/num);
- lines[i]= new myLine(_y);
- }
- }
- void draw() {
- background(bg);
- fill(f);
- ellipse(width/2, height/2, 300, 300);
- for (int i=0; i<lines.length; i++) {
- lines[i].display();
- }
- }
- class myLine {
- float y;
- myLine(float _y) {
- y = _y;
- }
- void display() {
- strokeWeight(15);
- stroke(bg,80);
- y -= speed;
- if (y < 0) y = height;
- line(0, y, width, 10);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement