/metal-metaballs

A 'playground' project for rendering metaball-like graphics in metal.

Primary LanguageSwift

Example Animation

Metal Metaballs

Metal Metaballs is a framework for rendering graphs in an aesthetically pleasing way. It uses an adapted version of metaball math to create fluid graphics, allow vertices to merge with each other and allow edges to flow and animate smoothly.

Vertices and edges may be added and removed at will and can interact with gestures. Rendering a fullscreen view continuously uses only about 19% of the CPU at 60 fps, though normally the view will only be updated when needed. All rendering is done in a background thread, so the main thread remains almost completely free. These measurements were done using an iPhone 6S Plus (which has more pixels to calculate but more power to do so), so YMMV.

This framework is being developed to make me learn several different design patters, APIs and features used in iOS and in graphics applications. So far, it uses:

Installation

Just download the app and run it on your metal-enabled device of choice :)