Art
Le système solaire
Pour le projet que nous avons dû réalisé sur l’art génératif nous avons choisi le thème du système solaire de façon plus revisité.
La création du fond :
Le fond ici est un ensemble de cercle qui forme plusieurs dégrader de violés comme ci-dessous :

from turtle import *
import secrets
def disque(rayon, x, y, couleur=(1, 1, 1)):
penup()
goto(x, y-rayon)
pendown()
pencolor(color)
circle(rayon)
#fond
list_color2=["#AC00D7", "#9B00C1", "#9A00C2", "#9800BF", "#8D00B0", "#8300A4", "#770095", "#690083", "#500064", "#400050", "#23002C", "#400050", "#500064", "#690083", "#770095", "#8300A4", "#8D00B0", "#9800BF", "#9A00C2", "#9B00C1", "#AC00D7",]
x = 0
y = -45
radius = 1100
color_index = 0
while radius >= 0:
speed(400)
color = list_color2[color_index]
fillcolor(color)
begin_fill()
disque(radius, x, y, color)
end_fill()
radius-=5
color_index = (color_index + 1) % len(list_color2)</code>Les axes de rotations des planètes :

Les axes ici en blanc représentantes le positionnement des astres dans le système solaire on les a codé en plusieurs étapes.
from turtle import *
import secrets
def disque(rayon, x, y, couleur=(1, 1, 1)):
penup()
goto(x, y-rayon)
pendown()
pencolor(color)
circle(rayon)
#fond
list_color2=["#AC00D7", "#9B00C1", "#9A00C2", "#9800BF", "#8D00B0", "#8300A4", "#770095", "#690083", "#500064", "#400050", "#23002C", "#400050", "#500064", "#690083", "#770095", "#8300A4", "#8D00B0", "#9800BF", "#9A00C2", "#9B00C1", "#AC00D7",]
x = 0
y = -45
radius = 1100
color_index = 0
while radius >= 0:
speed(400)
color = list_color2[color_index]
fillcolor(color)
begin_fill()
disque(radius, x, y, color)
end_fill()
radius-=5
color_index = (color_index + 1) % len(list_color2)
#cercle blanc
x, y = (0,-45)
radius = (410)
color = ("white")
disque(radius, x, y, color)
x, y = (0,-45)
radius = (370)
color = ("white")
disque(radius, x, y, color)
x, y = (0,-45)
radius = (330)
color = ("white")
disque(radius, x, y, color)
x, y = (0,-45)
radius = (290)
color = ("white")
disque(radius, x, y, color)
x, y = (0,-45)
radius = (230)
color = ("white")
disque(radius, x, y, color)
x, y = (0,-45)
radius = (200)
color = ("white")
disque(radius, x, y, color)
x, y = (0,-45)
radius = (170)
color = ("white")
disque(radius, x, y, color)
x, y = (0,-45)
radius = (140)
color = ("white")
disque(radius, x, y, color) La créations du soleil :
le soleil est l’astre qui nous permet de nous réchauffer donc les couleurs chaudes et vive est ce qui allait le mieux avec le soleil.

from turtle import *
import secrets
def disque(rayon, x, y, couleur=(1, 1, 1)):
penup()
goto(x, y-rayon)
pendown()
pencolor(color)
circle(rayon)
#fond
list_color2=["#AC00D7", "#9B00C1", "#9A00C2", "#9800BF", "#8D00B0", "#8300A4", "#770095", "#690083", "#500064", "#400050", "#23002C", "#400050", "#500064", "#690083", "#770095", "#8300A4", "#8D00B0", "#9800BF", "#9A00C2", "#9B00C1", "#AC00D7",]
x = 0
y = -45
radius = 1100
color_index = 0
while radius >= 0:
speed(400)
color = list_color2[color_index]
fillcolor(color)
begin_fill()
disque(radius, x, y, color)
end_fill()
radius-=5
color_index = (color_index + 1) % len(list_color2)
#cercle blanc
x, y = (0,-45)
radius = (410)
color = ("white")
disque(radius, x, y, color)
x, y = (0,-45)
radius = (370)
color = ("white")
disque(radius, x, y, color)
x, y = (0,-45)
radius = (330)
color = ("white")
disque(radius, x, y, color)
x, y = (0,-45)
radius = (290)
color = ("white")
disque(radius, x, y, color)
x, y = (0,-45)
radius = (230)
color = ("white")
disque(radius, x, y, color)
x, y = (0,-45)
radius = (200)
color = ("white")
disque(radius, x, y, color)
x, y = (0,-45)
radius = (170)
color = ("white")
disque(radius, x, y, color)
x, y = (0,-45)
radius = (140)
color = ("white")
disque(radius, x, y, color)
#soleil
list_color=["yellow", "orange", "red", "orange", "yellow", "orange", "red"]
x = 0
y = -45
radius = 100
color_index = 0
while radius > 0:
color = list_color[color_index]
fillcolor(color)
begin_fill()
disque(radius, x, y, color)
end_fill()
radius-=1
color_index = (color_index + 1) % len(list_color)
def arrondi_gauche():
for i in range(180):
left(1)
forward(7/45)
def arrondi_droit():
for i in range(180):
right(1)
forward(7/100)
Les planètes :
Un système solaire sans nos planètes n’est pas un vrai système solaire nous avons reproduit différent astres sur nos axes.
