/[cvs]/fract/mandel.py
ViewVC logotype

Annotation of /fract/mandel.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (hide annotations) (vendor branch)
Sat Feb 24 15:57:15 2001 UTC (23 years, 8 months ago) by teddy
Branch: masse, MAIN
CVS Tags: start, HEAD
Changes since 1.1: +0 -0 lines
File MIME type: text/x-python
Imported sources (take 2)

1 teddy 1.1 #!/usr/bin/python
2    
3     import Image, sys
4    
5     mandel= Image.new("L",(570,570))
6    
7     for x in range(0,570):
8     for y in range(0,285):
9     c= (x-285)/142.5
10     c= c+(y-285)*(0+1j)/142.5
11     z= i= 0
12     while i<1000 and abs(z)<2:
13     z= z**2+c
14     i= i+1
15     color= ((i**0.5)*40%256)
16     if i<1000:
17     mandel.putpixel((x,y), color)
18     mandel.putpixel((x, 569-y), color)
19    
20     mandel.save(sys.stdout, "PNG")

root@recompile.se
ViewVC Help
Powered by ViewVC 1.1.26