Oh, that naughty sketch! Please let us know what the issue is below.
Apply Template
Applying this template will reset your sketch and remove all your changes. Are you sure you would like to continue?
Report Sketch
Report Comment
Please confirm that you would like to report the comment below.
We will review your submission and take any actions necessary per our Community Guidelines. In addition to reporting this comment, you can also block the user to prevent any future interactions.
Please report comments only when necessary. Unnecessary or abusive use of this tool may result in your own account being suspended.
Are you sure you want to delete your sketch?
Any files uploaded will be deleted as well.
Delete Comment?
This will also delete all the replies to this comment.
Delete this tab? Any code in it will be deleted as well.
Select a collection to submit your sketch
We Need Your Support
Since 2008, OpenProcessing has provided tools for creative coders to learn, create, and share over a million open source projects in a friendly environment.
Niche websites like ours need your continued support for future development and maintenance, while keeping it an ad-free platform that respects your data and privacy!
Please consider subscribing below to show your support with a "Plus" badge on your profile and get access to many other features!
A fork of osature _ccd by yokoul
CC Attribution NonCommercial ShareAlike
osature _cce
xxxxxxxxxx
//noprotect
let xx,yy, c;
let angle = 0;
let noiseValue = 0;
let seed = Math.random() * 99999999;
let bd = 1.5;
let bd2 = bd * 2;
async function setup() {
wis = min(windowWidth,windowHeight);
c = createCanvas(wis,wis);
randomSeed(seed);
noiseSeed(seed);
noFill();
pixelDensity(2);
background(20);
blendMode(SCREEN);
let gridSize = 1;
let radius = width / 4;
let centerX = width / 2;
let centerY = height / 2;
xoff = 0;
for (let x = 0; x <= width; x += gridSize) {
yoff = 0;
for (let y = 0; y <= height; y += gridSize) {
let dx = x - centerX;
let dy = y - centerY;
if (dx * dx + dy * dy <= radius * radius) {
let nx = map(x, 0, width, 0, 1);
let ny = map(y, 0, height, 0, 1);
let noiseValue = noise(nx, ny);
let angle = map(noiseValue, 0, 1, 0, TWO_PI*2);
let lineLength = gridSize * 10;
let px = x + cos(angle) * lineLength;
let py = y + tan(angle) * lineLength;
let v1 = createVector(x, y);
let v2 = createVector(xx, yy);
push();
stroke(240, 25);
strokeWeight(0.05);
drawingContext.setLineDash([random(0,10), random(0,10), random(0,10), random(0,10), random(0,10)]);
//ellipseMode(CORNER);
//ellipse(x, y, px - py);
//ellipseMode(CORNERS);
//ellipse(v1.x, v1.y, py - px);
//stroke(180, 25);
//strokeWeight(0.1);
//rect(x, y, px - py);
line(v1.x, v1.y, px, py);
line(v2.x, v2.y, px, py);
line(v1.y, v1.x, py, px);
line(v2.y, v2.x, py, px);
//circle(x, y, px - py);
//circle(px, py, x + y);
pop();
push();
rotate(PI);
//translate(-width,-height);
stroke(0, 60);
strokeWeight(0.05);
//line(x, y, px, py);
//ellipse(px, py, x + y);
pop();
xx = x;
yy = y;
}
yoff += 0.05;
}
if (x >= width) {
k = random(-50,50);
push();
imageMode(CENTER);
rotate(-QUARTER_PI/random(1,2));
translate(wis*0.2, wis*0.6);
epingle(k);
pop();
push();
imageMode(CENTER);
rotate(QUARTER_PI/random(3,4));
translate(wis*0.5,wis*0.5);
epingle(k);
pop();
}
xoff += 0.05;
await sleep(1);
}
boxBorder();
}
function draw() {
}
function epingle(variance) {
push();
blendMode(SCREEN);
fill(255);
triangle(0, 0, 0, 10, -15, 15);
rect(0,0,80,10);
triangle(80, 0, 80, 10, 95, 15);
stroke(0);
fill(0,255);
circle(10,2.5,5);
circle(47.5,2.5,5);
circle(70,2.5,5);
pop();
}
function boxBorder() {
push();
noFill();
stroke(220);
strokeWeight(bd * 1.3);
line(0, bd/2, width + bd, bd/2);
line(bd/2, 0, bd/2, width + bd);
line(0, height - bd/2, width, height - bd/2);
line(width - bd/2, 0, width - bd/2, height);
fill(180);
for (let i = 0; i < width; i += random(bd,bd2)) {
square(+i*2, 0, random(bd,bd2));
square(+i*2, height, -random(bd,bd2));
}
for (let i = 0; i < height; i += random(bd,bd2)) {
square(0, +i*2, random(bd,bd2));
square(width, +i*2, -random(bd,bd2));
}
pop();
}
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
async function keyTyped() {
let keyLower = key.toLowerCase();
if (keyLower === "r") {
clear();
await setup();
} else if (keyLower === "s") {
saveCanvas(`ossature_cce_` + random(100), 'png');
} else if (!isNaN(keyLower)) {
await pixDens(Number(keyLower));
}
}
See More Shortcuts