Coder Social home page Coder Social logo

dessins_geometriques_et_artistiques's Introduction

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

dessins_geometriques_et_artistiques's People

Contributors

v3ga avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

dessins_geometriques_et_artistiques's Issues

Petite erreur dans le script du dessin 188

Un X changé en Y, voici une proposition de changement :

else if (DESSIN==188)
  {
    let X7=2*X-1,Y7=2*Y-1;
    if (X7*Y7!=0) 
      Z=3*NP/4*X7*Y7*(X7*X7-Y7*Y7)/(X7*X7+Y7*Y7)
    else 
      Z=0;

Cordialement.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.