Here's a problem description for generating a fractal:
The program will use the position of the mouse to set the value of a complex number of the form v = (a + bi). The program will then draw a large collection of points (or small circles) that are positioned at the locations given by sums of powers of this value v. In particular, you can calculate truncated sums of an infinite series of powers of v:
1.0 -- 0 ± v -- 0 ± v ± v^2 -- etc. ...
The first term of this series represents the position (0,0), which should appear as a point in the center of the screen. The next term of the series is 0 ± v0, which is the same as the two positions (1,0) and (-1,0). The next term gives four possible values, and you should draw a separate point for each of these values. The next term gives eight points, then 16, 32, 64, and so on. The program should calculate at least the first 10 terms of this series, and plot points for each of these, which corresponds to drawing at least 1023 points.
Calculate powers of v using the standard rules for multiplying complex numbers. For example v^2 = (a + bi) * (a + bi) = (a^2– b^2) + 2abi, where i = sqrt(-1).
The problem is with the sum of complex numbers. If v is larger than 1, which it can be since the range is -3 to 3. The usual behavior is for the numbers to blow up quickly, often reaching infinity. But the problem shows example fractals fitting within the range.
If anyone has any insight into this problem and what I'm conceptually getting wrong it would be of great help. Thanks!