Texas Instruments TI-84 Plus Calculator User Manual


 
Activities 63
9. Press q. Select 2:Zoom In and repeat steps 4 through 8 to explore
the apparent function intersection on the left side of the display.
Using a Program to Create the Sierpinski Triangle
Setting up the Program
This program creates a drawing of a famous fractal, the Sierpinski
Triangle, and stores the drawing to a picture. To begin, press  ~ ~
1. Name the program SIERPINS, and then press Í. The program
editor is displayed.
Program
PROGRAM:SIERPINS
:FnOff :ClrDraw
:PlotsOff
:AxesOff
:0!Xmin:1!Xmax
:0!Ymin:1!Ymax
Set viewing window.
:rand!X:rand!Y
:For(K,1,3000)
:rand!N
Beginning of For group.
:If N1à3
:Then
:.5X!X
:.5Y!Y
:End
If/Then group
:If 1à3<N and N2à3
:Then
:.5(.5+X)!X
:.5(1+Y)!Y
:End
If/Then group.
:If 2à3<N
:Then
:.5(1+X)!X
:.5Y!Y
:End
If/Then group.