I was inspired by the cover photo of Computer Graphics and Art Vol. 2 No. 2 that was issued in May 1977. It reminded me of an old microsoft screensaver, so i decided to create an art piece that resembles the screensaver. I wanted to focus on the movement of lines and the curves. I did not know where to start, so I have got the idea from Alexander Miller’s video.

Code:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
static final int NUM_LINES = 10; float t; void setup () { background (20); size( 500, 500); } void draw () { background (20); stroke(255); strokeWeight(5); translate (width/2, height/2); for (int i= 0; i < NUM_LINES; i ++) { line (x1(t + i), y1(t + i), y2(t + i), y2(t + i)); } t+= 0.5 ; } float x1 (float t) { return sin(-t/10)*100 + sin(t/5)*20; } float y1 (float t) { return cos(-t /10) *100 + sin(t/5) *50; } float x2 (float t) { return sin(t/10)*200 + sin(t)*2 + cos(t) *10; } float y2 (float t) { return -cos(t /20) *200 + cos(t/12)*20; } |

Video: