Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

# HOLI - Headless Organism Generator with Boolean Tunnels

![MORALU](examples/screenshots/ULTRA256v2_01_MORALU.png)

HOLI is a headless, randomized organism generator derived from LAJFI. Unlike the original evolutionary simulation, HOLI generates forms purely from random DNA with no mating, mutation, or selection. Each run produces unique organisms with through-tunnels created via CPU Boolean operations.

Designed for glass blowing: the tunnels are sized for blowing rods, and all meshes are manifold (watertight) for 3D printing and lost-PLA casting.

## Gallery

| MORALU | VAZI | MUPI |
|--------|------|------|
| ![MORALU](examples/screenshots/ULTRA256v2_01_MORALU.png) | ![VAZI](examples/screenshots/ULTRA256v2_01_VAZI.png) | ![MUPI](examples/screenshots/ULTRA256v2_03_MUPI.png) |

## What This Is

A headless Python script that:

1. Generates random DNA (Gielis superformula parameters)
2. Creates 3D voxel grids from the DNA
3. Converts to mesh via marching cubes
4. Bores through-tunnels using Boolean difference (manifold3d)
5. Applies Taubin smoothing
6. Exports watertight STL files

No GUI, no Blender, no evolution. Just pure random generation.

## Requirements

### System

- Python 3.10+
- Linux, macOS, or Windows
- 6 GB RAM (for 256 resolution)

### Dependencies

| Package | Version | Purpose |
|---------|---------|---------|
| numpy | >= 1.20 | Array operations |
| scipy | >= 1.7 | Morphological operations, smoothing |
| scikit-image | >= 0.19 | Marching cubes mesh extraction |
| trimesh | >= 3.9 | Mesh manipulation and STL export |
| manifold3d | >= 2.0 | CPU Boolean operations for tunnels |
| psutil | >= 5.8 | Memory monitoring |

Install all dependencies:

```bash
pip install numpy scipy scikit-image trimesh manifold3d psutil
```

## Quick Start

```bash
./run.sh
```

The script creates a virtual environment automatically and installs dependencies.

Or manually:

```bash
python3 -m venv venv
source venv/bin/activate
pip install numpy scipy scikit-image trimesh manifold3d psutil
python3 generate_5_ultra256_v2.py
```

Output appears in `output/` as `ULTRA256v2_*.stl` files.

## Technical Details

### Gielis Superformula

Each organism combines three Gielis supershapes with random parameters:

- **m**: Symmetry (3=clover, 14=star)
- **n1, n2, n3**: Curvature controls

The forms are merged, voxelized at 256^3 resolution, and converted to mesh.

### Boolean Tunnels

Tunnels are created using manifold3d (CPU-based):

1. Generate cylinder primitives
2. Boolean DIFFERENCE from organism body
3. Result: solid mesh with proper through-holes

This avoids GPU Boolean operations which can cause system instability.

### Why Headless?

The original LAJFI ran inside Blender with real-time evolution. HOLI strips away:

- Blender dependency
- Real-time simulation
- Mating and mutation
- Energy systems
- Combat mechanics

What remains: the Gielis DNA system and form generation, now running as a standalone Python script.

## Output

Generated organisms are exported as STL files:

- `ULTRA256v2_01_MORALU.stl`
- `ULTRA256v2_02_VAZI.stl`
- etc.

Each filename includes a procedurally generated name.

## Physical Materialization

The forms are designed for:

1. **3D Printing**: Direct FDM/PLA printing
2. **Lost-PLA Casting**: Print, create mold, burn out PLA, cast in aluminum or glass
3. **Hot Mold Glass Blowing**: Tunnels serve as openings for blowing rods

## Memory Usage

| Resolution | RAM Usage | Use Case |
|------------|-----------|----------|
| 64         | ~1 GB     | Testing  |
| 128        | ~2 GB     | Standard |
| 192        | ~4 GB     | High quality |
| 256        | ~6 GB     | Maximum detail |

## Configuration

Edit `holi/config.py`:

```python
MIN_FRACTAL_LEVELS = 2
MAX_FRACTAL_LEVELS = 2   # Max complexity
MIN_CHILDREN = 2         # Outgrowths per level
MAX_CHILDREN = 4
```

Or edit `generate_5_ultra256_v2.py` directly:

```python
RESOLUTION = 256    # Voxel grid size
NUM_ORGANISMS = 5   # How many to generate
```

## Project Context

This code is part of **Hard Copy**, a bachelor's thesis at Konstfack (University of Arts, Crafts and Design, Stockholm). The thesis explores authorship and agency in algorithmic art, investigating how creative agency is distributed between human intention, algorithmic process, and material resistance.

The generated forms are materialized through lost-PLA casting in glass, creating physical sculptures from procedural code.

## Related Projects

- [LAJFI](https://github.com/jinkieyz/lajfi) - The evolutionary simulation this is derived from

## License

MIT License

## Author

**Nadeschda Barenje**
Artist, developer, glass worker
Konstfack, Ceramics and Glass

About

Headless organism generator using Gielis superformula with Boolean tunnels for glass blowing

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages