Tribute to Vera Molnár ✝️

Vera Molnár, née Gács (5 January 1924 – 7 December 2023), was a Hungarian media artist who lived and worked in France. Molnár is widely considered to have been a pioneer of computer art and generative art, and was also one of the first women to use computers in her art practice.

en.wikipedia.org/wiki/vera_moln%c3%a1r

google.com/search?q=vera+moln%c3%a1r&tbm=isch

This generates variations to "Parcours à l’angle droit" (1997)

Log in to post a comment.

const size = 5; //min=1 max=25 step=2
const margin = 5; //min=0 max=30 step=1
const padding = .15; //min=0 max=.8 step=.01
const maxZigZags = 5; //min=1 max=10 step=1

const HORIZONTAL = 0;
const VERTICAL = 1;

const TOP_BOTTOM = 0;
const BOTTOM_TOP = 1;
const LEFT_RIGHT = 2;
const RIGHT_LEFT = 3;

const tileSize = (200 - margin - margin) / size;
const topLeft = [margin - 100, margin - 100];
const padd = tileSize * padding;
const drawSize = tileSize - padd;

// You can find the Turtle API reference here: https://turtletoy.net/syntax
Canvas.setpenopacity(1);

// Global code will be evaluated once.
const turtle = new Turtle(add2(topLeft, [padd / 2, padd / 2]));

// The walk function will be called until it returns false.
function walk(i) {
    let column = i % size;
    let row = (i / size) | 0;
    
    const directionVertical = (column + row) % 2 == 0? TOP_BOTTOM: BOTTOM_TOP;
    const directionHorizontal = row % 2 == 0? LEFT_RIGHT: RIGHT_LEFT;
    
    let pts = [(tileSize - padd) * -.5].map(v => [[1, 1], [1, -1]].map(vv => vv.map(vv => v * vv))).pop();

    const zigzags = 1 + (Math.random() * (maxZigZags - 1)) | 0;
    const bridgeLength = drawSize / (zigzags * 2);
    for(let i = 0; i < zigzags; i++) {
        [[1, 0, 1], [1, 0, -1], [-1, 1, 1], [-1, 1, -1]].forEach(params =>
            pts.push([
                (tileSize - padd) * -.5 + bridgeLength + (i * 2 + params[1]) * bridgeLength,
                (tileSize - padd) * .5 * params[2] * params[0]
            ])
        )
    }
    
    const orientation = Math.random() < .5? HORIZONTAL: VERTICAL;
    
    const myCenter = add2(
        add2(topLeft, [tileSize/2, tileSize/2]),
        mul2([tileSize, tileSize], [directionHorizontal == RIGHT_LEFT? size - column - 1: column, row])
    );

    pts .map(pt => trans2(orientation == HORIZONTAL? [0, 1, 1, 0]: [1, 0, 0, 1], pt))
        .map(pt => trans2(directionHorizontal == LEFT_RIGHT? [1, 0, 0, 1]: [0, -1, -1, 0], pt))
        .map(pt => trans2(directionVertical == TOP_BOTTOM? [1, 0, 0, 1]: [1, 0, 0, -1], pt))
        .map(pt => add2(myCenter, pt))
        .forEach(pt => turtle.goto(pt));

    return i < size**2 - 1;
}

function add2(a, b) { return [a[0]+b[0], a[1]+b[1]]; }
function sub2(a, b) { return [a[0]-b[0], a[1]-b[1]]; }
function mul2(a, b) { return [a[0]*b[0], a[1]*b[1]]; }
function scale2(a, s) { return [a[0]*s,a[1]*s]; }
function rot2(a) { return [Math.cos(a), -Math.sin(a), Math.sin(a), Math.cos(a)]; }
function trans2(m, a) { return [m[0]*a[0]+m[2]*a[1], m[1]*a[0]+m[3]*a[1]]; }