Computer Graphics

Moderators: Sephiroth
Number of threads: 1241
Number of posts: 2641

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Fractal generation not fitting in expected range Posted by Ballaw on 11 Jan 2013 at 9:03 PM
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.



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.