|
-
January 31st, 2009, 09:53 PM
#1
Mandelbrot Set Help needed
So I have an assignment for a class and need to write a program that will take a defined coordinate plane/grid from user input and check whether each point is in the set. I have already written the code to check whether or not a specific point is in the mandelbrot set.
What I have to do now (and am having a hard time figuring out) is how to loop through all the possible points so that I can call a method on each one of them.
Here's an example from possible user input:
n or Grid = 4; so 4*4 is 16 I know i need to check for 16 points in the center of each of these squares
xmin = -1.5;
ymin = -1.0; that is the bottom left corner of the grid
width = 2.0; so the grid's x plane goes from -1.5 to 0.5 and contains 4 blocks
height = 2.0; same thing, y goes from -1.0 to 1.0
So the point in the center of the bottom left block would be (-1.25, -0.75). What i now need to do is check for all 16 of the points in some sort of a loop and store them in variables that can be used for output later on.
I am calling the following method and passing the following:
createPoints(n, xmin, ymin, width, height);
The method definition of createPoints looks like this:
public static void createPoints(int n, double xmin, double ymin, double width, double height) throws IOException{
Can anybody possibly help me with how they think the best way of looping through every point would be?
Thanks very much
John
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|