Code Monkey home page Code Monkey logo

recursive-geometry's Introduction

Recursive Geometry

This program generates geometry and recursively subdivides it into triangles. It doesn't really do anything useful, it just looks pretty. Run it on a big screen, use it as screen saver, do whatever you want.

It's written in Rust and uses the glium library for drawing to the screen.

Right now the subdivision process is a little slow, I tried parallelizing it to no avail. See this function, let me know if you have ideas on how to speed it up.

Demonstration

Here's what it looks like starting with a triangle and a hexagon:

Here's a video of it in action.

Controls

Key Action
Esc Quit
Space Generate new geometry based on the current one
1 Generate a single triangle
2 Generate a square consisting of two triangles
3-9 Generate a regular polygon with the given amount of edges, in the form of a triangle fan

Running

Download it here. Windows & Linux only for now, but you can build it yourself to run it on macOS, see below.

It requires a modern GPU supporting at least OpenGL 3.1.

Compilation

To build it yourself, install rustup, then clone the repository and run cargo run --release in the recursive-geometry folder.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.