Python_2  1.0
Functions | Variables
_15_julia Namespace Reference

Interactively draws a Julia set. More...

Functions

def julia (c, kcolor)
 
def init ()
 
def display ()
 
def reshape (w, h)
 
def keyboard (key, x, y)
 
def main (argv=None)
 

Variables

float LEFT = -1.5
 
float RIGHT = 1.5
 
float TOP = 1.5
 
float BOTTOM = -1.5
 
int WIDTH_MATRIX = 512
 
int HEIGHT_MATRIX = 512
 
int width = WIDTH_MATRIX
 
int height = HEIGHT_MATRIX
 
int MaxIters = 200
 
list c
 
 mind = len(c)
 
int ind = 0
 
bool __LIST__ = True
 
 xrange = range
 

Detailed Description

Interactively draws a Julia set.

Usage: 'n' draws the next set. 'q' or 'Esc' quits.

Author
Paulo Roma Cavalcanti
Since
06/05/2010
See also
http://www.tjhsst.edu/~dhyatt/supercomp/n106.html
http://en.wikipedia.org/wiki/Julia_set

Function Documentation

◆ display()

def _15_julia.display ( )

References julia().

Referenced by keyboard().

◆ init()

def _15_julia.init ( )

References julia().

Referenced by main().

◆ julia()

def _15_julia.julia (   c,
  kcolor 
)
   Computes a Julia set using the constant c.
   kcolor is the square of the radius of the 
   circle in which zn must be in to be part of the set.

   z(n+1) = z(n)**2 + c
   z = (x+iy), c = (p+iq)
   z*z = x**2 - y**2 + 2ixy  

References xrange.

Referenced by display(), init(), and keyboard().

◆ keyboard()

def _15_julia.keyboard (   key,
  x,
  y 
)

References display(), _12a_poly.exit(), and julia().

◆ main()

def _15_julia.main (   argv = None)

References init().

◆ reshape()

def _15_julia.reshape (   w,
  h 
)

Variable Documentation

◆ __LIST__

bool _15_julia.__LIST__ = True
private

◆ BOTTOM

float _15_julia.BOTTOM = -1.5

◆ c

list _15_julia.c
Initial value:
1 = [-0.12375 + 0.56508j,
2  -0.12 + 0.74j,
3  -0.11 + 0.6557j,
4  -0.194 + 0.6557j,
5  0.0 + 1.0j,
6  -0.125 + 0.0j,
7  0.11031 - 0.67037j,
8  0.27334 + 0.00742j,
9  -0.75 + 0.0j,
10  -0.8 + 0.156j,
11  -0.70176 - 0.38j,
12  0.285 + 0.01j,
13  -0.835 - 0.2321j,
14  -0.70176 - 0.38j,
15  -0.4 + 0.6j,
16  -0.6180339887498948482 + 0.0j,
17  0.285 + 0.0j]

◆ height

int _15_julia.height = HEIGHT_MATRIX

◆ HEIGHT_MATRIX

int _15_julia.HEIGHT_MATRIX = 512

◆ ind

int _15_julia.ind = 0

◆ LEFT

float _15_julia.LEFT = -1.5

◆ MaxIters

int _15_julia.MaxIters = 200

◆ mind

_15_julia.mind = len(c)

◆ RIGHT

float _15_julia.RIGHT = 1.5

◆ TOP

float _15_julia.TOP = 1.5

◆ width

int _15_julia.width = WIDTH_MATRIX

◆ WIDTH_MATRIX

int _15_julia.WIDTH_MATRIX = 512

◆ xrange

_15_julia.xrange = range

Referenced by julia().