Lab 14: Fractals [20 pts] Objective: To learn how Processing works and to apply recursion with fractals (using Processing’s documentation). Background Fractals are geometric shapes that have patterns...

1 answer below »
Directions are attached below. The link to edit the essay is:https://docs.google.com/document/d/1KMpA2yDPJCgZX_FPYUURDCJX4lO0xEt373MDypPXd84/edit?usp=sharing


Lab 14: Fractals [20 pts] Objective: To learn how Processing works and to apply recursion with fractals (using Processing’s documentation). Background Fractals are geometric shapes that have patterns that repeat indefinitely, typically scaling smaller and smaller in size. They have “fractional dimension”. Our goal is to create one of these via code. However, we need a Graphical User Interface (GUI) of some sort. That’s where Processing comes into play. Processing is a graphical library that can be integrated into Java as well as Python and Javascript. There are other Java GUIs we can use like Swing or JavaFX, but the former is a tad outdated, and the latter isn’t easily runnable in Replit (it’s too slow). Processing meets that perfect in-between standard of being easy to pick up and relatively modernized. Instructions 1. Read ALL of the instructions before actually working on Step 2. 2. We need to understand how Processing works before we tackle fractals. Processing has both video and text tutorials you can follow along with, though I would suggest at least going through Processing Overview. a. Note that our version of Processing will look a tad different than what is shown in the tutorials as we are using Replit as our IDE rather than using Processing’s built-in IDE. b. One of the key takeaways should be that while you can create shapes on the display window with simple method calls (like how we did with CMU shapes last year in Comp Math), you can structure your code via built-in methods – specifically setup() and draw(). https://processing.org/tutorials https://processing.org/tutorials https://processing.org/tutorials/overview https://processing.org/tutorials/overview 3. Pick a type of fractal to simulate. Some examples of fractals are (totally not in order of difficulty from least to greatest): a. Fractal tree b. Cantor set c. Sierpinski triangle d. Koch snowflake (this requires an understanding of how to use a PVector in Processing) Feel free to utilize Google or use the resources provided in Step 4 if you need some more information! 4. Write the code that makes the fractal you picked. The caveat: create your own version of the fractal you are trying to simulate. Make it interactive, modify what recursive pattern you’re applying, combine fractals – basically, the point is to play around with the general fractal design and understand how to trace the algorithm. a. Two fantastic resources are (1) the Examples that Processing has on its website, and (2) “The Nature of Code” by Daniel Shiffman. 5. Find the Schoology assignment called “Lab 14: Fractals”. You should see a Google Doc embedded. Write an essay explaining how you came about understanding the fractal you simulated. To provide some level of guidance with what you should specifically write on, here are a few guiding questions: a. What about Processing did you have to learn in order to make your fractal draw on the display? What difficulties and struggles did you encounter, and how did you work them out? b. Explain step by step how the recursive nature of the code allows the fractal to work. Be descriptive without using “fluff sentences.” c. What specifically did you modify from the original fractal design? How did the change affect the level of difficulty in updating your code? There is no page minimum or maximum, but be mindful how many points are ascribed to the essay (see the grading rubric on the next page). You may use bullet points and/or images if they assist you in explaining your work! If you feel an essay is restricting, feel free to ask me about utilizing a different medium (video, PowerPoint presentation, etc.) Notes • The point of this lab is two-fold: (1) learn the methods of a new library we may not have used before, and (2) understand how to trace recursive code and explain the logic behind it. While I do not condone plagiarism and claiming someone else’s work as yours, you are more than welcome to use existing code to help you understand better what you want to do. Tread the line carefully and don’t cross it! • The open-ended nature of this lab should foreshadow what the Q4 lab(s) will look like… Submission When your source code is completed, make sure to submit the lab on Replit AND submit the essay in Schoology. https://processing.org/examples https://natureofcode.com/book/chapter-8-fractals/ https://natureofcode.com/book/chapter-8-fractals/ Grading Rubric Points Code demonstrates a fractal of your choice with a level of variance (interactive, modification of recursive pattern, etc.) 8 Essay describing the code is organized and clearly (and concisely) explains the logic 10 All instructions have been followed from the previous pages 2 Output is formatted neatly and in an organized fashion Code is commented appropriately Variables are organized accordingly and named meaningfully 2 TOTAL 20
Answered 2 days AfterApr 16, 2022

Answer To: Lab 14: Fractals [20 pts] Objective: To learn how Processing works and to apply recursion with...

Sathishkumar answered on Apr 17 2022
94 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here