manfredmohr.py

Created by schraf

Created on October 24, 2022

321 Bytes

Vidéo d’explication

But : Créer des dessins dans le style de Manfred Mohr, pionner dans l’art et l’informatique dans les années 70.

Visuels et explications : dans le catalogue de l’exposition de 1971

Le script pour la Numworks utilise le module Turtle de la version 10 donc pensez à mettre votre calculatrice à jour : https://workshop.numworks.com/devices/upgrade

Art génératif

Manfred Mohr

Quelques visuels tirés du site de l’auteur (avec son aimable autorisation).

P-10, “random walk”

P-021/A + B, “band-structure”

Projet P 142

P 142 Negative Field Syntax

Inspiration n°1


from turtle import *
from random import *

TRANSI = {'m':'db','d':'mph','p':'mph','b':'mp','h':'d'}
TRAITS = {'m':[1,30,10], 'd':[1,-30,10], 'p':[3,0,9], 'b':[1,-90,5], 'h':[1,90,5]}
speed(1000)
reset()

def trait(t):
  pensize(t[0])
  setheading(t[1])
  forward(t[2])

for i in range(14):
  actuel = choice('mp')
  setheading(180)
  penup()
  goto(-160,100 - 15*i)
  pendown()
  while position()[0]<160:
    trait(TRAITS[actuel])
    actuel = choice(TRANSI[actuel])

Inspiration n°2


En changeant la forme de la montée et en choisissant de mettre des traits épais pour le


# Art generatif

from turtle import *
from math import *
from random import *

speed(0)
reset()

for a in range(180):
  penup()
  r = 30 + randint(-10,10)
  goto(r*cos(pi*a/90),r*sin(pi*a/90))
  setheading(2*a)
  pendown()
  d = randint(1,80)
  for k in range(d):
    pensize(int(5*k/d))
    forward(1)

During your visit to our site, NumWorks needs to install "cookies" or use other technologies to collect data about you in order to:

With the exception of Cookies essential to the operation of the site, NumWorks leaves you the choice: you can accept Cookies for audience measurement by clicking on the "Accept and continue" button, or refuse these Cookies by clicking on the "Continue without accepting" button or by continuing your browsing. You can update your choice at any time by clicking on the link "Manage my cookies" at the bottom of the page. For more information, please consult our <a href="https://www.numworks.com/legal/cookies-policy/">cookies policy</a>.