// T H E
// ____ __ ____
// /\ \ /'_/'\ /\ _ /__ \
// \ \ / /\ \ \ \ ,\ __ //\ \
// \ \ \ \ \ __\ \ /''\ \ / /''\ \ \ \
// \ \ _ \ \ _/\ /\ /\ \ _/\ \L._ _\ \
// \ _\ \ _\ _\ _\ _\ _/._\ /_
// // // //// ////// //
// ______________________________________________________
// | |
// | I N S T R U C T I O N S #2 |
// ||
// | |
// | This OBJKT takes its own description metadata and |
// | executes it as code to render its output |
// ||
// | |
// Render a full-saturation, full-brightness
// background color by picking a random hue
background(random(360),100,100)
// Decide how many lines to draw for all corners
// between 5 and 20
noOfLines = round(random(5,20))
// Make the lines white and a set, relative thickness
stroke('WHITE')
strokeWeight(width/400)
rotate(HALF_PI)
// For each of the 4 corners...
for(let i = 0; i < 4; i++){
// For each line...
for(let j = 0; j < noOfLines; j++){
// Decide how long it'll be, up to two-thirds
// the diagonal length of the canvas
let length = random((width * sqrt(2))*(2/3))
// Draw it from the center out
line(0,0,0,-length)
// Prepare for the next line by rotating by
// an equal amount given the number of lines
rotate(HALF_PI/noOfLines)
}
// Prepare the pointer for the next corner
translate(0,-height)
rotate(PI)
}
// || // | | // | Clicking anywhere regenerates the art | // | | // | Made in p5js | // || // | | // | 30 July 2021 @Yazid | // |______________________________________________________|