To install StudyMoose App tap and then “Add to Home Screen”
Save to my list
Remove from my list
Fractals are mathematical objects characterized by self-similarity, where copies of the overall shape of a fractal can be found within it. This report explores the efficient real-time computation of parts of the Mandelbrot set using an FPGA and/or a Microcontroller board as part of the Embedded System Design course.
Fractals exhibit self-similarity, with various degrees of exactness. Some fractals, like those generated by Iterated Function Systems (IFS), display exact self-similarity. IFS involves a set of affine transformations with associated probabilities, which can be applied iteratively to an initial point to generate the fractal.
An example of such an IFS-generated fractal is the Sierpinski's Gasket.
Fractals can be classified by the algorithms used to create them, including IFS, Linden-Mayer Systems (L-Systems), and Escape Time Fractals.
Escape Time Fractals, a significant class of fractals, rely on non-linear algebraic functions on C2* or C3. The algorithm calculates colors for points on the drawing axis by running a feedback system based on the point's value.
The system's output escaping a given radius within a certain time determines the point's color. If the output does not escape, the point is colored differently.
The Mandelbrot set, a well-known escape time fractal, features partially similar shapes within its structure upon zooming in. This partial similarity adds to its aesthetic appeal, as opposed to other fractals that remain identical upon zooming, such as the Sierpinski's Triangle or Julia Sets.
The Mandelbrot set is generated using the equation Zn+1 = Zn2 + C, where C represents the point whose color is being calculated, and Z0 is initialized as 0 + 0j.
The experimental equipment used in this project includes the following:
It aims to teach computer programming fundamentals in a visual context and serves as the foundation for electronic sketchbooks. Processing includes a sketchbook and is built upon the PApplet Java class, implementing most of the Processing language's features. It allows for the creation of custom classes within PApplet sketches, enabling the use of complex data types beyond standard data types such as integers, characters, real numbers, and color values.
The experimental procedure involved the use of the following equipment:
Calculating the Mandelbrot set is a highly computationally intensive task. For a screen resolution of 800 × 800 pixels, there are a total of 6.4×105 points that require color computation. Computing the color for one pixel involves transforming it to a point on the complex plane and performing a series of complex plane arithmetic calculations (along with checks) in a loop, which iterates nearly 30 times to achieve satisfactory image density (higher image densities require more than 100 iterations per pixel).
During each loop iteration, approximately 10 floating-point multiplications are performed. Therefore, a total of 1.92×108 floating-point multiplications are required per frame. This method of calculating the Mandelbrot set is highly inefficient and time-consuming, making real-time zooming challenging to achieve.
The workflow involved connecting the Arduino Board to the computer using the provided connector. Subsequently, both the Arduino and Processing environments were programmed. The Mandelbrot set calculation algorithm was implemented in Arduino using C, while the coloring, drawing algorithm, and user input handling were developed in Processing using Java. The programs were then executed, and the interactive display was observed on the computer screen.
Due to the significant time consumption associated with floating-point calculations, transitioning to fixed-point calculations proved to be a favorable choice. Implementing high-precision fixed-point arithmetic on hardware proved to be more efficient compared to software-based approaches.
Instead of selecting a pixel from the screen and then transforming it to the calculation axes (which is computationally intensive), a more efficient approach was adopted. A (dx, dy) variable was introduced to represent the equivalent value for a pixel increment in the calculation axes. This approach significantly reduced the computational load as the next value for C could be determined by simply incrementing by dx or dy as needed.
The calculations for the Mandelbrot set, which are time-consuming, were optimized by considering two different approaches:
In the algorithm, the calculation of Z involves a function with lower computational complexity than the Complex Absolute Function. While this approach may alter the fractal's shape, a compromise between speed and results was achieved by experimentally squaring and adding the complex and real parts.
The total time taken to calculate and draw a full screen of 800 x 800 pixels was as follows:
We successfully demonstrated the computational capacity of the embedded system (Arduino) by implementing a custom set of algorithms and computational techniques. The only performance limitation encountered was due to the UART protocol baud rate limit (600,000) and the processor clock speed of the Arduino Uno modular board. These limitations could potentially be overcome with a more efficient protocol, such as the USB protocol.
Real-Time Mandelbrot Computation on Arduino and Display on LCD. (2024, Jan 17). Retrieved from https://studymoose.com/document/real-time-mandelbrot-computation-on-arduino-and-display-on-lcd
👋 Hi! I’m your smart assistant Amy!
Don’t know where to start? Type your requirements and I’ll connect you to an academic expert within 3 minutes.
get help with your assignment