Command Palette

Search for a command to run...

UnylyUnyly
Весь каталог

Hexalate

БесплатноНе проверен

MCP server for hexalate — hexagonal tessellation tools for AI assistants

GitHubEmbed

Описание

MCP server for hexalate — hexagonal tessellation tools for AI assistants

README

A Python library for generating hexagonal tessellations with support for axial coordinates, colormap plotting, GeoJSON export, and more.

Installation

pip install hexalate

Quick Start

import hexalate as hx

grid = hx.HexGrid(width=10, height=8, hex_size=0.5)
grid.plot()

HexGrid

The main class. Creates a grid that fills a rectangular area.

grid = hx.HexGrid(
    width=10,
    height=8,
    hex_size=0.5,
    orientation="pointy",   # "pointy" (default) or "flat" top
)

Orientation

pointy = hx.HexGrid(10, 8, 0.5, orientation="pointy")  # ⬡ pointy top (default)
flat   = hx.HexGrid(10, 8, 0.5, orientation="flat")    # ⬡ flat top

Iterating and accessing hexagons

for h in grid:
    print(h.x, h.y, h.q, h.r)   # Cartesian center + axial coords

# Access by axial coordinates
h = grid.get(q=0, r=0)

# Get all 6 existing neighbors
neighbors = grid.neighbors(q=0, r=0)

Hexagon properties

Each Hexagon dataclass exposes:

Attribute Type Description
x, y float Cartesian center
q, r int Axial coordinates
s int Third cube coordinate (-q - r)
coords list 7 (x, y) vertex tuples
h = grid.get(2, 3)
print(h.s)                       # cube coordinate
print(h.distance_to(grid.get(0, 0)))  # hex distance
print(h.neighbor_coords())       # list of (q, r) neighbor positions

Plotting

# Basic
grid.plot()

# With a colormap driven by per-hex values
import random
values = [random.random() for _ in grid]
grid.plot(values=values, colormap="plasma")

# Save to file instead of showing
grid.plot(output="grid.png", dpi=200)
grid.plot(values=values, colormap="viridis", output="heatmap.svg")

# Convenience shortcut
grid.save_to_file("grid.png", dpi=150)

Export

# Pandas DataFrame (requires pandas)
df = grid.to_dataframe()
# columns: x, y, q, r

# GeoJSON
geojson = grid.to_geojson()   # dict
grid.save_geojson("grid.geojson")

# Backward-compatible list of dicts
data = grid.to_list()
# keys: x, y, q, r, coords

Module-level functions (v0.1 / v0.2 compatible)

The original API still works:

tessellation = hx.create_hexagonal_tessellation(width=10, height=5, hex_size=0.5)
hx.plot_hexagonal_tessellation(tessellation)

# With colormap
import random
values = [random.random() for _ in tessellation]
hx.plot_hexagonal_tessellation(tessellation, colormap="coolwarm", values=values)

# Save to file
hx.plot_hexagonal_tessellation(tessellation, output="grid.png")

Single hexagon

vertices = hx.hexagon(x_center=0.0, y_center=0.0, size=1.0)              # pointy
vertices = hx.hexagon(x_center=0.0, y_center=0.0, size=1.0, orientation="flat")

Returns a list of 7 (x, y) tuples (closed polygon).

Examples

Ready-to-run recipes in the examples/ folder:

File What it shows
distance_rings.py Concentric color rings radiating from the center hex using cube-distance
wave_heatmap.py sin × cos function mapped over the grid — drop in any real data
game_board.py Catan-style island board with terrain types and a flat-top orientation
checkerboard.py 3-color tiling via axial coords (q mod 3) — no adjacency checks needed
geojson_export.py Export full grid + distance-filtered zone to GeoJSON for QGIS / kepler.gl
dataframe_analysis.py Attach custom metrics in pandas, filter to inner rings, re-plot the subset
cd examples
python distance_rings.py     # → distance_rings.png
python wave_heatmap.py       # → wave_heatmap.png
python game_board.py         # → game_board.png
python checkerboard.py       # → checkerboard.png
python geojson_export.py     # → full_grid.geojson, center_zone.geojson
python dataframe_analysis.py # → dataframe_analysis.png (requires pandas)

Command Line

# Display
hexalate --width 10 --height 8 --size 0.5

# Flat-top orientation
hexalate --width 10 --height 8 --size 0.5 --orientation flat

# Random colormap coloring
hexalate --width 10 --height 8 --size 0.5 --colormap plasma

# Save to file
hexalate --width 10 --height 8 --size 0.5 --output grid.png
hexalate --width 10 --height 8 --size 0.5 --colormap viridis --output heatmap.svg

License

MIT License.

from github.com/james-see/hexalate

Установка Hexalate

У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.

▸ github.com/james-see/hexalate

FAQ

Hexalate MCP бесплатный?

Да, Hexalate MCP бесплатный — установка в пару кликов через Unyly без оплаты.

Нужен ли API-ключ для Hexalate?

Нет, Hexalate работает без API-ключей и переменных окружения.

Hexalate — hosted или self-hosted?

Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.

Как установить Hexalate в Claude Desktop, Claude Code или Cursor?

Открой Hexalate на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.

Похожие MCP

Fetch

Web content fetching and conversion for efficient LLM usage.

автор: Community

Roblox Studio

Enables AI coding tools to control Roblox Studio for workspace exploration, instance manipulation, and script management. It provides tools for playtesting, sce

paralovавтор: paralov

Opencode Omniroute Plugin

OpenCode plugin for the OmniRoute AI Gateway. Drives dynamic model discovery, /connect auth flow, and multi-instance OmniRoute providers via the official @openc

GitHub Actionsавтор: GitHub Actions

AWS KB Retrieval

Retrieval from AWS Knowledge Base using Bedrock Agent Runtime.

modelcontextprotocolавтор: modelcontextprotocol

Spring AI MCP Server

Provides auto-configuration for setting up an MCP server in Spring Boot applications.

автор: Community

llm-analysis-assistant

A very streamlined mcp client that supports calling and monitoring stdio/sse/streamableHttp, and can also view request responses through the /logs page. It also

xuzexin-hzавтор: xuzexin-hz

MCP-Agent

A simple, composable framework to build agents using Model Context Protocol by [LastMile AI](https://www.lastmileai.dev)

lastmile-aiавтор: lastmile-ai

Spring AI MCP Client

Provides auto-configuration for MCP client functionality in Spring Boot applications.

автор: Community

mcp.natoma.ai

A Hosted MCP Platform to discover, install, manage and deploy MCP servers by [Natoma Labs](https://www.natoma.ai)

автор: Community

MCPHub

Website to list high quality MCP servers and reviews by real users. Also provide online chatbot for popular LLM models with MCP server support.

автор: Community

Compare Hexalate with

Не уверен что выбрать?

Найди свой стек за 60 секунд

Автор?

Embed-бейдж для README

Похожее

Все в категории ai