Question: This task should be done in Java SinglePanel.java: ColorList.java: The task is to create a fractal program that: * renders a color fractal to a
This task should be done in Java






SinglePanel.java:


ColorList.java:

The task is to create a fractal program that: * renders a color fractal to a screen window * writes the (color) pixels to a ppm image. You need to implement the following three classes/sources: *Mandelbrot: for the fractal calculation ComplexNumber: for repesenting a complex number, and doing ops (squared or multiplication, addition) on it *ColorList: for creating a randomized color list (ArrayList-Color) with 256 entries (that way, we can use a 0.255 fractal calc value as an index into here, to lookup a color, in other words, gray in, color out). Here is how you can approach the problem: Mandelbrot: * members: xtable[]0xRes,yRes,oxMin,axMax,cyMin,cyMax, colors (of type ColorList to hold java.awt.Color values) * methods: Mandelbrot (constructor, with arguments so the user can pass in xRes,yRes,cxMin,cMax,cyMin,cyMax) [eg Mandelbrot mand-new Mandelbrot(640,48021-1)], setPixel(Graphics g, int x, int y, int red, int grn, int blu) to set RGB of a single pixel, displayFractal(Graphics g) to render the fractal pixel-by-pixel on the screen, saveFractal(String fileName) to output the fractal as a.ppm image. In the constructor,fill the colors' ColorList object with colors so that they can be used for pixel display and for writing to disk. The task is to create a fractal program that: * renders a color fractal to a screen window * writes the (color) pixels to a ppm image. You need to implement the following three classes/sources: *Mandelbrot: for the fractal calculation ComplexNumber: for repesenting a complex number, and doing ops (squared or multiplication, addition) on it *ColorList: for creating a randomized color list (ArrayList-Color) with 256 entries (that way, we can use a 0.255 fractal calc value as an index into here, to lookup a color, in other words, gray in, color out). Here is how you can approach the problem: Mandelbrot: * members: xtable[]0xRes,yRes,oxMin,axMax,cyMin,cyMax, colors (of type ColorList to hold java.awt.Color values) * methods: Mandelbrot (constructor, with arguments so the user can pass in xRes,yRes,cxMin,cMax,cyMin,cyMax) [eg Mandelbrot mand-new Mandelbrot(640,48021-1)], setPixel(Graphics g, int x, int y, int red, int grn, int blu) to set RGB of a single pixel, displayFractal(Graphics g) to render the fractal pixel-by-pixel on the screen, saveFractal(String fileName) to output the fractal as a.ppm image. In the constructor,fill the colors' ColorList object with colors so that they can be used for pixel display and for writing to disk
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
