<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" version="2.0">
    <channel>
        
        <title>
            <![CDATA[ generative art - freeCodeCamp.org ]]>
        </title>
        <description>
            <![CDATA[ Browse thousands of programming tutorials written by experts. Learn Web Development, Data Science, DevOps, Security, and get developer career advice. ]]>
        </description>
        <link>https://www.freecodecamp.org/news/</link>
        <image>
            <url>https://cdn.freecodecamp.org/universal/favicons/favicon.png</url>
            <title>
                <![CDATA[ generative art - freeCodeCamp.org ]]>
            </title>
            <link>https://www.freecodecamp.org/news/</link>
        </image>
        <generator>Eleventy</generator>
        <lastBuildDate>Tue, 28 Jul 2026 14:55:03 +0000</lastBuildDate>
        <atom:link href="https://www.freecodecamp.org/news/tag/generative-art/rss.xml" rel="self" type="application/rss+xml" />
        <ttl>60</ttl>
        
            <item>
                <title>
                    <![CDATA[ How to save canvas animations with CCapture ]]>
                </title>
                <description>
                    <![CDATA[ By Ibby EL-Serafy You’ve been learning p5.js and you’ve created a wonderful animation and now you want to share it with the world. How do you go about that? We could use screen capture software, but this only works if the animation is running at the ... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-save-canvas-animations-with-ccapture-78c70f0e86ac/</link>
                <guid isPermaLink="false">66c35442d58e4fdd567d51c5</guid>
                
                    <category>
                        <![CDATA[ Art ]]>
                    </category>
                
                    <category>
                        <![CDATA[ generative art ]]>
                    </category>
                
                    <category>
                        <![CDATA[ JavaScript ]]>
                    </category>
                
                    <category>
                        <![CDATA[ General Programming ]]>
                    </category>
                
                    <category>
                        <![CDATA[ technology ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Fri, 22 Mar 2019 17:09:42 +0000</pubDate>
                <media:content url="https://cdn-media-1.freecodecamp.org/images/1*UDBFB687oY280RLMbOwbSw.jpeg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Ibby EL-Serafy</p>
<p>You’ve been learning p5.js and you’ve created a wonderful animation and now you want to share it with the world. How do you go about that?</p>
<p>We could use screen capture software, but this only works if the animation is running at the right speed. With the above animation, I was getting less than half a frame per second. The <a target="_blank" href="https://github.com/spite/ccapture.js">ccapture.js</a> library is mentioned in the p5.js documentation and has worked well for me.</p>
<p>If you’d like to follow along with this tutorial you can fork the sandbox below, which has all the code you’ll need to start.</p>
<p>View my codesandbox <a target="_blank" href="https://codesandbox.io/s/wy11r18xz8?fontsize=14">here</a>.</p>
<p>The first thing we’ll need to do is download the <a target="_blank" href="https://github.com/spite/ccapture.js/blob/master/build/CCapture.all.min.js">minified CCapture javascript file</a>. We’ll move the file into our project folder, or upload it to our sandbox folder. Then we need to add it to our index.html file:</p>
<pre><code>&lt;script src=<span class="hljs-string">"p5.min.js"</span>&gt;&lt;<span class="hljs-regexp">/script&gt;&lt;script src="CCapture.all.min.js"&gt;&lt;/</span>script&gt;<span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"sketch.js"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span></span>
</code></pre><p>In the sketch.js file, we need to initialize the capturer object. We also need to specify the framerate we’d like our animation to be. We can do this at the top of our file:</p>
<pre><code><span class="hljs-keyword">let</span> framerate = <span class="hljs-number">30</span>;<span class="hljs-keyword">var</span> capturer = <span class="hljs-keyword">new</span> CCapture( {  <span class="hljs-attr">format</span>: <span class="hljs-string">'webm'</span>,  framerate,  <span class="hljs-attr">name</span>: <span class="hljs-string">'noise_visualization'</span>,  <span class="hljs-attr">quality</span>: <span class="hljs-number">100</span>,} );
</code></pre><p>Note that we don’t need to set the framerate using the p5.js <code>frameRate()</code> function.</p>
<p>As well as <code>webm</code> you can select <code>jpeg</code> or <code>png</code> for the format, both of which generate a tar file with each frame as an image. According to the documentation, the <code>gif</code> format may not perform as well. Keep that in mind if you’re planning on using it.</p>
<p>Using the WebM format means we’ll be able to view the animation as soon as it’s ready. That seems a lot more fun than having to go through converting the images into a video first so we’ll go with that.</p>
<p>Next, we need to start the capturer, we’ll do this at the end of the setup function. You could also start it at any point in the animation, or in response to a key press or mouse click.</p>
<pre><code><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">setup</span>(<span class="hljs-params"></span>) </span>{  <span class="hljs-comment">// Setup code  // ...  capturer.start();}</span>
</code></pre><p>Now we need to capture the frames, but to do that you need to pass the <code>canvas</code> to the <code>capture</code> function first. We can make a small change to the <code>setup</code> function so we can save the canvas to a variable:</p>
<pre><code><span class="hljs-comment">// Initialise canvas outside of setup function so it can be used in the draw functionlet xseed, yseed, incrementxnoise,incrementynoise, canvas;</span>
</code></pre><pre><code><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">setup</span>(<span class="hljs-params"></span>) </span>{  <span class="hljs-keyword">let</span> p5canvas = createCanvas(<span class="hljs-number">200</span>, <span class="hljs-number">200</span>);  canvas = p5canvas.canvas;  <span class="hljs-comment">// Rest of setup code}</span>
</code></pre><p>And now at the end of the draw function, we capture the canvas.</p>
<pre><code><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">draw</span>(<span class="hljs-params"></span>) </span>{  <span class="hljs-comment">// Code for drawing the frame  capturer.capture(canvas);}</span>
</code></pre><p>Now, all we need to do is decide when to stop capturing and then save the animation. We could do this based on elapsed time, using the <code>millis()</code> function in p5.js. But it’s likely we want our animation to be a specific length, and if the frames are rendering slowly the elapsed time won’t reflect that. Instead, we can work out how many seconds have passed using the current <code>frameCount</code>:</p>
<pre><code><span class="hljs-keyword">let</span> secondsElapsed = frameCount/framerate;
</code></pre><p>Now if we want the animation to stop at, say, 5 seconds we could do it like this:</p>
<pre><code><span class="hljs-keyword">let</span> secondsElapsed = frameCount/framerate;<span class="hljs-keyword">if</span> (secondsElapsed &gt;= <span class="hljs-number">5</span>) {  capturer.stop();  capturer.save();  noLoop(); <span class="hljs-comment">// This is optional}</span>
</code></pre><p>And that’s it! Here’s what it all looks like in a sandbox:</p>
<p>View my codesandbox <a target="_blank" href="https://codesandbox.io/s/oqm8yp8ow6?codemirror=1&amp;fontsize=14&amp;module=%2Fsketch.js">here.</a></p>
<p>Note that I’ve commented out the code for downloading for the sake of embedding it on Medium.</p>
<h4 id="heading-using-ffmpeg-to-convert">Using ffmpeg to convert</h4>
<p>Now you have your animation, which is awesome, but you may need it in different formats. There are a lot of programs and online converters which you could use. I’ve been using <a target="_blank" href="https://www.ffmpeg.org/download.html">ffmpeg</a> because it’s flexible and available from the command line. In their own words:</p>
<blockquote>
<p>FFmpeg is the leading multimedia framework, able to <strong>decode</strong>, <strong>encode</strong>, <strong>transcode</strong>, <strong>mux</strong>, <strong>demux</strong>, <strong>stream</strong>, <strong>filter</strong> and <strong>play</strong> pretty much anything that humans and machines have created. It supports the most obscure ancient formats up to the cutting edge.</p>
</blockquote>
<p>To convert the animation into a gif, you can use something like this.</p>
<pre><code>ffmpeg -i noise_visualization.webm -filter_complex <span class="hljs-string">"[0:v] fps=15, split [a][b];[a] palettegen [p];[b][p] paletteuse"</span> noise_visualization.gif
</code></pre><p>GIPHY have a <a target="_blank" href="https://engineering.giphy.com/how-to-make-gifs-with-ffmpeg/">great article</a> that explains what all these options do.</p>
<p>And to convert into an mp4 for Instagram you can use something like this:</p>
<pre><code>ffmpeg -i noise_visualization.webm -c:a copy -c:v libx264 -b:v <span class="hljs-number">5</span>M -maxrate <span class="hljs-number">5</span>M noise_visualization.mp4
</code></pre><p>If you reuse the same ffmpeg options often, it may be useful to save them into an alias. You’ll have to find out the specifics of how to do it for your own terminal program. In cmder it’s under Settings&gt;Environment:</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*pNBIDzV04RnAQKZRGb46lw.png" alt="Image" width="769" height="514" loading="lazy">
<em>The cmder settings window</em></p>
<p>In cmder, the alias is set with a command like this:</p>
<pre><code>alias ffinsta=ffmpeg -i $<span class="hljs-number">1</span> -c:a copy -c:v libx264 -b:v <span class="hljs-number">5</span>M -maxrate <span class="hljs-number">5</span>M $<span class="hljs-number">2</span>
</code></pre><p>Here <code>$1</code> is the first argument given to <code>ffinsta</code> and <code>$2</code> is the second argument. Once the alias is set you can use it like this:</p>
<pre><code>ffinsta noise_visualization.webm noise_visualization.mp4
</code></pre><p>Note that, in cmder, you have to restart the terminal after setting the alias. This may be the case for your terminal program too.</p>
<p>I hope you’ve found this tutorial helpful, don’t hesitate to ask if you need any help.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*UDBFB687oY280RLMbOwbSw.jpeg" alt="Image" width="800" height="800" loading="lazy">
_Photo by [Unsplash](https://unsplash.com/photos/cn0-hgcpoL8?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText" rel="noopener" target="_blank" title=""&gt;Markus Spiske on &lt;a href="https://unsplash.com/search/photos/canvas?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText" rel="noopener" target="<em>blank" title=")</em></p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ How to Create Generative Art In Less Than 100 Lines Of Code ]]>
                </title>
                <description>
                    <![CDATA[ By Eric Davidson Generative art, like any programming topic, can be intimidating if you’ve never tried it before. I’ve always been interested in it because I love finding new ways that programming can be utilized creatively. Furthermore, I think anyo... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-create-generative-art-in-less-than-100-lines-of-code-d37f379859f/</link>
                <guid isPermaLink="false">66c3513d4f1fc448a367905d</guid>
                
                    <category>
                        <![CDATA[ creativity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ generative art ]]>
                    </category>
                
                    <category>
                        <![CDATA[ General Programming ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Python ]]>
                    </category>
                
                    <category>
                        <![CDATA[ tech  ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Mon, 05 Nov 2018 23:35:42 +0000</pubDate>
                <media:content url="https://cdn-media-1.freecodecamp.org/images/1*zMSR6lwGpWySHyxC5kagFA.jpeg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Eric Davidson</p>
<p>Generative art, like any programming topic, can be intimidating if you’ve never tried it before. I’ve always been interested in it because I love finding new ways that programming can be utilized creatively. Furthermore, I think anyone can appreciate the concept of artwork that literally creates itself.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/X9dFKTJ0n2XhG9TULvKBtJgApZeErkD6vRDQ" alt="Image" width="800" height="450" loading="lazy">
<em>Labeled for reuse from Pexels</em></p>
<h3 id="heading-what-is-generative-art">What is generative art?</h3>
<p>Generative art is the output of a system that makes its own decisions about the piece, rather than a human. The system could be as simple as a single Python program, as long as it has <strong>rules</strong> and some aspect of <strong>randomness.</strong></p>
<p>With programming, it’s pretty straightforward to come up with rules and constraints. That’s all conditional statements are. Having said that, finding ways to make these rules create something interesting can be tricky.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/wbde3i5uGTH1rRXb7AAHGUgsp1mgr4jN90JH" alt="Image" width="250" height="180" loading="lazy">
<em>Conway’s Game of Life (Labeled for reuse)</em></p>
<p>The <a target="_blank" href="https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life">Game of Life</a> is a famous set of four simple rules that determine the “birth” and “death” of each cell in the system. Each of the rules play a part in advancing the system through each generation. Although the rules are simple and easy to understand, complex patterns quickly begin to emerge and ultimately form fascinating results.</p>
<p>Rules may be responsible for creating the foundation of something interesting, but even something as exciting as Conway’s Game of Life is predictable. Since the four rules are the determining factors for each generation, the way to produce unforeseeable results is to introduce randomization at the starting state of the cells. Beginning with a random matrix will make each execution unique without needing to change the rules.</p>
<p>The best examples of generative art are the ones that find a combination of predictability and randomness in order to create something interesting that is also statistically <strong>irreproducible</strong>.</p>
<h3 id="heading-why-should-you-try-it"><strong>Why should you try it?</strong></h3>
<p>Not all side projects are created equal, and generative art may not be something you’re inclined to spend time on. If you decide to work on a project however, then you can expect these benefits:</p>
<ul>
<li><strong>Experience</strong> — Generative art is just another opportunity to hone some new and old skills. It can serve as a gateway to practicing concepts like algorithms, data structures, and even new languages.</li>
<li><strong>Tangible Results</strong> — In the programming world we rarely get to see any thing physical come out of our efforts, or at least I don’t. Right now I have a few posters in my living room displaying prints of my generative art and I love that programming is responsible for that.</li>
<li><strong>Attractive Projects</strong> — We’ve all had the experience of explaining a personal project to someone, possibly even during an interview, without an easy way to convey the effort and results of the project. Generative art speaks for itself, and most anyone will be impressed by your creations, even if they can’t fully understand the methods.</li>
</ul>
<h3 id="heading-where-should-you-start">Where should you start?</h3>
<p>Getting started with generative art is the same process as any project, the most crucial step is to come up with an idea or find one to build upon. Once you have a goal in mind, then you can start working on the technology required to achieve it.</p>
<p>Most of my generative art projects have been accomplished in Python. It’s a fairly easy language to get used to and it has some incredible packages available to help with image manipulation, such as <a target="_blank" href="https://pillow.readthedocs.io/en/5.3.x/">Pillow</a>.</p>
<p>Luckily for you, there’s no need to search very far for a starting point, because I’ve provided some code down below for you to play with.</p>
<h3 id="heading-sprite-generator">Sprite Generator</h3>
<p>This project started when I saw a post showing off a sprite generator written in Javascript. The program created 5x5 pixel art sprites with some random color options and its output resembled multi-colored space invaders.</p>
<p>I knew that I wanted to practice image manipulation in Python, so I figured I could just try to recreate this concept on my own. Additionally, I thought that I could expand on it since the original project was so limited in the size of the sprites. I wanted to be able to specify not only the size, but also the number of them and even the size of the image.</p>
<p>Here’s a look at two different outputs from the solution I ended up with:</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/4d1yWSxXbv5c8LrTNUaJceViqS7DRXV0wYVS" alt="Image" width="800" height="800" loading="lazy">
<em>7x7–30–1900</em></p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/UV5HgITUXjpy535zkeoCKPRDs-kn6A6-kGgJ" alt="Image" width="800" height="800" loading="lazy">
<em>43x43–6–1900</em></p>
<p>These two images don’t resemble each other at all, but they’re both the results of the same system. Not to mention, due to the complexity of the image and the <strong>randomness</strong> of the sprite generation, there is an extremely high probability that even with the same arguments, these images will forever be one of a kind. I love it.</p>
<h3 id="heading-the-environment">The environment</h3>
<p>If you want to start playing around with the sprite generator, there’s a little foundation work that has to be done first.</p>
<p>Setting up a proper environment with Python can be tricky. If you haven’t worked with Python before, you’ll probably need to <a target="_blank" href="https://www.python.org/downloads/">download Python 2.7.10.</a> I initially had trouble setting up the environment, so if you start running into problems, you can do what I did and look into <a target="_blank" href="https://packaging.python.org/guides/installing-using-pip-and-virtualenv/">virtual environments</a>. Last but not least, make sure you have <a target="_blank" href="https://pillow.readthedocs.io/en/5.3.x/installation.html">Pillow</a> installed as well.</p>
<p>Once you have the environment set up, you can copy my code into a file with extension .py and execute with the following command:</p>
<pre><code>python spritething.py [SPRITE_DIMENSIONS] [NUMBER] [IMAGE_SIZE]
</code></pre><p>For example, the command to create the first matrix of sprites from above would be:</p>
<pre><code>python spritething.py <span class="hljs-number">7</span> <span class="hljs-number">30</span> <span class="hljs-number">1900</span>
</code></pre><h3 id="heading-the-code">The code</h3>
<pre><code><span class="hljs-keyword">import</span> PIL, random, sysfrom PIL <span class="hljs-keyword">import</span> Image, ImageDraw
</code></pre><pre><code>origDimension = <span class="hljs-number">1500</span>
</code></pre><pre><code>r = lambda: random.randint(<span class="hljs-number">50</span>,<span class="hljs-number">215</span>)rc = lambda: (r(), r(), r())
</code></pre><pre><code>listSym = []
</code></pre><pre><code>def create_square(border, draw, randColor, element, size):  <span class="hljs-keyword">if</span> (element == int(size/<span class="hljs-number">2</span>)):    draw.rectangle(border, randColor)  elif (len(listSym) == element+<span class="hljs-number">1</span>):    draw.rectangle(border,listSym.pop())  <span class="hljs-keyword">else</span>:    listSym.append(randColor)    draw.rectangle(border, randColor)
</code></pre><pre><code>def create_invader(border, draw, size):  x0, y0, x1, y1 = border  squareSize = (x1-x0)/size  randColors = [rc(), rc(), rc(), (<span class="hljs-number">0</span>,<span class="hljs-number">0</span>,<span class="hljs-number">0</span>), (<span class="hljs-number">0</span>,<span class="hljs-number">0</span>,<span class="hljs-number">0</span>), (<span class="hljs-number">0</span>,<span class="hljs-number">0</span>,<span class="hljs-number">0</span>)]  i = <span class="hljs-number">1</span>
</code></pre><pre><code>  <span class="hljs-keyword">for</span> y <span class="hljs-keyword">in</span> range(<span class="hljs-number">0</span>, size):    i *= <span class="hljs-number">-1</span>    element = <span class="hljs-number">0</span>    <span class="hljs-keyword">for</span> x <span class="hljs-keyword">in</span> range(<span class="hljs-number">0</span>, size):      topLeftX = x*squareSize + x0      topLeftY = y*squareSize + y0      botRightX = topLeftX + squareSize      botRightY = topLeftY + squareSize
</code></pre><pre><code>      create_square((topLeftX, topLeftY, botRightX, botRightY), draw, random.choice(randColors), element, size)      <span class="hljs-keyword">if</span> (element == int(size/<span class="hljs-number">2</span>) or element == <span class="hljs-number">0</span>):        i *= <span class="hljs-number">-1</span>;      element += i
</code></pre><pre><code>def main(size, invaders, imgSize):  origDimension = imgSize  origImage = Image.new(<span class="hljs-string">'RGB'</span>, (origDimension, origDimension))  draw = ImageDraw.Draw(origImage)
</code></pre><pre><code>  invaderSize = origDimension/invaders  padding = invaderSize/size
</code></pre><pre><code>  <span class="hljs-keyword">for</span> x <span class="hljs-keyword">in</span> range(<span class="hljs-number">0</span>, invaders):    <span class="hljs-keyword">for</span> y <span class="hljs-keyword">in</span> range(<span class="hljs-number">0</span>, invaders):      topLeftX = x*invaderSize + padding/<span class="hljs-number">2</span>      topLeftY = y*invaderSize + padding/<span class="hljs-number">2</span>      botRightX = topLeftX + invaderSize - padding      botRightY = topLeftY + invaderSize - padding
</code></pre><pre><code>      create_invader((topLeftX, topLeftY, botRightX, botRightY), draw, size)
</code></pre><pre><code>  origImage.save(<span class="hljs-string">"Examples/Example-"</span>+str(size)+<span class="hljs-string">"x"</span>+str(size)+<span class="hljs-string">"-"</span>+str(invaders)+<span class="hljs-string">"-"</span>+str(imgSize)+<span class="hljs-string">".jpg"</span>)
</code></pre><pre><code><span class="hljs-keyword">if</span> __name__ == <span class="hljs-string">"__main__"</span>:  main(int(sys.argv[<span class="hljs-number">1</span>]), int(sys.argv[<span class="hljs-number">2</span>]), int(sys.argv[<span class="hljs-number">3</span>]))
</code></pre><p>This solution is a long way from perfect, but it shows that creating generative art doesn’t take a ton of code. I’ll try my best to explain the key pieces.</p>
<p>The <strong>main</strong> function starts by creating the initial image and determining the size of the sprites. The two <em>for</em> loops are responsible for defining a border for each sprite, basically dividing the dimensions of the image by the number of sprites requested. These values are used to determine the coordinates for each one.</p>
<p>Let’s ignore padding and take a look at the image below. Imagine that each of the four squares represents a sprite with a size of 1. The border that is being passed to the next function refers to the top left and bottom right coordinates. So the tuple for the top left sprite would be (0,0,1,1) whereas the tuple for the top right would be (1,0,2,1). These will be used as the dimensions and base coordinates for the squares of each sprite.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/dAjC0XQBCbDd1q4TiXlQjd1VZzQhlabZZW6d" alt="Image" width="800" height="803" loading="lazy">
<em>Example of determining sprite borders</em></p>
<p>The function <strong>create_invader</strong> determines the border for each square within the sprite. The same process for determining the border is applied here and represented below, only instead of the full image we’re using a pre-determined border to work inside. These final coordinates for each square will be used in the next function to actually draw the sprite.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/Q2qtvddE3B8kRqrl1ZokRJJ5s8jj8JYDgCg-" alt="Image" width="800" height="805" loading="lazy">
<em>Example of breaking down a 3x3 sprite</em></p>
<p>To determine the color, a simple array of three random RGB tuples and three blacks are used to simulate a 50% chance of being drawn. The lambda functions near the top of the code are responsible for generating the RGB values.</p>
<p>The real trick of this function is creating symmetry. Each square is paired with an element value. In the image below you can see the element values increment as they reach the center and then decrement. Squares with matching element values are drawn with the same color.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/FUyF8VhfcaOyLkqTGViXlORkoUQ9K5ILkrjJ" alt="Image" width="800" height="172" loading="lazy">
<em>Element values and symmetrical colors for a row in a 7x7 sprite</em></p>
<p>As <strong>create_square</strong> receives its parameters from <strong>create_invader</strong>, it uses a queue and the element values from before to ensure symmetry. The first occurrence of the values have their colors pushed onto the queue and the mirrored squares pop the colors off.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/79LIdlwEDW-fxT37Ef1iE5p9cdyGxTZ8gXnq" alt="Image" width="1000" height="1000" loading="lazy">
<em>The complete generation process</em></p>
<p>I realize how difficult it is to read through and understand someone else’s solution for a problem, and the roughness of the code certainly does not help with its complexity, but hopefully you’ve got a pretty good idea for how it works. Ultimately it would be incredible if you are able to scrap my code altogether and figure out an entirely different solution.</p>
<h3 id="heading-conclusion">Conclusion</h3>
<p>Generative art takes time to fully appreciate, but it’s worth it. I love being able to combine programming with a more traditional visual, and I have definitely learned a lot in every one of my projects.</p>
<p>Overall there may be more useful projects to pursue and generative art may not be something you need experience with, but it’s a ton of fun and you never know how it might separate you from the crowd.</p>
<p>Thank you for reading!</p>
 ]]>
                </content:encoded>
            </item>
        
    </channel>
</rss>
