let a = [], b = [], p = [], con = [], num = 9, itv = 0.08
createCanvas(min(windowWidth, windowHeight), min(windowWidth, windowHeight))
for (let i = 0; i < num; i++) {
a.push(width * (0.5 - (num - 1)/ 2 * itv + i * itv))
b.push(height * (0.5 - (num - 1) / 2 * itv + i * itv))
for (let y = 0; y < b.length; y++) {
for (let x = 0; x < a.length; x++) {
p.push(createVector(a[x], b[y]))
for (let i = 0; i < p.length; i++) {
circle(p[i].x, p[i].y, itv * 100)
for (let i = 0; i < con.length; i++) {
function mouseReleased() {
for (let i = 0; i < 6; i++) {
let s1 = createVector(a[int(random(a.length) - 1)], b[int(random(b.length) - 1)])
let s2 = createVector(a[int(random(a.length) - 1)], b[int(random(b.length) - 1)])
con.push(new Straight(s1, s2))
let s1 = createVector(a[int(random(a.length) - 1)], b[int(random(b.length) - 1)])
let s2 = createVector(a[int(random(a.length) - 1)], b[int(random(b.length) - 1)])
let s3 = createVector(a[int(random(a.length) - 1)], b[int(random(b.length) - 1)])
let s4 = createVector(a[int(random(a.length) - 1)], b[int(random(b.length) - 1)])
con.push(new Curve(s1, s2, s3, s4))
let s1 = createVector(a[int(random(a.length) - 1)], b[int(random(b.length) - 1)])
constructor(start, end) {
this.c = color(random(255), random(255), random(255))
line(this.start.x, this.start.y, this.end.x, this.end.y)
constructor(start, scp, ecp, end) {
this.c = color(random(255), random(255), random(255))
bezier(this.start.x, this.start.y, this.scp.x, this.scp.y, this.ecp.x, this.ecp.y, this.end.x, this.end.y)
this.c = color(random(255), random(255), random(255))
circle(this.p.x, this.p.y, this.w)