The mandelbrot set – Sharp EL-9900 User Manual

Page 144

Advertising
background image

11

Advanced Keyboard/PROGRAMMING USING THE SHARP EL-9900

Copyright © 2002, Sharp Electronics Corporation. Permission is granted to photocopy for educational use only.

1.

Program the calculator to plot the Mandelbrot set, which is the set of all

points in the complex plane such that |zn|<2 for all n, where zn is the nth
iterate of 0 under zn+1=zn

2

+c. The graph is generated from a construction of

a fractal by means of an iterated system.

2.

Create a new program with the name MANDEL. Enter the following program

and remember to press ENTER at the end of each line. If you make a mis

take, use the calculator’s editing features to correct the error.

3.

Enter the following program:

1

⇒J

1

STO ALPHA J ENTER

0

⇒K

0

STO ALPHA K ENTER

Label A

PRGM B 0 1 ALPHA A ENTER

K+1

⇒K

ALPHA K

+ 1 STO

ALPHA K

ENTER

-2+4J

÷100⇒M

(-)

2 + 4

ALPHA

J

÷

1

0 0

STO ALPHA M ENTER

2–4K

÷100⇒N

2

– 4 ALPHA K

÷

1 0 0 STO

ALPHA N ENTER

M

⇒X

ALPHA M STO X/

θ/T/n ENTER

N

⇒Y

ALPHA N STO ALPHA Y ENTER

1

⇒C

1

STO ALPHA C ENTER

Label B

PRGM B 0 1 ALPHA B ENTER

X

2

–Y

2

+M

⇒R

X/

θ/T/n x

2

– ALPHA Y x

2

+

ALPHA M

STO ALPHA R ENTER

2X

×Y+N⇒S

2 X/

θ/T/n ×

ALPHA Y + ALPHA N

STO ALPHA

S ENTER

R

2

+S

2

⇒Z

ALPHA R x

2

+ ALPHA S x

2

STO

ALPHA Z

ENTER

If Z>4 Goto C

PRGM B

0 3 ALPHA Z MATH

F 3 4 PRGM B 0 2 ALPHA C

ENTER

THE MANDELBROT SET

Advertising