Skip to content

Recode of book "Dessins géométriques et artistiques avec votre micro-ordinateur" (1985) with p5js

Notifications You must be signed in to change notification settings

v3ga/dessins_geometriques_et_artistiques

Repository files navigation

Dessins géométriques et artistiques avec votre micro-ordinateur

👉 https://editor.p5js.org/v3ga/collections/ALPCSgG3E

This repository presents programs written by french mathematician and computer scientist Jean-Paul Delahaye in the book "Dessins géométriques et artistiques avec votre micro-ordinateur" published in 1985 for the Eyrolles french publishing house.

The programs were originally programmed with Microsoft Basic for Canon X-07 computer, outputs were drawn on a Canon X710 plotter. They were recoded with p5.js, the online collection can be found here. You can click on each thumb to jump to the corresponding sketch. Be sure to edit the DESSIN variable in the program header.

I contacted Jean-Paul Delahaye who gave me access to links for downloading scans of the two editions of “Dessins géométriques”. He kindly allowed me to share them.
👉 Dessins géométriques et artistiques avec votre micro-ordinateur
👉 Nouveaux dessins géométriques et artistiques avec votre micro-ordinateur

Library

I tried to be as close as possible as the original syntax, thus I developed a parser that interprets the string generated by LPRINT commands.
The library contains the following command :

Command Description
INIT set up the canvas with an initial size of 500x500 pixels, accepts {svg:true} as parameter to export to vector format
INIT2(height) set up the canvas with the width equal to 500 pixels and a custom height, accepts {svg:true} as parameter to export to vector format
INIT_WH(width,height) set up the canvas with custom width and height, accepts {svg:true} as parameter to export to vector format
LPRINT(s) concatenates s to the OUTPUT global variable used by TRACE()for drawing
TRACE() draw the output using beginShape / vertex / endShape commands by interpretating the string generated by LPRINT calls
TRACE2() draw the output, endShape is not used with CLOSE parameter
PALETTE(which) sets the palette, use RED,YELLOW or GREEN as parameter. Defaults otherwise to grey background and black stroke

Some sketches were added a translate command to center the drawing as it happened sometimes it was out of canvas bounds.

Example

let DESSIN = 1;

let NP=480,PI=Math.PI;
let K=3,CX=NP/2,CY=NP/2,R=NP*0.45,AD=0;

function setup() 
{
  INIT();
  
  for (let I = 0; I < K; I++) {
    let X = int(CX + R * cos((2 * I * PI) / K + AD));
    let Y = int(CY + R * sin((2 * I * PI) / K + AD));
    if (I == 0) LPRINT(`M${X},${Y}`);
    if (I > 0) LPRINT(`D${X},${Y}`);
  }
  
  TRACE();
}

Summary

1. Polygones, étoiles, etc.

Le programme POLYGONES RÉGULIERS

Le programme ÉTOILES RÉGULIÈRES

Le programme COMPOSITION 1

Le programme COMPOSITION 2

Le programme JOLIGONES

2. Dessins à partir de données

Le programme CHEVAL


Les programmes LION, OISEAUX-POISSONS, SMURF


3. Dragons de papiers pliés

Le programme DRAGONS

4. Étoiles fractales

Le programme ÉTOILES FRACTALES

5. Courbes

Le programme COURBES ORBITALES



Le programme COURBES TOURNANTES


Le programme COURBES SPIRALES


6. Dessins linéaires

Le programme BIPARTI COMPLET


Le programme LINÉAIRES MODULO


Le programme LINÉAIRES BÂTONS


7. Fractales simples

Le programme FRACTALES SIMPLES






Le programme FRACTALES SIMPLES ARRONDIES


Le programme FRACTALES SIMPLES DÉFORMÉES

'

8. Quadrillages élastiques

Le programme QUADRILLAGES ÉLASTIQUES

9. Surfaces

Le programme SURFACES

10. La troisième dimension

Le programme D3DATA

Le programme D3CUBE

Le programme D3STRUCTURES

About

Recode of book "Dessins géométriques et artistiques avec votre micro-ordinateur" (1985) with p5js

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published