golomb

Fractal design with Golomb rulers

https://github.com/ratwolfzero/golomb

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 6 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (7.8%) to scientific vocabulary

Keywords

fractal golomb golomb-fractal golomb-ruler unique-distances
Last synced: 6 months ago · JSON representation ·

Repository

Fractal design with Golomb rulers

Basic Info
Statistics
  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 1
Topics
fractal golomb golomb-fractal golomb-ruler unique-distances
Created 12 months ago · Last pushed 9 months ago
Metadata Files
Readme License Citation

README.md

Golomb Rulers: History and Purpose

Golomb rulers were invented by Solomon W. Golomb in the 1950s. They are sets of marks at integer positions along a ruler such that no two pairs of marks have the same distance. Originally studied in combinatorial mathematics, Golomb rulers have practical applications in:

  • Radio astronomy (minimizing interference in antenna arrays).
  • X-ray crystallography (improving measurement accuracy).
  • Error correction codes (helping with unique signal identification).

Golomb Ruler-Based Fractal Trees

DOI

This project introduces a novel algorithm for generating fractal tree structures based on Golomb ruler sequences. By utilizing the unique, non-repetitive intervals of Golomb rulers to define branch lengths and placement, the method creates structured yet non-uniform growth patterns that expand recursively with each depth level.

Two variants are availabe

  • Basic Variant: Uses a Golomb ruler to generate fractal-like trees by defining branch placement.

  • Enhanced Variant: Introduces dynamic branching angles, irregular growth, and glowing effects for a more visually striking and organic fractal.

Basic Variant: Structured Fractal Growth

  • The Golomb ruler defines branch placement, ensuring unique spacing.
  • Recursive depth levels expand the fractal tree.
  • Fixed branching angles (±30°) create a uniform structure.
  • Colors are assigned based on both angle and depth for clarity.

This approach blends combinatorial mathematics with fractal geometry, producing intricate branching structures.

Golomb

Enhanced Variant: Naturalistic Growth & Glowing Effects

  • Branching angles are dynamically adjusted based on Golomb mark values.
  • Variable branch lengths create a more organic feel.
  • Enhanced color mapping integrates depth, angle, and Golomb marks.
  • Dark background and semi-transparent lines introduce a glowing effect.

This enhanced version amplifies aesthetic appeal while maintaining the mathematical structure of Golomb-based fractals.

Golomb

How This Code Works

The code recursively generates a fractal tree-like structure using a Golomb ruler to determine branching points. Here’s how it works:

1. User Input

  • The user selects an N-value (defining the Golomb ruler) and a recursion depth.
  • Example: If N=5, the ruler {0, 1, 4, 9, 11} determines branch positions.

2. Recursive Fractal Growth

  • A stack-based iterative method (instead of recursion) prevents deep recursion issues.
  • The fractal starts at (0,0), growing upwards (π/2 radians).
  • Basic Variant: Each branch spawns two new branches at ±30° (π/6).
  • Enhanced Variant: Angles and lengths vary dynamically for a more natural look.

3. Color Assignment (Depth & Angle Blending)

  • Instead of using depth alone for coloring, it blends depth, angle, and Golomb mark values into a smooth gradient.
  • Formula:

python colors[line_count] = ((depth / max_depth) + (new_angle / (2 * np.pi)) + (mark / max(ruler))) % 1.0

  • The 'twilight' colormap ensures a visually appealing distribution.
  • The enhanced version incorporates glowing effects with semi-transparent lines.

4. Plotting the Fractal

  • The code uses Matplotlib to plot the computed line segments.
  • Dense regions become visually distinct due to the angle-depth-based color mapping.
  • The enhanced version features a dark background with glowing color effects.

Why Are These Approaches Interesting?

  • Golomb rulers provide a structured but non-uniform branching pattern → creating a unique fractal.
  • Color mapping by angle + depth + mark values makes dense areas visually interesting.
  • Iterative approach using a stack avoids recursion depth issues in Python.
  • The enhanced variant introduces more natural fractal growth and visually stunning effects.

This project demonstrates the intersection of mathematics, fractal geometry, and aesthetic visualization.

DOI

Owner

  • Login: ratwolfzero
  • Kind: user

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it using the following metadata."
title: "Fractal Tree based on Golomb Ruler Intervals"
version: 1.0.0
doi: 10.5281/zenodo.15490060
authors:
  - family-names: Becker
    given-names: Ralf
    affiliation: Independent researcher
date-released: 2025-05-22

GitHub Events

Total
  • Release event: 1
  • Watch event: 4
  • Push event: 12
  • Create event: 3
Last Year
  • Release event: 1
  • Watch event: 4
  • Push event: 12
  • Create event: 3

Issues and Pull Requests

Last synced: 11 months ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels