Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var t2=0;
- function x1(t) {
- return sin(t / 20);
- }
- function y1(t) {
- return cos(t / 10);
- }
- function x2(t) {
- return sin(t / 10) * 200;
- }
- function y2(t) {
- return cos(t / 20) * 200;
- }
- var NUM_LINES = 600;
- var NUM_LINES2 = 200;
- function setup() {
- background(20);
- createCanvas(900, 600);
- }
- function draw() {
- background(20);
- strokeWeight(1.5);
- stroke(250, 75);
- translate(width / 2, height / 2);
- for (var i = 0; i < NUM_LINES; i += 8) {
- line(x1(t2 - 1 * 80 + 90), y1(t2 * i * 40), x2(t2 - i), y2(t2 - i * 30));
- }
- t2 += 0.01;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement