
splat
Splat 是一个基于 Scenic 和 Elixir 的生成艺术程序,每次运行都会创建独特的贝塞尔曲线艺术作品。
Repository Info
About This Server
Splat 是一个基于 Scenic 和 Elixir 的生成艺术程序,每次运行都会创建独特的贝塞尔曲线艺术作品。
Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.
Documentation
Splat
Splat is a generative art program built with Scenic and Elixir. Each time you run it, it creates a unique piece of art featuring flowing bezier curves with colorful triangles.
Quick Start
Running the Application
mix deps.get
mix run --no-halt
A window will appear displaying generative artwork. Click the blue circular button in the top-right corner to generate new artwork.
Using the MCP Server
The included MCP (Model Context Protocol) server allows external control of the Splat application:
cd mcp-server
npm install
npm start
Available MCP tools:
start_splat- Launch the Splat applicationstop_splat- Stop the running applicationcheck_splat_status- Check if application is runninggenerate_new_artwork- Get instructions for generating new artworkget_splat_info- Get detailed application information
Features
- Generative bezier curve art with mathematical precision
- Random triangles along curves with rotation and scaling
- Unique artwork every run with proper random seeding
- Interactive redraw button for new artwork generation
- Cross-platform with Scenic framework
- MCP server for external control and integration
Technical Details
Architecture
- Framework: Scenic (Elixir graphics framework)
- Graphics Driver: scenic_driver_local (OpenGL backend)
- Canvas Size: 800x600 pixels
- Input Handling: Mouse click detection for interactive button
Art Generation
- Curves: 5-8 cubic bezier curves per artwork
- Mathematics: Parametric bezier curve calculation with proper control points
- Triangles: 3-7 triangles placed along each curve with random rotation
- Colors: Mix of named colors (:red, :blue, etc.) and RGB tuples
- Randomization: Proper seeding for unique artwork on each generation
Interactive Controls
- Redraw Button: Blue circular button (25px radius) in top-right corner
- Click Detection: Distance-based collision detection for button interaction
- Visual Feedback: Console logging for successful button interactions
Development
Building a Release
For production deployment:
MIX_ENV=prod mix deps.get
MIX_ENV=prod mix compile
MIX_ENV=prod mix release
The release will be created at _build/prod/rel/splat/bin/splat.
Project Structure
splat/
├── lib/splat/
│ ├── application.ex # OTP application setup
│ └── scene.ex # Main scene with artwork generation
├── config/
│ └── config.exs # Scenic viewport configuration
├── mcp-server/ # MCP server for external control
│ ├── src/index.js # MCP server implementation
│ └── package.json # Node.js dependencies
├── mix.exs # Elixir project configuration
└── README.md # This file
Key Functions
create_artwork_graph/0- Builds the complete scene graphgenerate_artwork/1- Creates multiple random bezier curvesdraw_random_bezier_with_triangles/1- Draws a single curve with trianglesbezier_point/5- Calculates points along a cubic bezier curvedraw_triangle_at_point/5- Renders rotated triangles at curve positionshandle_input/3- Processes mouse clicks for button interaction
Installation
Prerequisites
- Elixir 1.18+ with OTP 27+
- Node.js 18+ (for MCP server)
- OpenGL-capable graphics driver
macOS Installation
# Install Elixir via Homebrew
brew install elixir
# Clone and setup
git clone <repository>
cd splat
mix deps.get
# For MCP server
cd mcp-server
npm install
Running
# Development mode
mix run --no-halt
# With MCP server
cd mcp-server && npm start
The application window will display colorful bezier curves with triangles. Each run generates completely unique artwork using mathematical randomization.
Quick Start
Clone the repository
git clone https://github.com/notactuallytreyanastasio/splatInstall dependencies
cd splat
npm installFollow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Recommended MCP Servers
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
Zapier MCP
A Zapier server that provides automation capabilities for various apps.