Continue(s)

Twitter:@dn0t_ GitHub:@ogrew

processing

p5.jsのnoise関数を自炊する。

この記事はProcessing Advent Calendar 2020の19日目の記事です。 ■ はじめに 12月になってこの度、五年付き合っている彼女と同棲を始めまして、平日の晩御飯は主に僕が担当しているんですが、如何せんもうすぐ27歳なのに人生でここまでほとんど料理をして…

【週刊p5js】work21

function p5Creature(count, step, scale, offset) { for(let i = 0; i < count; i += step) { for(let j = 0; j < count; j += step) { let n = noise(i * scale, j * scale); let m = noise(j * scale, i * scale); let x = round(map(n, 0, 1, -offset, o…

【週刊p5js】work20

2月から個人的に始めた#週刊p5js が今作で20回目ということで、今週は平日に毎朝作品を投稿しました。すごいねー、よくやったねー。そもそもこの企画、途中、普通にさぼってる週とかあって全然”週刊”ではなかったけどねー。(まあ、昨今の雑誌だって、そんな…

【週刊p5js】work19

function setup() { createCanvas(900, 900, WEBGL); noLoop(); smooth(); pixelDensity(3); ortho(); background(35); } function draw() { let rx = random(0, 45); let ry = random(0, 45); let rz = random(0, 45); let c1 = random(100, 200); let c2 =…

【週刊p5js】work18

let max = 400; let scale = 0.001; let cd; let xmin, xmax; let ymin, ymax; let cx, cy; let size; function setup() { createCanvas(900, 900); colorMode(HSB, 360, 100, 100, 100); smooth(); noStroke(); noLoop(); background("#FAFAFA"); cd = colo…

【週刊p5js】work16

let size = 60; let gridW = 0, gridH = 0; function setup() { createCanvas(2100, 2100); gridW = int(width / size); gridH = int(height / size); grid = []; list = []; // -------------------------------- // // 一定確率で壁の突起を設定する. // -…

【週刊p5js】work15

let countW = 20; let marginW = 80; let countH = 16; let marginH = 120; function setup() { createCanvas(900, 900, WEBGL); smooth(); frameRate(1); } function draw() { pointLight(255, 255, 255, 10,-100, 500); pointLight(255, 255, 255,-10, 100…

【週刊p5js】work14

function setup() { createCanvas(900, 900); let gray; let unit = 2; let a = int(random(10, 100)); let b = int(random(10, 100)); let c = int(random(10, 100)); let d = int(random(10, 100)); let n = int(random(3, 7)); let m = int(random(n, n *…

【週刊p5js】work13

let img1, img2; function preload() { img1 = loadImage("src/Broccoli.jpg"); img2 = loadImage("src/Donuts.jpg"); } function setup() { createCanvas(900, 900); ellipseMode(CENTER); noStroke(); smooth(); frameRate(1); } function draw() { let bg…

【週刊p5js】work12

pal = ["#FB706A", "#586E7B", "FBEAE2", "#A79981", "#FFCFDF", "#6B5056", "#FCECDD", "#4F6168", "#FD7263", "#815556"]; var num = 100; // 線の数 var side; // 全体の横幅 var unit; // 線の中心間距離 var w; // 線の幅 var margin; // 線と線の間の…

【週刊p5js】work11

var pal = ['#20222f','#20222f','#20222f','#1a1f56','#2c1e7d','#0134aa','#0060e8','#0297fb','#00befa','#83def3','#d1ecf7','#f2f6f9','#f2f6f9','#f2f6f9','#fce503','#fe6d02','#e7011d','#4b0f31']; var gray_pal = ['#080808','#181818','#383838',…

【週刊p5js】work10

var colorArray = [ ["#EC5E64", "#6B3979", "#28A98F", "#FAD542", "#2ABBDA"], ["#1916F8", "#FBE970", "#F57199", "#7605E8", "#0DC7F9"], ["#5541A9", "#9869B8", "#F9EADD", "#C4E376", "#8CD055"], ["#3FAA48", "#5AC23D", "#F178B5", "#1F99D0", "#30…

【週刊p5js】work09

var points = []; var bg = [255,96,148]; var pal = [ [255,191,38], [73,117,122], [37,34,47], [210,238,215] ]; var vScale = 0.005; var time; function setup() { chores(); for (let x = -6; x <= 6; x += 0.1) { for (let y = -6; y <= 6; y += 0.1)…

【週刊p5js】work08

var PI = 3.141592; var Cx, Cy; var iters = 400; var Esc = 100000; function Thorn(x0, y0) { let x = x0; let y = y0; let i; for (i = 0; i < iters; i++) { var xx = x; var yy = y; x = xx / cos(yy * PI) + Cx; y = yy / (sin(xx) * sin(xx)) + Cy; …

【週刊p5js】work07

var h = 0.002; var a = 3; var xs = 14; var ys = 3; var iters = 3000; let cnt = 4000; var pi = 3.141592; function popcorn(x, y) { for (i = 0; i < iters; i++) { var xx = x; x = xx - h * tan(y/8 + cos(6*y)); y = y - h * tan(10*xx + 5*sin(pi*x…

【週刊p5js】work06

var graphic = []; var colorPalette = [["#9dab86","#e6a157","#eb8242","#c9753d"], ["#f0cf85","#e7f0c3","#a4d4ae","#32afa9"], ["#015668","#263f44","#ffd369","#fff1cf"], ["#f67280","#c06c84","#6c5b7b","#35477d"], ["#fbe3b9","#fab696","#0c9463…

【週刊p5js】work05

var cnt = 4; var colorPalletes = [ ["#4F3A65","#574F7D","#95ADBE","#DFF0EA","#F48256"], ["#305F72","#F18C8E","#F0B7A4","#F1D1B5","#FFEBCF"], ["#303242","#394359","#F2BE8D","#BA6C65","#D88A83"], ["#FE5F55","#EEF5DB","#4F6367","#7A9E9F","#B8…

【週刊p5js】work04

var colorArray = ["#C33B23","#E55130","#17081A","#077284","#00576B","#162B3D"]; var startWs = []; var endWs = []; var ladderWidth = 10; function setup() { createCanvas(900, 900); colorMode(RGB); smooth(); angleMode(DEGREES); strokeCap(SQUA…

【週刊p5js】work03

var loopCount = 40; var colorArray = ["#BDA8AD", "#DEB3AD", "#F4EFEB", "#ECE3DA", "#ECC5C0", "#A19BA9"]; var decorationColor = 200; function setup() { createCanvas(windowWidth, windowHeight); colorMode(RGB); smooth(); angleMode(DEGREES); s…

【週刊p5js】work02

function setup() { colorMode(RGB); angleMode(DEGREES); textFont("Sawarabi Mincho"); createCanvas(windowWidth, windowHeight); pixelDensity(2); frameRate(1); } function mousePressed() { resizeCanvas(windowWidth, windowHeight); redraw(); } fu…

【週刊p5js】work01

function setup() { createCanvas(windowWidth, windowHeight); pixelDensity(2); frameRate(1); // noLoop(); // mousePressed用 } let ColorPattern = [ ['#493548','#FFC145','#FF6B6C','#5B5F97','#4B4E6D'], ['#FFC145','#FF6B6C','#5B5F97','#4B4E6D',…