Bonjour
je crée cette discussion juste pour montrer une image mais elle elle en vaut bien la peine
C'est un ensemble de julias avec ce code
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
from numpy import *
import pygame
from pygame.locals import *
def pycode(c_1,c_2,c_3):
    return c_3+c_2*256+c_1*256**2
couleur=zeros((150))
ri,vi,bi=250,0,0
for i in range(25):
    couleur[i]=pycode(ri,vi,bi)
    vi+=10
for i in range(25,50):
    couleur[i]=pycode(ri,vi,bi)
    ri-=10
for i in range(50,75):
    couleur[i]=pycode(ri,vi,bi)
    bi+=10
for i in range(75,100):
    couleur[i]=pycode(ri,vi,bi)
    vi-=10
for i in range(100,125):
    couleur[i]=pycode(ri,vi,bi)
    ri+=10
for i in range(125,150):
    couleur[i]=pycode(ri,vi,bi)
    bi-=10
iteration_max=input("iteration maxi")
zoom=float(input("zoom"))
point=input("point")
eca=zoom/200
x1 = -1.5
x2 = 1.5
y1 = -1.2
y2 = 1.2
image_x = (x2 - x1) * zoom
image_y = (y2 - y1) * zoom
a=zeros((image_x,image_y),dtype=uint32)
for x in range(0,image_x):
    for y in range(0,image_y):
        c_r =point[0]
        c_i =point[1]
        z_r =  x / zoom + x1
        z_i = y / zoom + y1
        i = 0
        while z_r*z_r + z_i*z_i <4 and i < iteration_max:
            tmp = z_r
            z_r = z_r*z_r - z_i*z_i + c_r
            z_i = 2*z_i*tmp + c_i
            i = i+1
        if i < iteration_max:
            a[x][y]=couleur[(i*2)%150]
M=a
hM=len(M)
lM=len(M[0])
print hM,lM
pygame.init()
fenetre = pygame.display.set_mode((hM,lM))
pygame.display.set_caption('julias')
pygame.surfarray.blit_array(fenetre,M)
pygame.image.save(fenetre,"Julias000.png")
continuer = True
while continuer:
    pygame.time.Clock().tick(1)
    pygame.display.flip()
    for event in pygame.event.get():	#Attente des événements
		if event.type == QUIT:
			continuer = False
pygame.quit()
avec 2400 iteration
zoom de 400 et avec le point -0.66+0.3412993312j(entrer -0.66,0.3412993312 dans l'input point)
point que j'ai trouvé avec cez code
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
c=complex(input("cx "),0)
i=3499
p=1.0
while p>=0.0000000000000001:
    z=complex(0,0)
    for i in range(1,3500):
        z=z*z+c
        if z.real*z.real+z.imag*z.imag>4:
            break
    if i<3499:
        c=c-complex(0,p)
        p/=10
        i=3499
    else:
        c=c+complex(0,p)
print c
avec -0.66 dans l'input cx
apres une demi heure de calculs,mon programme a donné ça:
Nom : Julias000.png
Affichages : 285
Taille : 336,4 Ko