Skip to content

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