SUMMARY // Today’s progress on the 30 Day Build Challenge is using code to draw a “Pyramid Block” for the Word Counting Calendar! Getting closer!


It has been a long day making small advances in my drawing code. Today’s focus was to programmatically draw the pyramid block that’s at the heart of the Word Counting Calendar:


The main challenge today was to just draw the pyramid from a set of parameters, so I could easily draw it anywhere at any scale. Here’s what I got today.


The janky code that draws this looks something like this:This is just an example; several other functions like hguide, vguide, bbDebug, and block are doing calculations as well.
/** draw a 10 block pyramid. return [x1,y1,x2,y2]*/
const pyramid = (xx, yy) => {
const xinc = DIM + GAP;
const yinc = DIM + GAP;
const _rows = 4;
const size = _rows * DIM + (_rows - 1) * GAP;
for (let y = 0; y < _rows; y++) {
const yo = y * yinc;
hguide(yy + yo);
for (let x = 0; x <= y; x++) {
const xo = x * xinc;
vguide(size - xo + xx - DIM);
block(size - xo + xx - DIM, yy + yo); // block does inversion
}
}
return [xx, yy, xx + size, yy + size, size];
};
let xoff = 0;
for (let i = 0; i < 3; i++) {
const [, , , , width] = bbDebug(pyramid(10 + xoff, 10));
xoff += width + 18;
}
There’s a lot of arithmetic in here, and it’s not very well structured. However, just getting the pyramid to draw according to my expectations is a good start. Next, I can add the text and draw a complete calendar day cell.
2025 Building Challenge Posts
Making an URSYS App Example
Adding Typescript support to Eleventy
Review of Old Design Work
Improving my Eleventy Atom Feeds
Managing a Productivity Crash
Activity Bingo Board: Layout with Affinity Designer
ETP 5885 Notebook Press Run Prep
Activity Bingo Board Revisions
ETP 5885 Notebook Press Tour
A Silly Pass at Logo Design
Unprofessional Business Cards
Word Counting Calendar PDF Quickie Reuse
Word Counting Calendar PDF Now Available!
Word Counting Calendar Preparing to Code
Word Counting Calendar Simple Beginnings
Articulating Friendship
First skip day due to day trip to Concord, etc.
Making a PDF-LIB Reference
Word Counting Calendar Drawing Blocks
Minimum Progress Despite Nausea
Word Counting Calendar Drawing Blocks II
Writing A Mythical Magical Adventure Cat Primer
Word Counting Calendar Drawing Days
Word Counting Calendar Drawing Spaces
A Restorative Visit to the North Shore
Word Counting Calendar: Alpha Release!
ETP 5885 Notebook Production Update!
Personal Cards Revisited
11/21 - Visiting an Old Friend in Beverly, MA
Experimental Collaboration
Short Productive Sprint Day
Thanksgiving Reset Break
ETP 5885 Notebook back on Amazon!
ETP 365 Day Journal Updated for 2026!
Making a Freelance Services Page