Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added curtain pattern #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Added curtain pattern #17

wants to merge 1 commit into from

Conversation

lexbailey
Copy link

Hey. Dan from York Hackspace, The cube is awesome and I wanted to make a pattern for it. I have made "curtain". It's mostly just a big look up table and the colours aren't great but the animation looks okay. I might try and make the colour look better.

@pbrook
Copy link
Owner

pbrook commented Oct 5, 2014

Looks like it should be fairly simple to generate that pattern algorithmically?
Walk along a diagonal (i.e. incrementing both x any y), clamping actual coordinates to the limits of the cube.

I suggest using numpy arrays rather than building your own with nested lists (colormatrix in particular)

For sparse patterns like this it's more efficient to use cube.clear, and just populate the colored pixels.

The name in the comment at the top of the file doesn't match that used elsewhere :-)

self.filling_color looks like a copy/paste remnant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants