← Back to Blog 🇯🇵 日本語

Line Art vs. Mosaic
— DNA Structure in gene46 Compared

Published: July 22, 2026 | Category: Technical Deep Dive

gene46 offers two fundamentally different generative art modes: Line Art and Mosaic. Both use Genetic Algorithms to evolve visual patterns — but their underlying DNA structures, rendering approaches, and evolutionary dynamics are completely different.

Understanding these differences will help you choose the right mode for your creative goals and deploy better selection strategies in each.

1. Quick Comparison

FeatureLine ArtMosaic
DNA typeBézier curve parametersCPPN (neural function network)
RenderingVector curves on canvasPer-pixel mathematical function
Visual styleFlowing, organic, geometric linesFractal-like, symmetric, dense patterns
Evolution speedFast — visible change Gen 1–5Slower — complexity builds over Gen 10+
Stagnation riskLowerHigher
Surprise potentialModerateHigh — stunning unexpected patterns

2. Line Art Mode: Bézier Curve DNA

In Line Art mode, each individual is defined by an array of parameters describing multiple Bézier curves:

Example DNA Array (simplified)

[0.23, 0.71, 0.45, 0.89, 0.12, 0.56, // curve 1 control points
 2.3, // stroke width
 0.8, 0.2, 1.0, 0.6, // RGBA start color
 0.1, 0.9, 0.5, 0.4, // RGBA end color
 ...]

Crossover mixes these parameters between parents, producing children with hybrid curve shapes and color combinations. The continuous, intuitive nature of these parameters means small mutations produce visually small changes — evolution is smooth and predictable.

3. Mosaic Mode: CPPN DNA

Mosaic mode uses a Compositional Pattern Producing Network (CPPN) — a mathematical function network that takes pixel coordinates (x, y) as input and outputs an RGBA color value. Every pixel on screen is computed by evaluating this function:

f(x, y) → (R, G, B, A)

Where f is a composition of:
sin(w₁·x + w₂·y + b₁) ·
tanh(w₃·sin(x) + w₄·cos(y) + b₂) ·
...

The DNA encodes the weights (w₁, w₂...), biases (b₁, b₂...), and the choice of activation functions (sin, cos, tanh, sigmoid) at each node in the network. The CPPN architecture is inspired by Stanley & Miikkulainen's 2007 research on Picbreeder.

Why Mosaic Patterns Are Naturally Symmetric

Many CPPN activation functions (particularly sin and cos) are symmetric or periodic. When applied to pixel coordinates, this naturally produces symmetric and tiling patterns — explaining why Mosaic art often looks crystalline or fractal.

4. Evolutionary Dynamics: Key Differences

Line Art Evolution

Mosaic Evolution

5. Which Should You Choose?

📚 References

  • Stanley, K.O. & Miikkulainen, R. (2007), Compositional Pattern Producing Networks, Genetic Programming and Evolvable Machines
  • Secretan, J. et al. (2011), Picbreeder: A Case Study in Collaborative Evolutionary Exploration of Design Space, Evolutionary Computation

Related Articles