Giter VIP home page Giter VIP logo

pycubedemo's Introduction

3D cube demo patterns

Supports both an internal OpenGL renderer, and driving an external LED cube.

Requires numpy (python-numpy pakcage on Debian-like systems).

The OpenGL renderer requires pygame and pyOpenGL (python-pygame/python-opengl)

The default target is the the OpenGL renderer, and will cycle through all patterns in a random order.
You can connect to to an external cube/simulator with --port hostname:portnum

A particular [set of] pattern(s) can be selected with the --pattern commandline option.

New patterns can be added by by placing a new python file in the patterns/
directory, which implements the 'Pattern' class.  The 'init' function is
called when the pattern is started. It should return the delay between frames.
For every frame the 'tick' functin is called.

The image is set using self.cube.clear and self.cube.set_pixel. To avoid
flickering, double buffering can be enabled with self.double_buffer = True.

The easiest way to get started is to copy and modify and existing pattern.
fade and wave are probably good starting points.

Installing pygame on a Mac is apparently much harder than it should be.
Mac users may be interested in the node/webgl cube emulator at
https://github.com/ultrafez/ledcube-webgl

pycubedemo's People

Contributors

pbrook avatar johnl avatar imartyn avatar ultrafez avatar

Watchers

James Cloos avatar

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.