20% off everything. Seriously. Every. Single. Thing. Use CREEPY20

Lissajous XXVII

Rupert Russell

Ballarat, Australia

  • Available
    Products
    45
  • Artist
    Notes
  • Artwork Comments 3

Apparel

Cases & Skins

Wall Art

Home Decor

Bags

Stationery

Artist's Description

counter from “feedjit”:http://feedjit.com/joinimg/

// Created with Processing
// Draws a Lissajous figures
// 4 April 2011
// Examples

int screen_width = 2000;
int screen_height = 2000;

/* Scale image and reduce by 5 pixels to remove from edge of screen */
int AX = (screen_width / 2) – 5;
int BX = (screen_height / 2) – 5;

float a = 5;
float b = 3;
float x1, y1, x2, y2;

int counter = 0;
int saveCounter = 0;
String file_name;
//
void setup(){
smooth();
fill(255);
strokeWeight(2);
size(screen_width, screen_height);
}
//
void draw(){
fill(#000000);
//
x1 = (sin(a * counter) * AX) + screen_width / 2;
//
y1 = (sin(b * counter) * BX) + screen_height / 2;
//
counter = counter + 1;
//
y2 = screen_width / 2;
//
x2 = screen_height / 2;
//
line(x1,y1,x2,y2);
ellipse((sin(a * counter) * AX) + screen_width / 2 , (sin(b * counter) * BX) + screen_height / 2, 10, 10);
//
saveCounter = saveCounter + 1;
if (saveCounter == 720) {
String file_name = “Lissajou_a=” + str(a) + “_b=” + str(b);
save(file_name);
noLoop();
}
}

Artwork Comments

desktop tablet-landscape content-width tablet-portrait workstream-4-across phone-landscape phone-portrait
desktop tablet-landscape content-width tablet-portrait workstream-4-across phone-landscape phone-portrait

10% off

for joining the Redbubble mailing list

Receive exclusive deals and awesome artist news and content right to your inbox. Free for your convenience.