Question: The Sierpinski triangle can be implemented in MAILAB by plotting points iteratively according to one of the following three rules that are selected randomly with
Rule 1: xn+1 = 0.5xn, yn+1 = 0.5yn.
Rule2: xn+1 = 0.5xn + 0.25, yn+1 = 0.5yn + (√3)/4
Rule 3: xn+1 = 0.5xn + 1 + 0.5, yn+1 = 0.5yn.
Write a program in a script file that calculates the x and y vectors and then plots y versus x as individual points (use plot (x, y, '^')). Start with x1 = o and y1 = o. Run the program four times with 10, 100, 1,000, and 10,000 iterations.
Step by Step Solution
3.55 Rating (165 Votes )
There are 3 Steps involved in it
Script file n10 100 1000 10000 for j14 x10 y10 for ... View full answer
Get step-by-step solutions from verified subject matter experts
Document Format (1 attachment)
652-B-F-F-M (718).docx
120 KBs Word File
