<?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" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Reyrove on Medium]]></title>
        <description><![CDATA[Stories by Reyrove on Medium]]></description>
        <link>https://medium.com/@reyhanehdaneshdoost?source=rss-503c4251daaf------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*QYOqktx0FOMgWDgVvFioyQ.jpeg</url>
            <title>Stories by Reyrove on Medium</title>
            <link>https://medium.com/@reyhanehdaneshdoost?source=rss-503c4251daaf------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 14:10:47 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@reyhanehdaneshdoost/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Twist 1: A Parametric Explosion of Circles]]></title>
            <link>https://medium.com/@reyhanehdaneshdoost/twist-1-a-parametric-explosion-of-circles-0cba3e0ed9f2?source=rss-503c4251daaf------2</link>
            <guid isPermaLink="false">https://medium.com/p/0cba3e0ed9f2</guid>
            <category><![CDATA[circularart]]></category>
            <category><![CDATA[generative-art]]></category>
            <category><![CDATA[parametric-design]]></category>
            <category><![CDATA[interactive-art]]></category>
            <category><![CDATA[creative-coding]]></category>
            <dc:creator><![CDATA[Reyrove]]></dc:creator>
            <pubDate>Fri, 13 Mar 2026 11:26:00 GMT</pubDate>
            <atom:updated>2026-03-13T11:26:00.744Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/913/1*miY0X13Z4Vqs-T_RO8caJA.png" /><figcaption>Parametric spiral: each circle’s angle A determines its position, size, and glow intensity.</figcaption></figure><p><strong>Where simple geometry meets interactive control to create infinite variations.</strong></p><p><a href="https://www.fxhash.xyz/project/twist-1">https://www.fxhash.xyz/project/twist-1</a></p><p>Sometimes the most compelling generative art emerges from the simplest rules. <strong>Twist 1</strong> is a masterclass in this principle — a piece that takes a single geometric primitive (the circle) and a single transformation (a twist) and generates an infinite family of vibrant, energetic compositions.</p><p>But what makes <strong>Twist 1</strong> truly special is its interactivity. Unlike purely passive mints, this project invites collectors to become co-creators, using fxhash’s parametric interface to control the two core variables: the number of circles and the intensity of the twist. The result is a piece that is not just collected, but <em>composed</em> by its owner.</p><h3>The Concept: Circles in Motion</h3><p>At its heart, <strong>Twist 1</strong> is deceptively simple: a field of circles, each positioned and sized according to a trigonometric function, radiating from the center of a square canvas. The “twist” parameter controls how tightly wound the spiral becomes, transforming a gentle scatter into a vortex of overlapping forms.</p><p>The circles themselves are rendered with soft shadows that match their stroke color, creating a glowing, ethereal quality. Against a carefully chosen pastel background, these luminous circles seem to float and dance.</p><h3>Deconstructing the Algorithm</h3><h3>1. Interactive Parameters: You Control the Art</h3><p>The project uses $fx.params() to expose two critical variables directly to the collector at the time of minting:</p><pre>$fx.params([<br>  {<br>    id: &quot;number_id&quot;,<br>    name: &quot;number of Circles&quot;,<br>    type: &quot;number&quot;,<br>    options: { min: 100, max: 500, step: 10 },<br>  },<br>  {<br>    id: &quot;number_id2&quot;,<br>    name: &quot;Twist&quot;,<br>    type: &quot;number&quot;,<br>    options: { min: Math.PI, max: 5*Math.PI, step: Math.PI/10 },<br>  }<br>])</pre><p><strong>Number of Circles (100–500):</strong> This controls the density of the composition. Lower values create sparse, elegant arrangements where each circle breathes. Higher values create dense, energetic fields where circles overlap and interact.</p><p><strong>Twist (π to 5π):</strong> This is the heart of the piece. The twist parameter determines how much the angle varies across the field. A low twist (near π) creates gentle, open spirals. A high twist (near 5π) creates tightly wound, vortex-like compositions.</p><h3>2. The Color Palette: Curated and Random</h3><p>The background is drawn from a curated palette of 12 soft, welcoming colors:</p><pre>const backgroundColours = [&#39;#FFC0CB&#39;, &#39;#FFA07A&#39;, &#39;#FFFFE0&#39;, &#39;#E6E6FA&#39;, ...]<br>const backgroundNames = [&#39;Pink&#39;, &#39;LightSalmon&#39;, &#39;LightYellow&#39;, &#39;Lavender&#39;, ...]</pre><p>These pastel shades provide a gentle stage for the main performance.</p><p>The foreground (circle strokes) combines two sources:</p><ul><li>A fixed palette of 8 vibrant colors (foregroundColours)</li><li>A random RGB generator randomRgbColor() that produces colors in carefully constrained ranges</li></ul><p>This hybrid approach ensures variety while maintaining harmony.</p><h3>3. The Core Loop: Generating the Field</h3><p>The entire composition is generated in a single, elegant loop:</p><pre>for (let i = 0; i &lt; circlenum; i++) {<br>  A = $fx.rand() * (Math.PI/2, B)  // Note: This syntax is unusual<br>  cirColor = randomRgbColor()<br>  drawCircle(ctx, <br>    w/2 + w*(Math.sin(A))/3, <br>    h/2 + h*(Math.cos(A))/3, <br>    A * w / (6 * B),<br>    cirColor,<br>    $fx.rand() * (w/(30*B), w/(20*B)),<br>    B<br>  )<br>}</pre><p>Let’s break down what each circle’s parameters mean:</p><p><strong>Position:</strong> (w/2 + w*sin(A)/3, h/2 + h*cos(A)/3)</p><ul><li>The center of the canvas is the origin point</li><li>Each circle is offset by an amount proportional to sin(A) and cos(A)</li><li>The /3 factor keeps the circles within a reasonable radius from the center</li></ul><p><strong>Size:</strong> A * w / (6 * B)</p><ul><li>The radius is proportional to the angle A</li><li>Larger angles (further from center) generally produce larger circles</li><li>The twist parameter B appears in the denominator, meaning higher twist values produce smaller circles overall</li></ul><p><strong>Stroke Width:</strong> Random between w/(30*B) and w/(20*B)</p><ul><li>Thicker strokes for larger circles? Not necessarily — this creates variation</li><li>Again, twist B influences the range</li></ul><p><strong>Shadow Blur:</strong> Set to B (the twist value)</p><ul><li>This creates a beautiful relationship: more twist means more glow</li><li>The shadow color matches the stroke, creating a luminous halo</li></ul><h3>4. The Circle Drawing Function</h3><pre>function drawCircle(ctx, x, y, radius, color, linewidth, sblur) {<br>  ctx.lineCap = &#39;ROUND&#39;<br>  ctx.lineWidth = linewidth <br>  ctx.shadowBlur = sblur<br>  ctx.shadowColor = color<br>  ctx.arc(x, y, radius, 0, Math.PI * 2)<br>  ctx.strokeStyle = color<br>  ctx.stroke()<br>}</pre><p>The use of lineCap = &#39;ROUND&#39; ensures the ends of the (nonexistent) lines are rounded—a subtle touch that affects how dashes would appear if used, but here it&#39;s just good practice.</p><p>The crucial element is the shadow: shadowColor matches the stroke, and shadowBlur is set to the twist value. This creates the signature glowing quality of the piece.</p><h3>Visual Analysis: The Parameter Space</h3><p>Because the collector controls the two key parameters, the visual range is vast:</p><p><strong>Low Circles (100) + Low Twist (π):</strong> Sparse, gentle arrangement — like scattered petals or distant stars.</p><p><strong>Low Circles (100) + High Twist (5π):</strong> Sparse but tightly wound — a few bold circles forming a tight spiral, glowing intensely.</p><p><strong>High Circles (500) + Low Twist (π):</strong> Dense field of overlapping circles, creating moiré patterns and complex interactions. The gentle twist means the field feels organic, like a cloud of bubbles.</p><p><strong>High Circles (500) + High Twist (5π):</strong> Maximum intensity — hundreds of circles tightly wound into a vortex, their glows overlapping into a luminous mass.</p><h3>The Color Dimension</h3><p>With 12 possible backgrounds and an effectively infinite range of foreground colors (the random RGB generator), the color combinations are vast. Some pieces will be monochromatic and serene; others will be rainbow explosions.</p><h3>Technical Deep Dive: The Mathematics of the Twist</h3><p>The angle A is the key to the composition. It&#39;s generated randomly but scaled by the twist parameter B:</p><pre>A = $fx.rand() * (Math.PI/2, B)  // Note: This appears to be a syntax quirk</pre><p>Based on context, this likely means A is a random value between Math.PI/2 and B. This range ensures that A is never too small, guaranteeing that circles have some minimum size and distance from center.</p><p>The relationship between A, position, and size creates an emergent spiral: circles with similar A values tend to cluster at similar distances and sizes, creating radial bands or arms.</p><h3>The fxhash Integration: Seamless and Professional</h3><p>The code includes all the standard boilerplate for a professional fxhash project:</p><ul><li>Responsive canvas sizing with 1:1 aspect ratio</li><li>Preview capture with $fx.preview()</li><li>Keyboard shortcut (‘s’) to save the image</li><li>Force download functionality for marketplace integration</li><li>Feature exposure for human-readable traits</li></ul><h3>Conclusion: Simple Rules, Infinite Complexity</h3><p><strong>Twist 1</strong> is a testament to the power of parametric design. By giving collectors control over just two variables — number of circles and twist intensity — it creates a vast space of possibilities. Yet because the underlying algorithm is consistent, all pieces share a family resemblance. You can look at any <strong>Twist 1</strong> and recognize it as part of the series, even as you marvel at its unique character.</p><p>The piece also demonstrates a deep truth about generative art: the most interesting systems are often the simplest. A single loop, a trigonometric function, and a glowing circle — these humble ingredients, combined with collector input, yield infinite beauty.</p><p><strong>Create your own Twist:</strong> <a href="https://www.fxhash.xyz/project/twist-1">Twist 1 on fxhash</a><br><strong>Explore the code:</strong> <a href="https://github.com/reyrove/Generative-Art-on-fxhash/tree/master/Twist1">GitHub Repository</a></p><p><em>Twist it. See what emerges.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0cba3e0ed9f2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Syntax of Taste: A Generative Grid of Culinary Heritage]]></title>
            <link>https://medium.com/@reyhanehdaneshdoost/the-syntax-of-taste-a-generative-grid-of-culinary-heritage-7bb51c4ba838?source=rss-503c4251daaf------2</link>
            <guid isPermaLink="false">https://medium.com/p/7bb51c4ba838</guid>
            <category><![CDATA[generative-art]]></category>
            <category><![CDATA[creative-coding]]></category>
            <category><![CDATA[digital-collage]]></category>
            <category><![CDATA[food-photography]]></category>
            <category><![CDATA[algorithmic-composition]]></category>
            <dc:creator><![CDATA[Reyrove]]></dc:creator>
            <pubDate>Thu, 12 Mar 2026 16:11:00 GMT</pubDate>
            <atom:updated>2026-03-12T16:11:00.626Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/731/1*gCwZz_VTdfYEykfNmLnH1g.png" /><figcaption>Generative tasting menu: 4 images × 39 possibilities × deterministic seeding.</figcaption></figure><p><strong>Where 39 visual ingredients combine to create an infinite tasting menu.</strong></p><p><a href="https://www.fxhash.xyz/project/the-syntax-of-taste">https://www.fxhash.xyz/project/the-syntax-of-taste</a></p><p>What is the visual language of food? How do we compose an image that speaks of flavor, tradition, and craft? <strong>The Syntax of Taste</strong> is a generative art project that explores these questions through a simple yet profound mechanism: a 2×2 grid, 39 source images, and the infinite combinatorial power of randomness.</p><p>The result is an endless series of unique culinary compositions — a visual tasting menu where each piece is a new arrangement of ingredients, textures, and colors drawn from a carefully curated library of food photography.</p><h3>The Concept: Combinatorial Gastronomy</h3><p>The project’s title is a deliberate echo of Jean Anthelme Brillat-Savarin’s seminal work, <em>The Physiology of Taste</em>, and more directly, the contemporary food writing that explores the “grammar” of cooking — how ingredients combine according to rules and affinities.</p><p>Here, the “syntax” is visual. The rules are simple:</p><ul><li>A 2×2 grid divides the square canvas into four equal quadrants</li><li>Each quadrant is filled with one of 39 source images</li><li>The selection for each quadrant is independent and random</li></ul><p>This creates 3⁹⁴ possible combinations — over <strong>2.2 million unique pieces</strong> — before considering that each image can appear in any of the four positions. The parametric space is vast, yet every composition shares the underlying structure of the grid.</p><h3>Deconstructing the Algorithm</h3><h3>1. The Canvas: A Perfect Square</h3><p>As with many of the artist’s projects, the canvas is a perfect square sized to the smallest viewport dimension (innerWidth or innerHeight). This ensures the piece is always centered and properly framed, regardless of the viewing device.</p><h3>2. The Image Library: 39 Visual Ingredients</h3><pre>for (let i = 0; i &lt; numImages; i++) {<br>  img[i] = loadImage(`images/image${i + 1}-min.jpg`);<br>}</pre><p>The number 39 is not arbitrary. It’s large enough to provide immense variety, yet small enough that each image feels like a deliberate choice — a curated ingredient rather than a random snapshot. The -min.jpg suffix suggests optimized web versions, ensuring fast loading without sacrificing visual quality.</p><p>While we cannot see the specific images from the code alone, we can imagine their variety: perhaps close-ups of spices, drizzles of sauce, textures of bread, vibrant vegetables, or artfully plated dishes. Each is a “word” in the visual language of food.</p><h3>3. The Grid: Syntax as Structure</h3><pre>for (let y = 0; y &lt; gridRows; y++) {<br>  for (let x = 0; x &lt; gridCols; x++) {<br>    const idx = Math.floor($fx.rand() * numImages);<br>    image(img[idx], x * (canvas.w / gridCols), y * (canvas.h / gridRows), ...);<br>  }<br>}</pre><p>The nested loops iterate through the four quadrants (top-left, top-right, bottom-left, bottom-right). For each, a random index selects one of the 39 images, which is then scaled to fill its quadrant perfectly.</p><p>This creates a visual syntax where the same image can appear in multiple quadrants, or all four can be unique. The grid imposes order, while the randomness creates surprise.</p><h3>4. The Randomness: Deterministic Uniqueness</h3><pre>const idx = Math.floor($fx.rand() * numImages);</pre><p>The use of $fx.rand()—fxhash&#39;s seeded random function—ensures that each token generates a specific, reproducible composition. Your piece isn&#39;t just randomly generated once; its specific arrangement is permanently encoded in your token&#39;s hash.</p><h3>5. The Preview: Capturing the Moment</h3><pre>$fx.preview();</pre><p>This single line signals to the fxhash platform that the artwork is ready to be captured as the static thumbnail and preview image. It freezes the unique composition in time.</p><h3>Visual Analysis: Emergent Harmonies</h3><p>Though the generation mechanism is simple, the visual results can be surprisingly complex and harmonious. Consider the possibilities:</p><ul><li><strong>Color Harmony:</strong> If the four randomly selected images share a color palette (warms, cools, monochromes), the composition feels cohesive and intentional.</li><li><strong>Texture Contrast:</strong> A smooth, creamy image next to a rough, textured one creates visual tension.</li><li><strong>Narrative Juxtaposition:</strong> A raw ingredient in one quadrant and a finished dish in another suggests transformation and process.</li><li><strong>Symmetry and Repetition:</strong> When the same image appears in diagonal quadrants, the composition gains a formal, almost heraldic quality.</li><li><strong>Chaotic Collage:</strong> When four wildly different images combine, the result is a maximalist celebration of diversity.</li></ul><h3>Technical Deep Dive: Elegant Simplicity</h3><p>The code is a masterclass in minimalism. In just over 30 lines of substantive code, it achieves:</p><ul><li><strong>Responsive sizing</strong> for all devices</li><li><strong>Efficient image loading</strong> via preload()</li><li><strong>Grid-based composition</strong> with nested loops</li><li><strong>Seeded randomness</strong> for deterministic uniqueness</li><li><strong>Platform integration</strong> with $fx.preview()</li></ul><p>The decision to use noLoop() ensures the image is drawn once and never redrawn, perfect for a static piece. The pixelDensity(1) call ensures consistent rendering across devices.</p><h3>Philosophical Context: The Grammar of Vision</h3><p>The title <strong>The Syntax of Taste</strong> invites us to consider whether there is a visual grammar to food — a set of rules, conscious or unconscious, that makes certain combinations pleasing. When we arrange food on a plate, we are composing: color against color, texture against texture, shape against shape.</p><p>By randomizing these arrangements, the project reveals both the robustness and the limits of that grammar. Some random combinations will be stunningly beautiful. Others will be jarring or dissonant. But all are valid expressions of the underlying “syntax.”</p><h3>The fxhash Integration: Seamless and Professional</h3><p>The code includes all the necessary boilerplate for a professional fxhash project:</p><ul><li>Canvas sizing and centering</li><li>Device pixel ratio handling</li><li>Preview capture</li><li>Clean, efficient image loading</li></ul><h3>Conclusion: An Infinite Tasting Menu</h3><p><strong>The Syntax of Taste</strong> transforms a simple grid and a library of food images into an endless exploration of visual gastronomy. Each mint is a new dish — a unique combination of visual ingredients that will never be repeated.</p><p>With over 2 million possible combinations, the collection could continue growing for years without exhausting its variety. Yet each piece, no matter how random, shares the underlying structure of the grid — a syntax that binds the entire series into a cohesive whole.</p><p><strong>Taste the possibilities:</strong> <a href="https://www.fxhash.xyz/project/the-syntax-of-taste">The Syntax of Taste on fxhash</a><br><strong>Examine the recipe:</strong> <a href="https://github.com/reyrove/Generative-Art-on-fxhash/tree/master/The%2520Syntax%2520of%2520Taste">GitHub Repository</a></p><p><em>Every composition is a recipe. Every token, a unique dish.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7bb51c4ba838" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Triangulum: A Celestial Tapestry of Triangles]]></title>
            <link>https://medium.com/@reyhanehdaneshdoost/triangulum-a-celestial-tapestry-of-triangles-38164f1a9eb8?source=rss-503c4251daaf------2</link>
            <guid isPermaLink="false">https://medium.com/p/38164f1a9eb8</guid>
            <category><![CDATA[generative-art]]></category>
            <category><![CDATA[cosmic-art]]></category>
            <category><![CDATA[creative-coding]]></category>
            <category><![CDATA[geometric-abstraction]]></category>
            <category><![CDATA[triangle]]></category>
            <dc:creator><![CDATA[Reyrove]]></dc:creator>
            <pubDate>Wed, 11 Mar 2026 18:16:01 GMT</pubDate>
            <atom:updated>2026-03-11T18:16:01.012Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*blrBMLUSg5DFN8fpkvyXFg.png" /><figcaption>Geometric cosmos: all primitives rendered as triangles with radial gradients and variable transparency.</figcaption></figure><p><strong>Where stars, planets, and frost converge in a geometric cosmos.</strong></p><p><a href="https://www.fxhash.xyz/project/triangulum">https://www.fxhash.xyz/project/triangulum</a></p><p>What if the universe were made of triangles? What if stars shimmered as three-pointed glyphs, planets glowed as triangular orbs, and frost crystallized into perfect triangular flakes? <strong>Triangulum</strong> is a generative exploration of this question — a cosmic tapestry woven entirely from the most fundamental polygon.</p><p>The piece layers multiple systems — a grid of celestial bodies, orbiting arcs of light, and a dusting of frost particles — all rendered exclusively through triangles. The result is a rich, textured composition that feels both ancient and futuristic, both orderly and magical.</p><h3>The Concept: A Universe in Triangles</h3><p>The triangle is the simplest closed polygon, the building block of all complex geometry. In <strong>Triangulum</strong>, it becomes the universal primitive for an entire cosmological system:</p><ul><li><strong>Planets</strong> are glowing triangular masses with radial gradients</li><li><strong>Stars</strong> (called “magical triangles”) are smaller, luminous glyphs scattered across the grid</li><li><strong>Arcs of light</strong> are constructed from overlapping, gradient-colored triangles</li><li><strong>Frost particles</strong> are tiny white triangles, like distant stars or ice crystals</li></ul><p>All these elements are arranged on a 5×5 grid, creating a structured yet organic composition — a cosmic quilt stitched from triangles.</p><h3>Deconstructing the Algorithm</h3><h3>1. The Canvas: A Perfect Square</h3><p>As with the artist’s other projects, the canvas is a perfect square sized to the smallest viewport dimension (innerWidth or innerHeight), ensuring the composition is always centered and properly framed.</p><h3>2. The Grid: 5×5 Celestial Coordinates</h3><p>The entire composition is built on a 5×5 grid:</p><pre>const gridRows = 5; <br>const gridCols = 5;<br>const gridSpacingX = canvas.w / gridCols; <br>const gridSpacingY = canvas.h / gridRows;</pre><p>This creates 25 cells, each serving as a coordinate system for multiple layers of elements. The grid provides underlying structure, but the elements within each cell vary in size, color, and opacity, breaking any sense of mechanical repetition.</p><h3>3. The Color Palettes: Harmonious Randomness</h3><p>Three distinct color palettes are generated in setup(), each with 5 colors:</p><ul><li><strong>arcColors:</strong> For the sweeping arcs of light. These colors have high red and blue components ($fx.rand() * 155 + $fx.rand() * 100 for red, etc.), creating warm, vibrant hues.</li><li><strong>starColors:</strong> For the &quot;magical triangles.&quot; These lean toward higher green and blue values, creating cooler, ethereal tones.</li><li><strong>planetColors:</strong> For the planets themselves. These include an alpha channel ($fx.rand() * 150), allowing for transparency and glow effects.</li></ul><p>Colors are generated with careful constraints to ensure they remain harmonious — never pure white or black, always with a rich, jewel-like quality.</p><h3>4. The Three Element Layers</h3><p><strong>Frost Particles:</strong></p><pre>frostParticles.push({<br>  x: j * gridSpacingX + gridSpacingX / 2,<br>  y: i * gridSpacingY + gridSpacingY / 2,<br>  size: $fx.rand() * 3 * e / 400 + e / 200,<br>  alpha: $fx.rand() * 100 + 50<br>});</pre><p>These are tiny white triangles scattered across the grid. Their size and opacity vary, creating a sense of depth and sparkle — like frost on a window or distant stars in a night sky.</p><p><strong>Planets:</strong></p><pre>planets.push({<br>  x: j * gridSpacingX + gridSpacingX / 2,<br>  y: i * gridSpacingY + gridSpacingY / 2,<br>  size: $fx.rand() * e / 8 + e / 16,<br>  color: planetColors[(i + j) % planetColors.length]<br>});</pre><p>Each planet is a glowing triangular form with a radial gradient from white at the center to its designated color at the edges. The drawGlow() function adds multiple layers of increasingly transparent triangles around each planet, creating a soft, atmospheric halo.</p><p><strong>Magical Triangles:</strong></p><pre>magicalTriangles.push({<br>  x: j * gridSpacingX + gridSpacingX / 2,<br>  y: i * gridSpacingY + gridSpacingY / 2,<br>  size: $fx.rand() * e / 20 + e / 40,<br>  color: starColors[(i + j) % starColors.length]<br>});</pre><p>These are smaller than planets, more numerous in feel, and rendered with similar radial gradients. They function as the “stars” of the composition — points of light that punctuate the grid.</p><h3>5. The Arcs: Sweeping Geometry</h3><p>The most dynamic element is the series of 17 arcs, each composed of 32 overlapping triangles:</p><pre>for (let i = 0; i &lt; 17; i++) {<br>  let diameter = 16 * e / 100 + i * (canvas.w / 20); <br>  let startAngle = (i * 72) % 360; <br>  let endAngle = startAngle + 50;<br>  drawMagicalArcAsTriangle(diameter, startAngle, endAngle, i);<br>}</pre><p>These arcs radiate from the center, their size increasing with each iteration. The start angles are spaced by 72° (360/5), creating a pentagonal symmetry. Each arc is built from triangles that lerp between two colors from the arcColors palette, creating smooth gradients.</p><p>The triangles in each arc vary in stroke weight and alpha, with the outermost triangles becoming more transparent — as if the arcs are fading into the void.</p><h3>6. The Background: Deep and Mysterious</h3><pre>background($fx.rand() * 16, $fx.rand() * 24, $fx.rand() * 32, $fx.rand() * 30);</pre><p>The background is not a solid color but a translucent, randomized dark tone — deep blues, purples, or blacks with a hint of transparency. This allows the overlapping elements to blend subtly, creating depth and atmosphere.</p><h3>7. The Transformation: Centering the Universe</h3><p>All elements are drawn with a translate(canvas.w / 2, canvas.h / 2) at the beginning of draw(), then positioned relative to this center. This means coordinates like planet.x - canvas.w / 2 effectively cancel out the translation, placing objects at their grid positions relative to the center.</p><h3>Visual Analysis: Layers of Cosmic Geometry</h3><p><strong>Triangulum</strong> creates a rich visual experience through its multiple layers:</p><p><strong>Background Layer:</strong> The deep, translucent dark sets the cosmic stage.</p><p><strong>Planet Layer:</strong> The 25 glowing triangles provide the composition’s anchors. Their varying sizes and colors create rhythm and focal points. The glow effect gives them a soft, ethereal quality.</p><p><strong>Arc Layer:</strong> The 17 sweeping arcs create movement and connection, weaving between the planets. Their gradient colors and varying transparency suggest orbits, energy fields, or cosmic rays.</p><p><strong>Star Layer:</strong> The “magical triangles” add sparkle and detail, filling the spaces between larger elements.</p><p><strong>Frost Layer:</strong> The tiny white triangles are the finest detail, suggesting distant stars, ice crystals, or digital noise — adding texture and depth.</p><h3>Technical Deep Dive: Triangles Everywhere</h3><p>The commitment to triangles is absolute. Every visual element — planets, stars, arcs, frost — is constructed from triangles:</p><ul><li><strong>Planets:</strong> An outer glow made of concentric triangles, plus a central triangle with radial gradient</li><li><strong>Arcs:</strong> Each arc is a series of overlapping triangles, their vertices calculated using trigonometry</li><li><strong>Frost particles:</strong> Simple white triangles of varying size and opacity</li><li><strong>Magical triangles:</strong> Small triangles with radial gradients</li></ul><p>This unified geometric language gives the piece its distinctive visual identity.</p><h3>The fxhash Integration: Professional Polish</h3><p>The code includes all necessary boilerplate for a professional fxhash project:</p><ul><li>Responsive canvas sizing</li><li>Preview capture with $fx.preview()</li><li>Keyboard shortcut (‘s’) to save the image</li><li>Pixel density management</li></ul><h3>Conclusion: A Geometric Cosmos</h3><p><strong>Triangulum</strong> invites us to imagine a universe built from a single, sacred shape. By restricting itself to triangles, the project achieves a remarkable visual coherence while exploring vast parametric variety — different color palettes, element sizes, and arrangements.</p><p>The title itself evokes the Triangulum constellation, one of the 88 modern constellations, and the Triangulum Galaxy, a nearby spiral galaxy. It’s a fitting name for a piece that creates its own tiny galaxy of triangles on your screen.</p><p><strong>Explore this geometric universe:</strong> <a href="https://www.fxhash.xyz/project/triangulum">Triangulum on fxhash</a><br><strong>Examine the cosmic code:</strong> <a href="https://github.com/reyrove/Generative-Art-on-fxhash/tree/master/Triangulum">GitHub Repository</a></p><p><em>In the beginning, there was the triangle. And it was good.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=38164f1a9eb8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Spirograph: Harmonic Motion, Animated]]></title>
            <link>https://medium.com/@reyhanehdaneshdoost/spirograph-harmonic-motion-animated-a093e335edf7?source=rss-503c4251daaf------2</link>
            <guid isPermaLink="false">https://medium.com/p/a093e335edf7</guid>
            <category><![CDATA[harmonicmotion]]></category>
            <category><![CDATA[creative-coding]]></category>
            <category><![CDATA[interactive-art]]></category>
            <category><![CDATA[spirograph]]></category>
            <category><![CDATA[generative-art]]></category>
            <dc:creator><![CDATA[Reyrove]]></dc:creator>
            <pubDate>Tue, 10 Mar 2026 12:06:00 GMT</pubDate>
            <atom:updated>2026-03-10T12:06:00.886Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xzcc7vI3aBCR2FUZvFnV8A.jpeg" /><figcaption>Generative output: double-pendulum harmonic motion with user-defined frequency ratio.</figcaption></figure><p><strong>Where classic drawing toys meet parametric equations and real-time animation.</strong></p><p><a href="https://www.fxhash.xyz/project/spirograph-4">https://www.fxhash.xyz/project/spirograph-4</a></p><p>Remember the Spirograph? The classic drawing toy that used interlocking gears to produce intricate, hypnotic curves? <strong>Spirograph</strong> (subtitled “Harmonic Motion, Animated”) is a digital homage to that analog wonder — a generative artwork that builds a complex path in real-time, revealing the underlying mechanics as it draws.</p><p>But this is more than a simple simulation. It’s a <strong>dual-phase performance</strong>: first, a preview trace builds the complete Spirograph path in an instant. Then, the animation begins, showing the actual pendulum motion that creates the curve, drawing it point by point while a gradient trail follows behind. It’s part mathematics lesson, part kinetic sculpture, and entirely mesmerizing.</p><h3>The Concept: Revealing the Mechanism</h3><p>Most Spirograph-style generators simply output the final pattern. This piece does something different. It shows you <strong>how the pattern is made</strong>.</p><p>The core mechanism is a double pendulum — two arms of fixed length, connected end-to-end. The first arm rotates around a fixed center point. The second arm rotates around the end of the first. The endpoint of the second arm traces a path that can be simple or wildly complex, depending on the ratio of the two arms’ rotation speeds.</p><p>By first showing the complete path as a “ghost” trace, then animating the actual pendulum that creates it, the piece invites viewers to understand the relationship between the mechanism and its beautiful output.</p><h3>Deconstructing the Algorithm</h3><h3>1. Interactive Parameters: You Control the Dance</h3><p>Unlike purely random mints, this project uses $fx.params() to give collectors direct control over the two most important variables:</p><pre>const definitions = [<br>  {<br>    id: &quot;number_id1&quot;,<br>    name: &quot;first pendulum Frequency&quot;,<br>    type: &quot;number&quot;,<br>    options: { min: 0.1, max: 10, step: 0.1 },<br>  },<br>  {<br>    id: &quot;number_id2&quot;,<br>    name: &quot;second pendulum Frequency&quot;,<br>    type: &quot;number&quot;,<br>    options: { min: 0.1, max: 10, step: 0.1 },<br>  }<br>];</pre><p>When minting, you can choose these frequencies. The ratio between them determines the complexity and symmetry of the resulting Spirograph pattern. Rational ratios (like 2:1 or 3:2) create closed, repeating patterns. Irrational ratios create patterns that never exactly repeat, slowly precessing over time.</p><p>The code even ensures they aren’t identical:</p><pre>if (v1 == v2) { v2 += 0.1 }</pre><h3>2. The Color Palette: Curated and Rich</h3><p>The project draws from three carefully curated color collections:</p><ul><li><strong>Background Colors:</strong> 41 deep, moody shades from Charcoal to Midnight Purple</li><li><strong>Foreground Colors:</strong> 103 vibrant hues from Alien Gray to Viola</li></ul><p>Two background colors are randomly selected for the diagonal gradient, and one foreground color is chosen for the line. This ensures every mint has a unique, harmonious color scheme.</p><h3>3. The Arm Lengths: Randomized Proportions</h3><p>The lengths of the two pendulum arms are not fixed. They are generated by a clever function generateRandomSumVector(m, n) that creates two positive integers summing to a random total n (between 2 and 20). These are then scaled by the canvas size:</p><pre>const linklenght = multiplyVector(generateRandomSumVector(NumberOflinks, NumberOfDevition), e / ((NumberOfDevition + 1) * 2));</pre><p>This creates arm length ratios that vary dramatically between mints — some with nearly equal arms, others with one arm much longer than the other.</p><h3>4. The Two-Phase Animation</h3><p>The draw() function contains a beautiful dual-phase logic:</p><p><strong>Phase 1 (First Frame):</strong> When angle is very small, the code quickly traces the entire path by iterating through t from 0 to 10 in tiny increments. This builds the complete Spirograph curve almost instantly.</p><p><strong>Phase 2 (Subsequent Frames):</strong> The animation begins. The pendulum arms are drawn as black lines, with small ellipses marking the pivot points. The endpoint draws a small dot in the foreground color. Behind it, a gradient trail follows, smoothly transitioning from the first background color to the foreground color.</p><p>At a specific moment (angle === 6/1000), the path resets, creating a fresh start for the animation phase.</p><h3>5. The Visual Elements</h3><p>The final frame contains multiple layers:</p><ul><li><strong>Background:</strong> A rich diagonal gradient of tiny squares</li><li><strong>Ghost Trail:</strong> The complete path rendered as a gradient stroke from background to foreground</li><li><strong>Mechanism:</strong> Black lines showing the two pendulum arms</li><li><strong>Pivots:</strong> Small ellipses marking the fixed center and the first joint</li><li><strong>Endpoint:</strong> A small colored dot showing the current position</li></ul><p>All elements are carefully scaled to the canvas size, ensuring they remain legible and elegant on any display.</p><h3>6. The Shadow Effect</h3><p>A subtle shadow (drawingContext.shadowBlur = e/50) is applied to the main path, giving it a soft, glowing quality that separates it visually from the mechanism lines and adds depth to the composition.</p><h3>7. GIF Export</h3><p>The piece includes a keyboard shortcut: pressing ‘s’ or ‘S’ saves a 30-frame GIF, allowing collectors to capture the animation of their unique Spirograph.</p><h3>Visual Analysis: Infinite Variety</h3><p>Because the parameters are controllable by the minter, the visual range is vast:</p><ul><li><strong>Frequency Ratio:</strong> A 2:1 ratio creates a classic figure-eight pattern. A 7:3 ratio creates complex, daisy-like flowers. Irrational ratios like π:2 create patterns that slowly drift, never quite closing.</li><li><strong>Arm Lengths:</strong> Equal arms create symmetric patterns. Disparate arms create lopsided, teardrop shapes.</li><li><strong>Color Scheme:</strong> The two background colors and one foreground color set the entire mood — from cool, oceanic blues to warm, earthy browns to electric, vibrant contrasts.</li></ul><h3>Technical Deep Dive: The Mathematics</h3><p>The endpoint position is given by:</p><p>x = L₁·sin(ω₁·t + φ₁) + L₂·sin(ω₂·t + φ₂)<br>y = L₁·cos(ω₁·t + φ₁) + L₂·cos(ω₂·t + φ₂)</p><p>This is a form of <strong>epicyclic motion</strong> — the same mathematics that describes planetary orbits in a geocentric model. When the frequency ratio is rational, the path is periodic and closed. When irrational, the path is quasiperiodic and will eventually fill a region of the plane.</p><p>The initialRatio (random phase offset for each arm) ensures that even with identical frequencies and lengths, two different mints will start at different points in their cycle.</p><h3>The fxhash Integration: Professional Polish</h3><p>The code includes sophisticated handling for the fxhash platform:</p><ul><li>Mobile detection (isMob) to adjust pixel density for performance</li><li>Human-readable features exposed via $fx.features()</li><li>$fx.preview() called at the optimal moment</li><li>Responsive scaling for all devices</li></ul><h3>Conclusion: Where Toy Meets Theory</h3><p><strong>Spirograph</strong> transforms a childhood memory into a sophisticated meditation on harmonic motion. By revealing the mechanism behind the beauty, it educates as it delights. And by giving collectors control over the core frequencies, it invites experimentation — what happens at 1.3 and 4.7? What about 0.5 and 8.2?</p><p>Each mint is an invitation to explore this infinite parameter space, and the animated reveal makes every exploration a performance.</p><p><strong>Create your own Spirograph:</strong> <a href="https://www.fxhash.xyz/project/spirograph-4">Spirograph on fxhash</a><br><strong>Explore the mechanism:</strong> <a href="https://github.com/reyrove/Generative-Art-on-fxhash/tree/master/Spirograph">GitHub Repository</a></p><p><em>The dance of two arms, forever tracing beauty.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a093e335edf7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Spectrum Dance: A Symphony of Linked Oscillators]]></title>
            <link>https://medium.com/@reyhanehdaneshdoost/spectrum-dance-a-symphony-of-linked-oscillators-47998006c7db?source=rss-503c4251daaf------2</link>
            <guid isPermaLink="false">https://medium.com/p/47998006c7db</guid>
            <category><![CDATA[digital-art]]></category>
            <category><![CDATA[nft-marketplace]]></category>
            <category><![CDATA[kinetic-art]]></category>
            <category><![CDATA[generative-art]]></category>
            <category><![CDATA[nft]]></category>
            <dc:creator><![CDATA[Reyrove]]></dc:creator>
            <pubDate>Mon, 09 Mar 2026 11:56:00 GMT</pubDate>
            <atom:updated>2026-03-09T11:56:00.740Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/907/1*oDAQR7JOqBbY_YOSa2W3DA.png" /><figcaption>Diagonal gradient background (104-color palette) with drifting RGB line.</figcaption></figure><p><strong>Where color, motion, and mathematics converge in an endless kinetic ballet.</strong></p><p><a href="https://www.fxhash.xyz/project/spectrum-dance">https://www.fxhash.xyz/project/spectrum-dance</a></p><p>Imagine a chain of pendulums, each swinging at its own unique speed, but linked together end-to-end. Now imagine tracing the path of that chain’s endpoint as it dances across a canvas, its colors shifting and evolving with every frame. This is the essence of <strong>Spectrum Dance</strong> — a generative artwork that transforms simple harmonic motion into a mesmerizing, animated spectacle.</p><p>Unlike static generative pieces, <strong>Spectrum Dance</strong> is alive. It runs continuously, its serpentine form slithering and morphing in real-time, its palette drifting through the spectrum. Each mint is not a single image, but a unique performance — a dance choreographed by the deterministic randomness of your token’s hash.</p><h3>The Concept: Harmonic Chains</h3><p>At its core, the piece implements a system of linked harmonic oscillators. Imagine N rigid links (the NumberOflinks), each with a fixed length. The angle of each link relative to the previous one is not constant, but varies sinusoidally over time. Each link has its own independent frequency for its horizontal and vertical components, creating a complex, non-repeating path.</p><p>The result is a form of <strong>compound harmonic motion</strong> — the same physics that describes everything from vibrating molecules to the orbits of planets, here rendered as pure, colorful line art.</p><h3>Deconstructing the Algorithm</h3><h3>1. The Canvas: A Square Stage</h3><p>The canvas is always a perfect square, sized to the smallest viewport dimension, ensuring the dance is centered and consistent on any device.</p><h3>2. The Background: Diagonal Gradients</h3><p>The piece begins with a striking diagonal gradient, created by the custom function diagonalGradientRect(). Two background colors are randomly selected from a massive, curated list of <strong>104</strong> colors, ranging from deep charcoals and night blues to vibrant neons and soft pastels.</p><pre>const Backgroundcolors = [&#39;#34282C&#39;, &#39;#3B3131&#39;, &#39;#0C090A&#39;, ...]; // 104 colors!<br>const BackgroundcolorsName = [&#39;Charcoal&#39;, &#39;Oil&#39;, &#39;Night&#39;, ...];</pre><p>The gradient runs from one corner to the opposite, creating a rich, atmospheric stage for the dance to come. This is not a simple linear gradient, but a painstakingly rendered diagonal blend of tiny squares, giving it a subtle, textured quality.</p><h3>3. The Dancer: A Chain of Oscillators</h3><p>The core of the piece is the chain of links, stored in the Link array. Each link has several defining characteristics, all randomized per mint:</p><ul><li><strong>Lenght:</strong> The physical length of each link, scaled to the canvas size and the number of links. Shorter links create tighter, more intricate dances; longer links create sweeping, graceful arcs.</li><li><strong>SpeedX and </strong><strong>SpeedY:</strong> These are the angular frequencies for the horizontal and vertical components of each link&#39;s oscillation. They are random integers between 10 and 50, with a randomly assigned positive or negative sign. This sign determines the direction of rotation, adding another layer of complexity.</li><li><strong>initialRatio:</strong> A random phase offset (0 to 2π) for each link, ensuring they don&#39;t all start in sync.</li></ul><p>The position of each link is calculated recursively:</p><ul><li>The first link’s position is relative to the center (0,0).</li><li>Every subsequent link’s position is relative to the end of the previous link.</li></ul><p>This creates a continuous, flowing chain — a “kinetic skeleton” whose endpoint traces an infinitely complex path.</p><h3>4. The Evolution: Time and Angle</h3><p>A global variable angle increments by a tiny amount (angleVel = 1/20000) each frame. This angle drives all the sine waves:</p><pre>Link[i].x = Link[i-1].x + Link[i].Lenght * sin(Link[i].SpeedX * 2 * PI * angle + Link[i].initialRatio);<br>Link[i].y = Link[i-1].y + Link[i].Lenght * sin(Link[i].SpeedY * 2 * PI * angle + Link[i].initialRatio);</pre><p>Because each link has two different frequencies (SpeedX and SpeedY), the motion is rarely periodic. The chain&#39;s shape is constantly evolving, never exactly repeating—a true &quot;dance&quot; in the mathematical sense.</p><h3>5. The Color: A Gentle Drift</h3><p>The color of the line (r, g, b) starts at random values and then drifts slowly over time:</p><pre>r += getRandomInt(-rgbRange, rgbRange);<br>r = constrain(r, 0, 255);</pre><p>The rgbRange is a random integer between 1 and 10, determining how quickly the color changes. A small range creates subtle, shimmering color shifts. A larger range creates bold, dramatic transformations. The constrain() function keeps the values within valid RGB bounds, ensuring the color always remains vibrant.</p><h3>6. The Rendering: A Single, Continuous Line</h3><p>The chain is rendered as a single, continuous curve using curveVertex(), which creates smooth, interpolated paths between the link points. The stroke weight is delicately scaled to the canvas size (e/1000), ensuring the line is visible but never overwhelming.</p><p>Crucially, the shadows are turned off (drawingContext.shadowBlur = 0) to keep the line crisp and pure against the gradient background.</p><h3>Visual Analysis: An Infinite Variety</h3><p>Because the parameters are all randomized per token, the visual character of <strong>Spectrum Dance</strong> varies enormously:</p><ul><li><strong>Number of Links (2–8):</strong> A 2-link dance is a simple, Lissajous-like figure. An 8-link dance is a complex, serpentine tangle that fills the canvas.</li><li><strong>Background Gradient:</strong> The two background colors set the entire mood. A deep blue-to-black gradient feels oceanic and mysterious. A bright yellow-to-orange gradient feels warm and energetic.</li><li><strong>Link Lengths:</strong> Determines whether the dance is tight and compact or broad and expansive.</li><li><strong>Frequency Combinations:</strong> The specific set of SpeedX and SpeedY values creates a unique &quot;choreography&quot; for each token. Some dances are slow and meditative; others are quick and erratic.</li><li><strong>Color Drift Rate (</strong><strong>rgbRange):</strong> Determines whether the line&#39;s color shifts like a slow sunset or a rapid disco light.</li></ul><h3>Technical Deep Dive: The Physics of the Dance</h3><p>The mathematics behind <strong>Spectrum Dance</strong> is a form of <strong>parametric equations</strong>. The endpoint of the chain is the sum of many sine waves:</p><p>X_total = Σ L_i * sin(ωx_i * t + φ_i)<br>Y_total = Σ L_i * sin(ωy_i * t + φ_i)</p><p>This is essentially a <strong>Fourier series</strong> with a small number of terms. The resulting path is a type of <strong>harmonic synthesis</strong> — complex waveforms built from simple sine waves. The visual result is a continuous, flowing line that can exhibit a wide range of behaviors, from smooth, elliptical orbits to chaotic, space-filling curves.</p><h3>The fxhash Integration: A Live Performance</h3><p>The code includes sophisticated handling for the fxhash platform:</p><ul><li>The $fx.preview() function is called at frame 700 to capture a representative thumbnail.</li><li>Human-readable features (background color names, number of control points) are exposed via $fx.features().</li><li>The piece detects mobile devices (isMob) for potential performance optimizations.</li></ul><h3>Conclusion: An Endless Dance</h3><p><strong>Spectrum Dance</strong> transforms the cold mathematics of harmonic motion into a warm, living artwork. It is a piece that rewards patience — the longer you watch, the more the form evolves, the colors shift, and the dance reveals new patterns. Because the motion is driven by incommensurate frequencies, it will never truly repeat, offering an endless performance unique to your token.</p><p><strong>Witness the dance:</strong> <a href="https://www.fxhash.xyz/project/spectrum-dance">Spectrum Dance on fxhash</a><br><strong>Explore the choreography:</strong> <a href="https://github.com/reyrove/Generative-Art-on-fxhash/tree/master/Spectrum%2520Dance">GitHub Repository</a></p><p><em>The dance never ends. It only transforms.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=47998006c7db" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Socialism of Shapes: A Collective of Geometric Equals]]></title>
            <link>https://medium.com/@reyhanehdaneshdoost/socialism-of-shapes-a-collective-of-geometric-equals-5a33737dba53?source=rss-503c4251daaf------2</link>
            <guid isPermaLink="false">https://medium.com/p/5a33737dba53</guid>
            <category><![CDATA[digital-art]]></category>
            <category><![CDATA[creative-coding]]></category>
            <category><![CDATA[generative-art]]></category>
            <category><![CDATA[kinetic-art]]></category>
            <category><![CDATA[harmonicmotion]]></category>
            <dc:creator><![CDATA[Reyrove]]></dc:creator>
            <pubDate>Sun, 08 Mar 2026 14:56:00 GMT</pubDate>
            <atom:updated>2026-03-08T14:56:00.586Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/913/1*4ZaKKWeo7vWGGdWUWqAWtw.png" /><figcaption>Generative output: stochastic geometric primitives on variable-density grid.</figcaption></figure><p><strong>Where triangles, squares, and circles unite under a common visual framework.</strong></p><p><a href="https://www.fxhash.xyz/project/socialism-of-shapes">https://www.fxhash.xyz/project/socialism-of-shapes</a></p><p>What happens when geometric primitives abandon hierarchy and coexist as equals? When no single shape dominates, and every line, arc, and polygon contributes to a collective whole? <strong>Socialism of Shapes</strong> is a generative exploration of this question — a visual manifesto where squares, triangles, circles, and rectangles intermingle in a dense, patterned tapestry.</p><p>The title is deliberately provocative. In this algorithmic society, shapes are not arranged in rigid, hierarchical structures. Instead, they are distributed across the canvas with democratic randomness, their appearances governed by chance rather than composition rules. The result is a vibrant, often chaotic, celebration of form and color.</p><h3>The Concept: A Level Playing Field</h3><p>At its core, <strong>Socialism of Shapes</strong> implements a simple principle: <strong>equal opportunity for all primitives</strong>. The canvas is divided into a grid, and at each grid point, a random decision is made about which shape to draw, what color to give it, and how to orient it.</p><p>But within this simple framework lies immense complexity. Sixteen distinct “modes” (controlled by the variable A) determine the specific family of shapes and behaviors, ranging from simple lines to rotated triangles to randomized rectangles. Each mint selects one of these modes at random, creating sixteen unique visual dialects within the same geometric language.</p><h3>Deconstructing the Algorithm</h3><h3>1. The Color Palette: Curated Harmony</h3><p>Like previous projects in this series, <strong>Socialism of Shapes</strong> draws from carefully curated color arrays rather than pure randomness.</p><p><strong>Background Colors:</strong> 22 soft, pastel shades with names like “Cotton Candy,” “Magic Mint,” and “Robin Egg Blue.” These gentle backgrounds provide a neutral stage for the geometric performance.</p><pre>const backgroundColours = [&#39;#F5F5F5&#39;, &#39;#9AFEFF&#39;, &#39;#AAF0D1&#39;, &#39;#CCFB5D&#39;, ...]<br>const backgroundNames = [&#39;WhiteSmoke&#39;, &#39;Electric Blue&#39;, &#39;Magic Mint&#39;, &#39;Tea Green&#39;, ...]</pre><p><strong>Shadow Colors:</strong> 23 deep, moody tones drawn from a palette of dark blues, purples, browns, and blacks. These create subtle depth and contrast.</p><pre>const ShadowColours = [&#39;#000000&#39;, &#39;#040720&#39;, &#39;#0C090A&#39;, &#39;#151B54&#39;, ...]<br>const ShadowNames = [&#39;black&#39;, &#39;Black Blue&#39;, &#39;Night&#39;, &#39;Night Blue&#39;, ...]</pre><p><strong>Foreground Palettes:</strong> 44 distinct color sets, each containing 2–8 complementary colors. These are the voices of the shapes themselves — bright, saturated, and designed to pop against the pastel backgrounds.</p><pre>const foregroundColours = [<br>  [&#39;#9F21DE&#39;, &#39;#60DE21&#39;], // Purple and green<br>  [&#39;#F20DB2&#39;, &#39;#0DF24D&#39;], // Pink and neon green<br>  [&#39;#1DAEE2&#39;, &#39;#E2511D&#39;, &#39;#4ABEE8&#39;, &#39;#EA7348&#39;], // Blue, orange, light blue, coral<br>  // ... 41 more palettes<br>]</pre><h3>2. The Grid: Democratic Distribution</h3><p>The canvas is divided into a grid, but the grid spacing is randomized:</p><pre>const space = w / ($fx.rand() * 40 + 10); // Between w/50 and w/10<br>const size = w / ($fx.rand() * 40 + 20);  // Between w/60 and w/20</pre><p>This means some pieces have dense, tightly packed grids with hundreds of small shapes, while others have sparse grids with larger, more isolated forms.</p><p>The nested loops iterate far beyond the canvas boundaries (i = -5*space to w + 5*space) to ensure shapes near the edges have neighbors, creating the illusion of an infinite, continuous pattern.</p><h3>3. The Modes: Sixteen Visual Dialects</h3><p>The variable A (0-15) determines the shape family and behavior for the entire piece. Within each mode, there are two sub-variations controlled by a random threshold:</p><pre>const n = 2 * $fx.rand();<br>if (n &lt; $fx.rand() * 1.6 + 0.1) {<br>  // Variation A: regular placement and size<br>} else {<br>  // Variation B: randomized offsets and dimensions<br>}</pre><p>This creates subtle texture within each mode — some shapes are neatly aligned, others drift from their grid points.</p><h3>4. The Shadow: Depth and Mystery</h3><p>One of the most distinctive visual features is the shadow effect:</p><pre>ctx.shadowColor = features.ShadowColor;<br>ctx.shadowBlur = w / ($fx.rand() * 70 + 80);</pre><p>Each shape casts a soft shadow in a deep, contrasting color. This creates a sense of depth, as if the shapes are floating slightly above the background. The shadow blur is also randomized, making some pieces sharp and crisp, others soft and atmospheric.</p><h3>5. The Democratic Principle: No Shape Left Behind</h3><p>The title’s socialist metaphor extends to the rendering logic itself. Unlike traditional composition where shapes might be arranged in hierarchical layers or focal points, here every grid cell receives approximately equal visual weight. The randomness ensures that no single color, shape, or orientation dominates the composition.</p><p>This creates a kind of visual “commons” — a collective where the overall pattern emerges from the interactions of many equal participants, rather than being dictated from above.</p><h3>Visual Analysis: The Sixteen Faces of Socialism</h3><h3>Mode 0: Linear Networks</h3><p>When lines are the chosen mode, the piece resembles a geometric spiderweb — diagonal and orthogonal lines crisscrossing in dense patterns. The two variations (regular and offset) create either orderly grids or more chaotic, broken networks.</p><h3>Modes 1–3: Circular Collectives</h3><p>Circular modes produce pieces reminiscent of pointillist paintings or cellular structures. Full circles, arcs, and variable-radius arcs create different rhythms — some pieces feel like bubbles, others like crescent moons.</p><h3>Modes 4–8: Triangular Territories</h3><p>Triangles at various rotations create dynamic, directional energy. Equilateral triangles pointing up, down, left, and right interact to create star-like patterns and hexagonal illusions.</p><h3>Modes 9–11: Square Societies</h3><p>Squares, both axis-aligned and rotated, create more stable, architectural compositions. Rotated squares (45°) introduce diamond shapes that break the grid’s orthogonality.</p><h3>Modes 12–13: Mixed Communes</h3><p>These modes call the shape() function, which randomly selects among squares, triangles (at four rotations), rectangles, and circles. This is pure geometric democracy—every shape type has an equal voice.</p><h3>Modes 14–15: Rectangular Republics</h3><p>Variable-aspect rectangles create elongated forms that introduce directional tension. Some are tall and thin, others wide and flat, creating compositions that feel both structured and organic.</p><h3>Technical Deep Dive: The Shape Functions</h3><p>The code defines several helper functions for drawing primitives, each with careful coordinate geometry:</p><p><strong>Triangle:</strong></p><pre>function Triangle(ctx, x, y, size, angle) {<br>  const halfHeight = Math.sqrt(3) / 2 * size; // Height of equilateral triangle<br>  // ... draws triangle pointing &quot;up&quot; before rotation<br>}</pre><p><strong>Square and Rectangle:</strong></p><pre>function Square(ctx, x, y, size, angle) {<br>  // Draws square centered at (x,y) with side length 2*size<br>}</pre><p><strong>Shape (The Great Equalizer):</strong></p><pre>function shape(ctx, x, y, size, angle) {<br>  Q = Math.floor($fx.rand() * 8); // Random among 8 possibilities<br>  // 0: square, 1-4: triangles at four rotations, 5: rectangle, 6: circle<br>}</pre><h3>Philosophical Context: Art and Ideology</h3><p>The title <strong>Socialism of Shapes</strong> invites interpretation beyond the visual. In traditional art composition, certain elements are often privileged — the focal point, the rule of thirds, hierarchical relationships between foreground and background. This project deliberately rejects those hierarchies in favor of distributed visual weight.</p><p>Every shape, regardless of its type, receives:</p><ul><li>Equal opportunity to appear (within the probabilities of its mode)</li><li>Equal access to the color palette (random selection from the foreground set)</li><li>Equal visual treatment (consistent shadow and stroke width)</li></ul><p>This is a genuinely democratic approach to geometric composition — a society where all shapes are equal, even if some (like the versatile triangle with four rotations) occasionally have more representation.</p><h3>Conclusion: A Commonwealth of Geometry</h3><p><strong>Socialism of Shapes</strong> is a playful yet profound exploration of what happens when geometric primitives are treated as equals. With 22 possible backgrounds, 23 shadow colors, 44 foreground palettes, and 16 distinct modes, the parametric space is vast — over 500,000 unique combinations before accounting for continuous variations in spacing, size, and randomness.</p><p>Yet despite this complexity, every piece shares a common visual language: pastel grounds, vibrant shapes, soft shadows, and the underlying grid structure that binds it all together. It is a collection of individuals that forms a collective — a true commonwealth of geometry.</p><p><strong>Explore the collective:</strong> <a href="https://www.fxhash.xyz/project/socialism-of-shapes">Socialism of Shapes on fxhash</a><br><strong>Examine the constitution:</strong> <a href="https://github.com/reyrove/Generative-Art-on-fxhash/tree/master/socialism%2520of%2520shapes">GitHub Repository</a></p><p><em>All shapes are equal. Some are just more randomly distributed.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5a33737dba53" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Polite Brownian Motion: When Particles Dance With Manners]]></title>
            <link>https://medium.com/@reyhanehdaneshdoost/polite-brownian-motion-when-particles-dance-with-manners-30c30830ff95?source=rss-503c4251daaf------2</link>
            <guid isPermaLink="false">https://medium.com/p/30c30830ff95</guid>
            <category><![CDATA[digital-art]]></category>
            <category><![CDATA[creative-coding]]></category>
            <category><![CDATA[mathematicsinart]]></category>
            <category><![CDATA[generative-art]]></category>
            <category><![CDATA[nftart]]></category>
            <dc:creator><![CDATA[Reyrove]]></dc:creator>
            <pubDate>Sat, 07 Mar 2026 16:11:00 GMT</pubDate>
            <atom:updated>2026-03-07T16:11:00.651Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/913/1*DYs2pL7w6uEtjzD-DkQC2w.png" /><figcaption>Generative output: multi-particle constrained random walk with quantized angular displacement.</figcaption></figure><p><strong>Chaos theory meets color theory in this explosive generative symphony.</strong></p><p><a href="https://www.fxhash.xyz/project/polite-brownian-motion">https://www.fxhash.xyz/project/polite-brownian-motion</a></p><p>Brownian motion — the random, unpredictable movement of particles suspended in a fluid — is nature’s original chaos. It’s pollen grains dancing under a microscope. It’s smoke swirling in still air. It’s the fundamental randomness underlying the orderly universe.</p><p>But what if that chaos had <strong>manners</strong>? What if the particles, in their wild dance, agreed to stay within certain boundaries, to move with purpose, to explode in carefully coordinated color?</p><p>Welcome to <strong>Polite Brownian Motion</strong> — a generative art project that takes the raw randomness of particle physics and dresses it in formal wear. The result is an explosion of color, structure, and controlled chaos that feels simultaneously algorithmic and alive.</p><h3>The Concept: Random Walks With Restraint</h3><p>At its core, Polite Brownian Motion implements a <strong>multi-particle random walk</strong>. Hundreds of thousands of line segments are drawn, each tracing the path of a virtual particle as it wanders across a dark canvas.</p><p>But this isn’t pure chaos. Three key constraints transform randomness into art:</p><ol><li><strong>Boundary Politeness:</strong> Particles stay within a defined interior region, never touching the edges</li><li><strong>Color Coordination:</strong> Each particle walks in its own vibrant color, drawn from curated palettes</li><li><strong>Angular Discipline:</strong> Movement directions are quantized into specific angles, creating geometric structure</li></ol><p>The result is a piece that reads as both chaotic and ordered — like a Jackson Pollock painting that secretly follows mathematical rules.</p><h3>Deconstructing the Algorithm</h3><h3>1. The Canvas: Perfect Darkness</h3><p>The project maintains a 1:1 square aspect ratio, ensuring every piece is perfectly balanced. The backgrounds are drawn from a deep, moody palette of 27 dark colors:</p><pre>const backgroundColours =[&#39;#000000&#39;,&#39;#040720&#39;,&#39;#34282C&#39;,&#39;#3A3B3C&#39;,&#39;#151B54&#39;, ...]<br>const backgroundNames =[&#39;black&#39;,&#39;Black Blue&#39;,&#39;Charcoal&#39;,&#39;Stormy Gray&#39;,&#39;Night Blue&#39;, ...]</pre><p>These aren’t just black — they’re <strong>midnight blue</strong>, <strong>deep teal</strong>, <strong>army green</strong>, <strong>blood red</strong>, <strong>chocolate brown</strong>. Each mint begins with a different dark canvas, setting the emotional tone for the color explosion to come.</p><h3>2. The Color Palettes: Curated Explosions</h3><p>The line colors are where Polite Brownian Motion truly shines. Unlike simple random RGB generation, the project draws from <strong>44 carefully curated palettes</strong>, each containing 2–8 harmonious colors:</p><pre>const foregroundColours = [<br>  [&#39;#A0CE31&#39;,&#39;#5F31CE&#39;], // Lime and purple<br>  [&#39;#0EDEF1&#39;,&#39;#F1210E&#39;], // Cyan and red<br>  [&#39;#0EDEF1&#39;,&#39;#930EF1&#39;,&#39;#F1210E&#39;,&#39;#6CF10E&#39;], // Cyan, purple, red, lime<br>  [&#39;#A33FC0&#39;,&#39;#C03F9C&#39;,&#39;#633FC0&#39;], // Purple family<br>  // ... 40 more palettes<br>]</pre><p>This curatorial approach ensures that every mint, regardless of randomness, is visually harmonious. Colors within each palette are designed to complement each other — creating pieces that pop without clashing.</p><h3>3. The Particle Parameters: Unique Behaviors</h3><p>Each color in the selected palette gets its own particle with unique behavioral parameters:</p><pre>features.MaxNumOfSteps = Math.floor($fx.rand() * 498 + 202) // 202-700 steps<br><br>for (let j = 0; j &lt;= features.lineColours.length; j++) {<br>  theta[j] = $fx.rand() * Math.PI/2  // Random angle between 0 and 90°<br>  xsteps[j] = Math.floor($fx.rand() * features.MaxNumOfSteps + 50)<br>  ysteps[j] = xsteps[j] * 1.6  // Aspect ratio correction<br>}</pre><p>This means each color in the composition moves with its own personality — its own preferred angle, its own step size, its own rhythm.</p><h3>4. The Boundary Protocol: Perfect Manners</h3><p>Here’s where the “politeness” comes in. Particles are constrained to an interior region, never touching the canvas edges:</p><pre>M = Math.floor($fx.rand() * 70 + 30)  // Margin divisor between 30 and 100<br><br>// Position constraints ensure particles stay within the interior<br>x = Math.max(w/M, Math.min(Math.floor($fx.rand() * features.Xsteps[j]) * w / features.Xsteps[j], (M-1) * w/M))<br>y = Math.max(h/M, Math.min(Math.floor($fx.rand() * features.Xsteps[j]) * h / features.Xsteps[j], (M-1) * h/M))</pre><p>This creates a natural “frame” around the composition — a border of pure background color that contains the chaos within. The particles are free to roam, but they politely agree never to touch the edges.</p><h3>5. The Movement Logic: Quantized Chaos</h3><p>Each particle moves according to one of four possible directional rules, chosen randomly at each step:</p><pre>Q = Math.floor($fx.rand() * 4)  // 0, 1, 2, or 3<br><br>if (Q == 0) {<br>  nextX = x + w/features.Xsteps[j] * Math.cos(features.Theta[j] * k)<br>  nextY = y - w/features.Xsteps[j] * Math.sin(features.Theta[j] * k)<br>} else if (Q == 1) {<br>  // Opposite direction<br>} else if (Q == 2) {<br>  // Perpendicular movement using Y steps<br>} else if (Q == 3) {<br>  // Opposite perpendicular<br>}</pre><p>This creates movement that’s neither purely random nor purely deterministic. The particles have preferred directions (determined by Theta[j] and the loop index k), but they randomly choose among four variations at each step.</p><h3>6. The Shadow Effect: Glowing Trails</h3><p>A subtle but crucial aesthetic choice is the shadow blur:</p><pre>ctx.shadowColor = features.lineColours[j]<br>ctx.shadowBlur = w/(2 * features.Xsteps)</pre><p>This creates a glowing effect around each line segment, as if the particles are leaving trails of light. On dark backgrounds, these glowing lines create depth and atmosphere — the visual equivalent of long-exposure photography of fireflies.</p><h3>7. The Iteration Count: Sheer Density</h3><p>The nested loops produce an astonishing number of line segments:</p><pre>P = Math.floor($fx.rand() * 10000 + 10000)  // 10,000 to 20,000 iterations per color<br>// Multiplied by number of colors (2-8) and rotation factor R</pre><p>A typical piece contains <strong>hundreds of thousands</strong> of individual line segments, densely packing the canvas with color. This density creates the characteristic “explosion” look — a nebula of lines that reads as solid color from a distance and intricate detail up close.</p><h3>Visual Analysis: Four Dimensions of Variation</h3><h3>Background Mood</h3><p>The 27 background colors set the emotional foundation. Deep blues feel oceanic and calm. Dark greens feel organic and forest-like. Burgundies and browns feel warm and vintage. Blacks feel modern and minimal.</p><h3>Color Palette Personality</h3><p>The 44 foreground palettes each have their own character:</p><ul><li><strong>Complementary pairs</strong> (lime/purple, cyan/red) create vibrant tension</li><li><strong>Analogous families</strong> (multiple purples, multiple greens) create harmonious gradients</li><li><strong>Quadratic explosions</strong> (4–8 colors) create maximalist celebrations</li></ul><h3>Angular Signature</h3><p>The random Theta values (0-90°) determine whether a piece feels diagonal, vertical, or horizontal in its energy. Some pieces have particles moving at steep angles, creating waterfall effects. Others use shallow angles, creating gentle waves.</p><h3>Margin Size</h3><p>The random M value (30-100) determines how much breathing room surrounds the chaos. Small margins (M=30) mean the particles roam close to the edge. Large margins (M=100) create a substantial border of pure background.</p><h3>Technical Deep Dive: The Mathematics of Politeness</h3><h3>Step Size and Grid Quantization</h3><p>The canvas is effectively divided into a grid of Xsteps[j] columns and Ysteps[j] rows. Particles move between grid points, creating a subtle quantization effect—the lines aren&#39;t perfectly smooth but have a faint digital texture.</p><h3>Rotation Loops</h3><p>The outer loop for (let k=0; k&lt;=R; k++) where R is based on the maximum theta value creates rotational symmetry. Each color&#39;s preferred angle is multiplied by k, creating radiating patterns from a common center.</p><h3>Boundary Enforcement</h3><p>The repeated use of Math.max() and Math.min() ensures particles never stray into the margin region. This is the &quot;politeness&quot; encoded in mathematics—a hard constraint that transforms unbounded random walks into contained compositions.</p><h3>The fxhash Integration: Professional Polish</h3><p>Like the previous projects, Polite Brownian Motion includes sophisticated fxhash boilerplate:</p><ul><li><strong>Responsive sizing</strong> for all devices</li><li><strong>High-DPI rendering</strong> for retinal displays</li><li><strong>Keyboard shortcut</strong> (‘s’) to save your piece</li><li><strong>Force download</strong> for marketplace integration</li><li><strong>Preview capture</strong> for thumbnails</li><li><strong>Feature exposure</strong> for human-readable traits</li></ul><p>The $fx.features() system is used to expose the background color name, allowing collectors to describe their piece: &quot;Mine is Stormy Gray with a 5-color palette.&quot;</p><h3>Philosophical Context: Chaos and Constraint</h3><p>Polite Brownian Motion sits at an interesting philosophical intersection. True Brownian motion is unbounded, directionless, pure chaos. By adding constraints — boundaries, quantized angles, curated colors — we transform chaos into something legible, something beautiful.</p><p>This mirrors the generative art process itself. The artist provides the constraints (the code, the rules, the palettes). The algorithm provides the chaos (the randomness, the variation, the uniqueness). Together, they create something neither could produce alone.</p><p>The “politeness” is a metaphor for this collaboration — the randomness agrees to behave, to stay within bounds, to coordinate with its neighbors. In return, it gets to express itself in brilliant color.</p><h3>Conclusion: Controlled Chaos, Beautifully Executed</h3><p>Polite Brownian Motion is a celebration of what happens when randomness meets restraint. Each mint is an explosion of color contained within a dark vessel — a supernova in a bottle, a firework frozen in time, a particle accelerator captured in still frame.</p><p>With 27 possible backgrounds, 44 possible color palettes, and continuous variation in angles, step sizes, margins, and iteration counts, the parametric space is vast. No two mints are alike, yet all share the family resemblance of the “polite” algorithm.</p><p><strong>Witness the dance:</strong> <a href="https://www.fxhash.xyz/project/polite-brownian-motion">Polite Brownian Motion on fxhash</a><br><strong>Explore the code:</strong> <a href="https://github.com/reyrove/Generative-Art-on-fxhash/tree/master/Polite%2520Brownian%2520Motion">GitHub Repository</a></p><p><em>The particles are moving. They have places to go. But they’ll always stay polite about it.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=30c30830ff95" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Pappus: Where Fractal Trees Bloom in Pastel Gardens]]></title>
            <link>https://medium.com/@reyhanehdaneshdoost/pappus-where-fractal-trees-bloom-in-pastel-gardens-e3276a0af6d9?source=rss-503c4251daaf------2</link>
            <guid isPermaLink="false">https://medium.com/p/e3276a0af6d9</guid>
            <category><![CDATA[generative-art]]></category>
            <category><![CDATA[reyrove]]></category>
            <category><![CDATA[digital]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[code]]></category>
            <dc:creator><![CDATA[Reyrove]]></dc:creator>
            <pubDate>Fri, 06 Mar 2026 15:06:00 GMT</pubDate>
            <atom:updated>2026-03-06T15:06:00.767Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/913/1*hl14EVr7MhV_Dcgv8krwEA.png" /><figcaption>Visualization of emergent complexity from recursive function calls with depth-dependent stroke styling and geometric progression of branch dimensions.</figcaption></figure><p><strong>Generative botany meets algorithmic beauty in this tribute to nature’s most elegant structures.</strong></p><p><a href="https://www.fxhash.xyz/project/pappus">https://www.fxhash.xyz/project/pappus</a></p><p>There is a quiet mathematics to nature. The spiral of a fern frond. The branching of a river delta. The delicate seeds of a dandelion ready to take flight — each attached to its own tiny parachute, a structure botanists call a <strong>pappus</strong>.</p><p><strong>Pappus</strong> is a generative art project that grows fractal trees from algorithmic soil. Each mint is a unique botanical specimen, combining the recursive logic of branching structures with carefully curated color palettes drawn from nature’s own catalog. The result is a garden that exists nowhere else in the universe — grown just for you, one deterministic seed at a time.</p><p>Let’s dig into the soil of this code and watch how these digital organisms grow.</p><h3>The Concept: Growing Trees from Code</h3><p>At its heart, Pappus is a study in recursion — the programming concept where a function calls itself, creating infinite complexity from simple rules. Just as a real tree branches, and each branch branches again, the drawTree() function repeats its logic at smaller and smaller scales until it reaches a predetermined depth.</p><p>But Pappus isn’t just about structure. It’s about <strong>color</strong>, <strong>warmth</strong>, and the gentle aesthetic of botanical illustration. The backgrounds are soft pastels. The trunks and branches graduate from vibrant hair colors to deeper body colors. Each tree stands alone, yet each is unique — its position, angle, and branching pattern determined by the random seed of your token.</p><h3>Deconstructing the Algorithm</h3><h3>1. The Canvas: Perfect Proportions</h3><p>The project maintains a 1:1 aspect ratio, ensuring every piece is perfectly square — ideal for profile pictures, digital frames, or simply as balanced compositions.</p><pre>const ratio = 1 / 1</pre><p>The canvas is dynamically sized to fit the viewer’s screen while maintaining these proportions, centered perfectly with elegant padding.</p><h3>2. The Color Palette: Curated from Nature</h3><p>Unlike purely random color selection, Pappus draws from carefully curated arrays of named colors. This is a deliberate aesthetic choice — it ensures every combination is harmonious, never jarring.</p><pre>const backgroundColours = [&#39;#FFF8DC&#39;, &#39;#F5DEB3&#39;, &#39;#F5F5DC&#39;, &#39;#DCDCDC&#39;, ...]<br>const backgroundNames = [&#39;Cornsilk&#39;, &#39;Wheat&#39;, &#39;Beige&#39;, &#39;Gainsboro&#39;, ...]</pre><p>Three color categories are randomly selected for each mint:</p><ul><li><strong>Background:</strong> Soft, welcoming pastels that feel like antique paper or gentle skies</li><li><strong>Body Color:</strong> Deeper, earthier tones — Sienna, Maroon, SteelBlue — that form the trunk and major branches</li><li><strong>Hair Color:</strong> Brighter, more vibrant hues — Neon Gold, Bright Turquoise, MediumSpringGreen — that color the delicate outer twigs</li></ul><p>This creates a natural gradient from trunk to tip, as if the tree’s energy is flowing outward, changing color as it reaches for the light.</p><h3>3. The $fx.features() System: Readable Uniqueness</h3><p>One of the elegant features of the fxhash platform is the ability to expose human-readable traits. Pappus does this beautifully:</p><pre>readableFeaturesObj.Background = backgroundNames[backgroundIndex]<br>readableFeaturesObj[&#39;Body Color&#39;] = BodycolorNames[BodycolorIndex]<br>readableFeaturesObj[&#39;Hair Color&#39;] = haircolorNames[haircolorIndex]<br><br>$fx.features(readableFeaturesObj)</pre><p>This means collectors can see exactly what they’ve minted: “Ah, mine is a <strong>Beige</strong> background with <strong>Sienna</strong> body and <strong>Neon Gold</strong> hair.” It transforms the piece from abstract art into something describable, collectible, and comparable.</p><h3>4. The Recursive Heart: drawTree()</h3><p>The drawTree() function is where the magic happens. It&#39;s a recursive fractal algorithm that draws a branch, then calls itself to draw smaller branches from the endpoint.</p><pre>function drawTree(ctx, startX, startY, length, angle, depth, branchWidth, color1, color2) {<br>  // Draw the current branch<br>  ctx.lineTo(endX, endY);<br>  <br>  // Color logic: tips get color1 (hair), inner branches get color2 (body)<br>  if (depth &lt;= 1) {<br>    ctx.strokeStyle = color1;<br>  }<br>  if (depth &gt; 1) {<br>    ctx.strokeStyle = color2;<br>  }<br>  <br>  // Recursively draw sub-branches<br>  subBranches = ($fx.rand() * (maxBranch - 1)) + 1;<br>  for (var i = 0; i &lt; subBranches; i++) {<br>    newAngle = angle - maxAngle + $fx.rand() * maxAngle * 2;<br>    newLength = length * 0.618; // The golden ratio appears!<br>    drawTree(ctx, endX, endY, newLength, newAngle, newDepth, branchWidth, color1, color2);<br>  }<br>}</pre><p>Notice the <strong>0.618</strong> multiplier — that’s the golden ratio conjugate (1/φ). This creates naturally pleasing proportions, the same found in pinecones, sunflowers, and nautilus shells.</p><h3>5. The Random Positioning: No Two Trees Alike</h3><p>The tree isn’t centered mechanically. Its base is placed randomly within a generous region of the canvas:</p><pre>X1 = w/4 + $fx.rand() * w/2;        // Between 25% and 75% of width<br>Y1 = 6*h/10 + $fx.rand() * h/3;      // Between 60% and 93% of height<br>Angle1 = -11*Math.PI/20 + $fx.rand() * 2*Math.PI/20; // Slight variation from vertical</pre><p>This means some trees grow straight and tall, others lean lazily to the side. Some are planted low in the frame, others rise from the center. Each composition feels organic, never stiff or templated.</p><h3>6. The Golden Ratio: Nature’s Algorithm</h3><p>The repeated use of <strong>0.618</strong> (the golden ratio conjugate) is no accident. In each recursive step:</p><ul><li>Branch length multiplies by 0.618</li><li>Branch width multiplies by 0.618</li></ul><p>This creates the characteristic fractal self-similarity of real trees — each branch a smaller copy of the whole, proportioned according to the same mathematical law that governs so much of the natural world.</p><h3>Visual Analysis: Three Elements in Harmony</h3><h3>The Background</h3><p>The pastel backgrounds — Cornsilk, Beige, LavenderBlush, AliceBlue — create a sense of warmth and age. They feel like the vellum of an ancient botanical illustration or the soft focus of a dream landscape.</p><h3>The Body</h3><p>The trunk and major branches, rendered in the “body color,” provide structural anchor. These deeper tones — SaddleBrown, DarkOliveGreen, Maroon — ground the tree in reality, giving it weight and presence.</p><h3>The Hair</h3><p>The outermost twigs and branchlets burst into “hair color” — bright, unexpected hues that suggest new growth, flowering tips, or simply the artist’s playful intervention. These neon accents against the muted backgrounds create delightful tension.</p><h3>Technical Deep Dive: Recursion and Randomness</h3><h3>Recursion Depth</h3><p>The tree is drawn with a fixed depth of 9 generations:</p><pre>drawTree(ctx, X1, Y1, w/4, Angle1, 9, w/100, Color1, Color2);</pre><p>Nine levels of branching create remarkable complexity. Level 1 is the trunk. Level 2 are the main branches. By level 9, we have thousands of tiny twigs, each rendered in the bright “hair” color.</p><h3>Variable Branching</h3><p>Unlike purely binary trees, Pappus allows between 1 and 12 sub-branches at each node:</p><pre>subBranches = ($fx.rand() * (maxBranch - 1)) + 1; // maxBranch = 12</pre><p>This creates asymmetrical, organic forms. Some nodes explode with many branches; others are sparse. This irregularity is what makes each tree feel alive.</p><h3>Angle Variation</h3><p>Branches don’t spread at fixed angles. Instead, they vary randomly within a range:</p><pre>newAngle = angle - maxAngle + $fx.rand() * maxAngle * 2;</pre><p>This prevents the mechanical symmetry of computer-generated fractals and mimics the random variations of real growth — wind, light, gravity all subtly influencing the final form.</p><h3>The fxhash Integration: Seamless and Professional</h3><p>The code includes sophisticated fxhash boilerplate that handles:</p><ul><li><strong>Responsive sizing</strong> for all devices</li><li><strong>High-DPI rendering</strong> for sharp images on retina screens</li><li><strong>Keyboard shortcut</strong> (press ‘s’) to save your piece</li><li><strong>Force download</strong> functionality for marketplace integration</li><li><strong>Preview capture</strong> for thumbnails</li></ul><p>This infrastructure transforms a beautiful algorithm into a professional-grade generative art project ready for minting and collecting.</p><h3>Conclusion: A Garden Grown from Code</h3><p>Pappus is named for the delicate structure that carries a dandelion’s seed to new soil. Each mint is itself a seed — a unique genetic code expressed as visual form, ready to be collected and appreciated by someone who sees themselves in its branching patterns.</p><p>The project reminds us that algorithms can be warm, that code can be poetic, and that the simplest rules — recursion, randomness, and a carefully chosen palette — can produce infinite variety.</p><p><strong>Visit the garden and claim your tree:</strong> <a href="https://www.fxhash.xyz/project/pappus">Pappus on fxhash</a><br><strong>Explore the source code:</strong> <a href="https://github.com/reyrove/Generative-Art-on-fxhash/tree/master/Pappus">GitHub Repository</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e3276a0af6d9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Neon Drift: The Electric Pulse of Generative Chaos]]></title>
            <link>https://medium.com/@reyhanehdaneshdoost/neon-drift-the-electric-pulse-of-generative-chaos-9f12f6e97029?source=rss-503c4251daaf------2</link>
            <guid isPermaLink="false">https://medium.com/p/9f12f6e97029</guid>
            <category><![CDATA[creative-coding]]></category>
            <category><![CDATA[reyrove]]></category>
            <category><![CDATA[generative-art]]></category>
            <category><![CDATA[nft]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Reyrove]]></dc:creator>
            <pubDate>Thu, 05 Mar 2026 14:06:00 GMT</pubDate>
            <atom:updated>2026-03-05T14:06:00.684Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KFiF4uZcpgT9UqdVrsDNwA.png" /><figcaption>Generative output showing stochastic geometric propagation with boundary reflection and neon color evolution.</figcaption></figure><p><strong>Where neon colors collide with geometric drift to create synthetic life.</strong></p><p><a href="https://www.fxhash.xyz/project/neon-drift">https://www.fxhash.xyz/project/neon-drift</a></p><p>Some generative art pieces are meticulously planned, every parameter weighted and considered. Others feel alive — as if they’re breathing, shifting, and pulsing with an electric energy of their own. <strong>Neon Drift</strong> falls squarely into the latter category.</p><p>Born from a simple idea — what if lines could wander like living organisms? — Neon Drift evolved into a vibrant exploration of color, geometry, and controlled chaos. Every mint is a unique snapshot of a synthetic ecosystem in motion, frozen at the perfect moment of its drift.</p><p>Let’s dive into the code that gives this piece its electric soul.</p><h3>The Concept: Frozen Motion</h3><p>Neon Drift captures the paradox of movement frozen in time. The piece doesn’t animate — everything happens in a single frame within setup(). But within that static image lies the history of movement: thousands of geometric shapes (lines, ellipses, or rectangles) that have drifted across the canvas, leaving behind a trail of neon light.</p><p>It’s like photographing fireflies at night — you don’t see them move, but their paths tell the story of their dance.</p><h3>Deconstructing the Algorithm</h3><h3>1. The Canvas: A Perfect Square</h3><p>Like many fxhash projects, Neon Drift begins by establishing a square canvas based on the smallest viewport dimension. This ensures consistency and centering across all devices.</p><pre>const e = Math.min(window.innerWidth, window.innerHeight);<br>createCanvas(e, e);</pre><h3>2. The Dark Canvas: Setting the Stage</h3><p>Before the neon can shine, we need darkness. The background is a single, randomly generated dark color — not necessarily black, but always deep enough to make those bright colors pop.</p><pre>let bgColor = color($fx.rand() * 256, $fx.rand() * 256, $fx.rand() * 256);<br>background(bgColor);</pre><p>This simple choice means no two pieces share the same “night sky.” Some are deep indigo, others rich burgundy, others forest green — but all serve as the perfect backdrop for the neon storm to come.</p><h3>3. The Seed: Starting Positions and Drift Vectors</h3><p>Every drift needs a starting point. Four coordinates are randomly generated: (startX, startY) and (endX, endY). These define the first geometric primitive—whether it&#39;s a line, an ellipse, or a rectangle.</p><p>But the magic lies in the <strong>deltas</strong> — the drift vectors. Each endpoint gets its own small, random velocity:</p><pre>const range = 0.2 * $fx.rand() * width;<br>deltaStartX = ($fx.rand() * range * 2) - range;<br>deltaStartY = ($fx.rand() * range * 2) - range;<br>// ... and so on for the end point</pre><h3>4. The Neon Palette: Electric Color Generation</h3><p>The colors are deliberately pushed into the neon spectrum. By starting each RGB channel in the 180–255 range and allowing small random fluctuations, we ensure every stroke glows with electric intensity.</p><pre>r = $fx.rand() * 65 + 190; // 190-255 range<br>g = $fx.rand() * 65 + 190; // 190-255 range<br>b = $fx.rand() * 75 + 180; // 180-255 range</pre><h3>5. The Shape Trinity: Lines, Ellipses, Rectangles</h3><p>One of three primitive shapes is randomly chosen for each mint:</p><pre>Shape = Math.floor($fx.rand() * 3); // 0: line, 1: ellipse, 2: rect</pre><p>This choice fundamentally alters the visual language of the piece:</p><ul><li><strong>Lines (0):</strong> Create web-like networks, like neural pathways or lightning frozen in time.</li><li><strong>Ellipses (1):</strong> Produce cloud-like clusters, soft and atmospheric — like nebulae viewed through a prism.</li><li><strong>Rectangles (2):</strong> Generate architectural, grid-like patterns — digital cityscapes at electric midnight.</li></ul><h3>6. The Loop: Generative Proliferation</h3><p>The heart of Neon Drift is a single for loop that runs hundreds of times:</p><pre>const numLines = Math.floor($fx.rand() * 200) + 100; // 100-300 iterations</pre><p>Each iteration:</p><ol><li>Draws the current shape with current color and position</li><li>Adjusts the color slightly (±10 per channel)</li><li>Updates all four coordinates by their respective deltas</li><li>Bounces endpoints off canvas boundaries to keep the action contained</li></ol><p>This boundary reflection is crucial — it creates the illusion of particles trapped in a box, endlessly ricocheting and leaving trails of light.</p><pre>if (startX &lt; 0 || startX &gt; width) deltaStartX *= -1;<br>// ... and so on for each coordinate</pre><h3>7. The Capture: $fx.preview()</h3><p>Finally, $fx.preview() signals to the fxhash platform that the artwork is ready to be captured as the static thumbnail and preview image.</p><h3>Visual Analysis: Three Moods of Neon Drift</h3><h3>The Line Configuration</h3><p>When lines are chosen, the result resembles an EEG reading of a synthetic brain—pulsing with electrical activity, forming intricate webs that suggest connectivity and neural networks. The drifting endpoints create organic, almost calligraphic curves as they move through space.</p><h3>The Ellipse Configuration</h3><p>Ellipses transform the piece into something celestial. Clusters of glowing orbs drift and overlap, creating depth and atmosphere. The result is reminiscent of telescope imagery—galaxies colliding, stars being born, nebulae swirling in slow cosmic dance.</p><h3>The Rectangle Configuration</h3><p>Rectangles bring structure and rhythm. The drifting squares create moiré patterns, architectural rhythms, and digital artifacts. It&#39;s the most &quot;cyberpunk&quot; of the three modes—like looking at a city through rain-streaked glass at night.</p><h3>Technical Deep Dive: The Physics of Drift</h3><p>The movement system in Neon Drift is elegantly simple but produces complex behavior:</p><ol><li><strong>Independent Motion:</strong> Each endpoint moves independently, allowing shapes to stretch, contract, and distort organically.</li><li><strong>Boundary Reflection:</strong> When an endpoint hits the edge, its direction reverses—creating perpetual motion without escape.</li><li><strong>Drift Range Randomization:</strong> The range variable, scaled to canvas size and multiplied by another random factor, ensures some drifts are subtle while others are wild and expansive.</li></ol><p>This creates emergent behavior: shapes don&#39;t just translate across the canvas; they transform. A line might start as a short dash and stretch into a long diagonal. An ellipse might begin as a perfect circle and distort into an oblong smear. A rectangle might contract until it&#39;s nearly a point, then expand again.</p><h3>The Role of $fx.rand(): Deterministic Uniqueness</h3><p>Every element of Neon Drift is controlled by $fx.rand(), fxhash&#39;s seeded random function. This means:</p><ul><li>The background color is unique to your token</li><li>The initial positions are unique</li><li>The drift vectors are unique</li><li>The color evolution is unique</li><li>The number of iterations is unique</li></ul><p>Yet, because it’s seeded, your specific piece can always be regenerated from your token hash. You own not just an image, but an entire deterministic universe.</p><h3>Conclusion: Electric Dreams</h3><p>Neon Drift is an exploration of what happens when simple rules — drift, bounce, draw, repeat — are given enough iterations to become complex. It’s a reminder that generative art doesn’t need intricate algorithms to be captivating. Sometimes, all you need is a dark canvas, some neon paint, and permission to wander.</p><p>No two mints are alike. Some are chaotic explosions of color. Others are meditative, rhythmic drifts. Some look like neural maps, others like cosmic events, others like digital glitches made beautiful.</p><p><strong>Explore the collection and claim your drift:</strong> <a href="https://www.fxhash.xyz/project/neon-drift">Neon Drift on fxhash</a><br><strong>Dive into the code:</strong> <a href="https://github.com/reyrove/Generative-Art-on-fxhash/tree/master/Neon%2520Drift">GitHub Repository</a></p><p><em>Let your eyes follow the drift. Somewhere in the neon chaos, you might just find order.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9f12f6e97029" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Nebula Knight: Where Chess Meets the Cosmos]]></title>
            <link>https://medium.com/@reyhanehdaneshdoost/nebula-knight-where-chess-meets-the-cosmos-3001915a47ac?source=rss-503c4251daaf------2</link>
            <guid isPermaLink="false">https://medium.com/p/3001915a47ac</guid>
            <category><![CDATA[reyrove]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[nft]]></category>
            <category><![CDATA[creative-coding]]></category>
            <category><![CDATA[generative-art]]></category>
            <dc:creator><![CDATA[Reyrove]]></dc:creator>
            <pubDate>Wed, 04 Mar 2026 15:06:00 GMT</pubDate>
            <atom:updated>2026-03-04T15:06:00.661Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FABekjOUJPzeMbyXdMN-lA.png" /><figcaption>Generative artifact: Randomized L-step sequences rendered via HSB color space interpolation and variable circle packing.</figcaption></figure><p><strong>An exploration of generative art, random walks, and the infinite dance of the knight.</strong></p><p><a href="https://www.fxhash.xyz/project/nebula-knight">https://www.fxhash.xyz/project/nebula-knight</a></p><p>In the vast digital expanse of generative art, the simplest rules often lead to the most mesmerizing results. Today, I’m excited to walk you through the creation of <strong>Nebula Knight</strong>, a project currently minted on fxhash.</p><p>Nebula Knight is a love letter to two things: the elegant, L-shaped movement of a chess knight and the chaotic, beautiful structure of a nebula. The result is an infinite series of unique, cosmic maps tracing the path of a single piece across an unseen board.</p><p>Let’s break down the code behind the art.</p><h3>The Concept: A Constrained Random Walk</h3><p>At its heart, this project is about a “random walk.” However, unlike a simple wander in any direction, this walker is bound by the strict movement rules of a chess knight. It moves in an “L” shape: two steps in one direction and one step perpendicular.</p><p>But here’s where it gets interesting. We aren’t just using the standard (2, 1) knight move. By introducing two variables, s1 and s2, we allow the knight to leap in variable strides. This breaks the traditional pattern and creates the sprawling, organic &quot;nebula&quot; traces.</p><h3>Deconstructing the Code</h3><p>Let’s look at the core logic that brings this piece to life.</p><h3>1. Setting the Stage</h3><p>The canvas is always a perfect square, determined by the smallest viewport dimension (innerWidth or innerHeight). This ensures the art remains centered and consistent, no matter the device.</p><p>javascript:</p><pre>const e = Math.min(innerWidth, innerHeight);<br>const canvas = {<br>  w: e,<br>  h: e<br>};</pre><h3>2. The Power of Randomness</h3><p>Every single piece of Nebula Knight is unique, thanks to the $fx.rand() function provided by the fxhash environment. This isn&#39;t just JavaScript&#39;s Math.random(); it&#39;s a seeded random function. This means that while every mint is random, the specific &quot;hash&quot; of your token will always regenerate <em>your</em> specific piece.</p><p>We use this randomness to determine everything:</p><ul><li><strong>Grid Size:</strong> The board can be as small as 5x5 or as large as 105x105.</li></ul><p>cols = floor($fx.rand() * 100) + 5; rows = floor($fx.rand() * 100) + 5;</p><ul><li><strong>The Knight’s Stride (</strong><strong>s1, </strong><strong>s2):</strong> This is the secret sauce. Instead of moving 2 and 1, the knight might move 5 and 3, or 1 and 7. This creates the distinctive, varied &quot;jumps&quot; in the path.</li></ul><p>s1 = floor($fx.rand() * min([cols, rows]) / ($fx.rand() * 5 + 1)) + 1; s2 = floor($fx.rand() * min([cols, rows]) / ($fx.rand() * 5 + 1)) + 1;</p><ul><li><strong>Path Length:</strong> Some pieces show a short, dense cluster of steps, while others trace a long, winding journey across the entire canvas.</li></ul><p>totalSteps = floor($fx.rand() * 1000) + 10;</p><h3>3. The Dance of the Knight</h3><p>The getRandomKnightMove() function is the choreographer. It takes the current position and the two stride lengths (Step1, Step2) to calculate all eight possible L-shaped moves. It then filters out any moves that would take the knight off the board, ensuring the path always stays within the frame.</p><p>javascript:</p><pre>function getRandomKnightMove(position, Step1, Step2) {<br>  let { x, y } = position;<br>  let moves = [<br>    { x: x + Step1, y: y + Step2 }, // ...<br>    { x: x + Step2, y: y + Step1 }  // The other L-orientation<br>  ];<br>  // ... filter and return a random valid move<br>}</pre><h3>4. Painting the Nebula</h3><p>The visual magic happens in the draw() function. For every step in the path, we draw a circle. Its color is a gradient—a smooth lerpColor() (linear interpolation) from a vibrant startColor to a pure white endColor. This gives the trail a sense of depth and age, as if the earliest steps are burning hot and the later ones are cooling into the void.</p><p>The size of each circle is also randomized. This adds a wonderful layer of texture, preventing the path from looking like a uniform line of dots and giving it the cloud-like, particulate feel of a nebula.</p><p>javascript:</p><pre>let interColor = lerpColor(startColor, endColor, i / knightPath.length);<br>let radius = map($fx.rand(), 0, 1, min(s1, s2), canvas.w / 10);<br>ellipse(px, py, radius, radius);</pre><h3>5. The Color Modes</h3><p>One of the five color modes is chosen at random for each piece. This shifts the entire mood of the artwork.</p><ul><li><strong>Mode 0:</strong> A classic, stark black-to-white gradient.</li><li><strong>Modes 1–4:</strong> A vibrant primary color (Blue, Cyan, Magenta, Yellow) bleeding into white, creating the feeling of a stellar nursery glowing with a specific element.</li></ul><h3>Conclusion: Infinite Exploration</h3><p>Nebula Knight is a testament to the beauty of generative constraints. By locking the movement to a modified chess rule and then randomizing every other variable — the board size, the stride, the length, the color, the dot size — we create a system capable of infinite, unique expressions.</p><p>No two mints are the same. One might be a tight, magenta supernova, while another is a sprawling, cyan galaxy. I invite you to explore the collection and find the nebula that speaks to you.</p><p><strong>Check out the project on fxhash:</strong> <a href="https://www.fxhash.xyz/project/nebula-knight">Nebula Knight</a><br><strong>View the full code on GitHub:</strong> <a href="https://github.com/reyrove/Generative-Art-on-fxhash/tree/master/Nebula%2520Knight">reyrove/Generative-Art-on-fxhash</a></p><p><em>Happy minting, and may your knight always find its way home.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3001915a47ac" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>