added new project

This commit is contained in:
Chris Nutter committed 2021-02-24 00:20:22 -08:00
1 parent 6e02fc4e7f
commit 90cfba2c6f
113 files changed
+974 -297

No files matched your search

@@ -0,0 +1,35 @@
// Draw stuff, with P5 // CF p5js.org/reference
// Time-stamp: <2020-02-02 14:46:00 Chuck Siska>
// ------------------------------------------------------------
// ===================================================== draw_grid ====
// Draw a fancy grid with major & minor lines
// & major row/col numbers.
function draw_grid( rminor, rmajor, rstroke, rfill )
{
stroke( rstroke );
fill( rfill );;
let sz = g_canvas.cell_size;
let width = g_canvas.wid*sz;
let height = g_canvas.hgt*sz
for ( var ix = 0; ix < width; ix += rminor )
{
let big_linep = (ix % rmajor == 0);
let line_wgt = 1;
if (big_linep) line_wgt = 2;
strokeWeight( line_wgt );
line( ix, 0, ix, height );
strokeWeight( 1 );
if ( ix % rmajor == 0 ) { text( ix, ix, 10 ); }
}
for ( var iy = 0; iy < height; iy += rminor )
{
let big_linep = (iy % rmajor == 0);
let line_wgt = 1;
if (big_linep) line_wgt = 2;
strokeWeight( line_wgt );
line( 0, iy, width, iy );
strokeWeight( 1 );
if ( iy % rmajor == 0 ) { text( iy, 0, iy + 10 ); }
}
}
@@ -0,0 +1,7 @@
body {
text-align: center;
font-family: sans-serif;
}
canvas {
background-color: black;
}