NaPoWriMo x NaPoGenMo 2024 - Day 7:  Glitchy Play

NaPoWriMo x NaPoGenMo 2024 - Day 7: Glitchy Play

UnClear Poems

UnClearPoem

For the 7th day of NaPoWriMo/NaPoGenMo 2024, "UnClear Poem" is a glitchy kinetic poem The Coding Languages used for this was playertdfgcvb & Hydra.

Poem

These Words 
gliding across the screens 
as this is their seas 
and they are viewing it like birds 
or at least that it what it seems
Starting With A Short Poem to Roll in 
To Get Things Flowing 
Rotating Lines to get them glowing 
and flow in

Video

Code

Play.ertdfgcvb - https://play.ertdfgcvb.xyz/#/1712545108728




/**
@author illestpreacha
@title  GLitchyPoems1
@desc   Use of coord.x and coord.y + Many other factors
*/

const density = 'These Words \n gliding across the screens \n as this is their seas \n and they are viewing it like birds \n or at least that it what it seems'
const density1 = 'Starting With A Short Poem to Roll in \n To Get Things Flowing \n Rotating Lines to get them glowing and flow in'



 export var settings = {
        //backgroundColor : extra(),
        //color           : 'gold',
        fontWeight      : 'bold', 
        lineHeight        : 1.5,
        cellWidth         : 5,
        fps                : 2

    }


settings.backgroundColor =  Math.random() < 0.5 ? 'black' :'brown'
settings.color = Math.random() < 0.5 ? 'gold' :'aqua'


/* export function extra()
{    
return Math.random() < 0.5 ? 'black' :'brown'
}*/

export function main(coord, context, cursor, buffer) {
        // To generate an output return a single character
        // or an object with a “char” field, for example {char: 'x'}

        // Shortcuts for frame, cols and coord (x, y)
        const {cols, frame } = context
        const {x, y} = coord

        // 
        const sign = ( y * 45.5 * Math.hypot(0,x) - context.frame % 80)/3 % frame * 8


    const a = context.frame * 0.05 * settings.lineHeight
    const f = Math.sqrt((1 - Math.cos(a)) * 10) + 1
    const g = Math.ceil(a / y) % 10 + 1
    const i = coord.index % (coord.y * Math.floor(g + 1)) % (f % context.cols)

         var dice = Math.random(0,15) 

        if(dice % 14 < 8)
            {
                const index = (cols + y + x * sign + frame) % density.length
                return density[index]

                const index1 = (cols + y + x * sign + frame) % density1.length / 7
                return density1[index - i]
            }
        else
            {
                const index = (cols + y + x * sign + frame) % density1.length / 7
                return density1[index - i]
            }

    }

Hydra


s0.initScreen()

src(s0).scale(()=> (time % 10 + 1)/1).diff(src(s0).scale(3).blend(s0)).out()