Here's a problem description for generating a fractal. I'm doing it in Processing:
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!
2 Replies  7979 Views  Last Post: 12 January 2013  06:50 AM
#1
Processing  Fractal generation not fitting in expected range
Posted 11 January 2013  10:30 PM
Replies To: Processing  Fractal generation not fitting in expected range
#2
Re: Processing  Fractal generation not fitting in expected range
Posted 11 January 2013  10:38 PM
I'm not overly familiar with fractals, but I found a good article explaining it.
Also, I'm going to move this to Other Languages, as Processing != Java.
Also, I'm going to move this to Other Languages, as Processing != Java.
#3
Re: Processing  Fractal generation not fitting in expected range
Posted 12 January 2013  06:50 AM
ballaw, on 12 January 2013  06:30 AM, said:
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 program should calculate at least the first 10 terms of this series
[...]
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.
1.0  0 ± v  0 ± v ± v^2  etc. ...
[...] The program should calculate at least the first 10 terms of this series
[...]
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.
Are you sure? If I calculate the sum of the first 10 powers of 3+3i, I get 436053 + 2180271i. So that should be the largest number you get in that range. If you get infinity, there must be a mistake in your calculations.
This post has been edited by sepp2k: 12 January 2013  11:59 AM
Page 1 of 1
