geometry-marching-cubes

Extract smooth isosurfaces from 3D scalar fields using Marching Cubes.

Updated Apr 21, 2026
One-click install
npx skills add https://github.com/gregoryraymond/claude-agents-and-skills --skill geometry-marching-cubes
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: geometry-marching-cubes
Source: https://github.com/gregoryraymond/claude-agents-and-skills/tree/main/skills/geometry-marching-cubes
Command: npx skills add https://github.com/gregoryraymond/claude-agents-and-skills --skill geometry-marching-cubes

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Marching Cubes provides a way to extract a polygonal isosurface from a 3D scalar field, enabling terrain and coastline meshes that smoothly follow the underlying data instead of grid-boundary staircases.

Core Features & Use Cases

  • 256-case lookup-based isosurface extraction with deterministic triangulation.
  • supports Marching Cubes, Marching Cubes 33, and TransVoxel style LOD stitching for seamless boundaries.
  • applies to heightmaps and volumetric terrain to generate watertight coastline and terrain surfaces.
  • includes edge interpolation to place vertices along the isosurface for smooth results.

Quick Start

Provide a 3D scalar grid and an isovalue, then run the marching cubes routine to generate a triangle mesh.

Frequently Asked Questions about geometry-marching-cubes

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate smooth terrain meshes from a 3D scalar field instead of blocky voxels?

Marching Cubes extracts a polygonal isosurface from a 3D scalar field using 256-case lookup tables and edge interpolation, producing smooth terrain meshes that follow underlying density data rather than grid-boundary staircases.

Can I extract watertight coastlines from heightmaps using isosurface algorithms?

Yes, you can extract watertight coastlines from heightmaps by applying Marching Cubes to volumetric terrain grids, using linear interpolation on intersected edges to accurately place vertices along the isosurface boundary.

How do I fix cracks between different LOD chunks in volumetric terrain generation?

TransVoxel LOD stitching seamlessly stitches boundaries between varying grid resolutions in volumetric terrain generation, preventing cracks by adjusting triangulation along chunk edges to maintain a watertight mesh.

What is the best way to extract an isosurface from a density grid for coastline reconstruction?

The best way to extract an isosurface from a density grid is using Marching Cubes with precomputed edge and triangle lookup tables, enabling deterministic triangulation and robust mesh assembly for smooth coastline reconstruction.

Do I need precomputed lookup tables to run Marching Cubes on a scalar field?

Yes, Marching Cubes requires precomputed edge and triangle lookup tables to determine how the isosurface intersects each grid cell, ensuring deterministic triangulation and watertight mesh output from the 3D scalar field.

Does Marching Cubes 33 produce better isosurface extraction results than standard Marching Cubes?

Marching Cubes 33 resolves ambiguous cases in isosurface extraction that standard Marching Cubes cannot, providing more topologically consistent and watertight mesh output when reconstructing complex volumetric surfaces from scalar fields.