diff --git a/content/blog/2022/11/transit-maps/index.md b/content/blog/2022/11/transit-maps/index.md new file mode 100644 index 0000000..718f12d --- /dev/null +++ b/content/blog/2022/11/transit-maps/index.md @@ -0,0 +1,7 @@ +--- +title: "Transit Maps" +date: 2022-11-16T22:46:40-08:00 +draft: true +--- + +{{< figures/p5 id="sketch" >}} diff --git a/content/blog/2022/11/transit-maps/sketch.js b/content/blog/2022/11/transit-maps/sketch.js new file mode 100644 index 0000000..b8e32f0 --- /dev/null +++ b/content/blog/2022/11/transit-maps/sketch.js @@ -0,0 +1,40 @@ +const sketch = p => { + const backgroundColor = p.color(255); + const gridColor = p.color(180); + + p.setup = () => { + const sketchContainer = document.querySelector('#sketch'); + const canvasWidth = parseFloat(getComputedStyle(sketchContainer).width); + let canvas = p.createCanvas(canvasWidth, canvasWidth); + canvas.canvas.removeAttribute('style'); + sketchContainer.appendChild(canvas.canvas); + + p.pixelDensity(p.displayDensity()); + p.angleMode(p.DEGREES); + }; + + p.draw = () => { + p.background(backgroundColor); + p.strokeWeight(1 / p.displayDensity()); + p.stroke(gridColor); + + const canvasHeight = p.height; + const canvasBase = canvasHeight * p.tan(30); + const gridHeight = p.height / 16.0; + const skip = 2 * gridHeight * p.tan(30); + + for (let i = gridHeight; i < canvasHeight; i += gridHeight) { + p.line(0, i, p.width, i); + } + + for (let b = -p.width; b < p.width; b += skip) { + p.line(b, 0, b + canvasBase, p.height); + } + + for (let b = -p.width; b < p.width; b += skip) { + p.line(b, p.height, b + canvasBase, 0); + } + }; +}; + +new p5(sketch, 'sketch'); diff --git a/content/blog/2022/11/twitter/index.md b/content/blog/2022/11/twitter/index.md new file mode 100644 index 0000000..681e47d --- /dev/null +++ b/content/blog/2022/11/twitter/index.md @@ -0,0 +1,19 @@ +--- +title: "Twitter" +date: 2022-11-18T08:37:55-08:00 +draft: true +--- + +Well... this sucks, right? Nearly 88% of the company has left, through a +combination of layoffs, firings, and folks deciding they've had enough. I'm +deeply worried for the people who find themselves stuck there due to visa +requirements. It must be a very scary situation to be in. + +A lot of folks seem to believe the end of Twitter is approaching. The last few +days have been full of reminiscing and sharing memes about the fall. Go out like +as we lived, huh? + +I created my first Twitter account in 2008 or so. A college friend of mine +bugged me for weeks make an account on this new social media site, presumably so +we could talk about what we had for lunch? I didn't get it. He did eventually +persuade me though, and Twitter has been a big part of my life ever since.