Add matrix support
Add the ability to have a rectangular matrix of pixels and support this natively.
In multipin multiple strips will be available as well as single strip
Matrix support need to support (at minimum):
- RC, CR order
- 3 dimensional matrices
- Take single strip and split into a matrix NxM (eg 1x25 single strip can become 5x5 square)
Take single strip and split into a matrix NxM (eg 1x25 single strip can become 5x5 square)
This is exactly what I came here to find out if this library can do. I know its been a few years now, do we foresee this ever actually happening?
Unfortunately my time is pretty limited at the moment but PRs are gratefully received. I can help guide you through what's needed to be done too.
On Thu, Aug 16, 2018, 04:05 Victorio Berra [email protected] wrote:
Take single strip and split into a matrix NxM (eg 1x25 single strip can become 5x5 square)
This is exactly what I came here to find out if this library can do. I know its been a few years now, do we foresee this ever actually happening?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ajfisher/node-pixel/issues/20#issuecomment-413283622, or mute the thread https://github.com/notifications/unsubscribe-auth/AAHRowfiyIRUcxpUxSHsXTnUwuW4DEIEks5uRGLcgaJpZM4EnR00 .
What is rc, cr order?
Row-column or column-row order. It's used to designate how you apply a 2D matrix to a 1D array.
On Wed, Dec 12, 2018, 08:22 jakepearse [email protected] wrote:
What is rc, cr order?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ajfisher/node-pixel/issues/20#issuecomment-446366895, or mute the thread https://github.com/notifications/unsubscribe-auth/AAHRo8pYG_wOXco2UjsCHzFe_llBEomNks5u4CIngaJpZM4EnR00 .
My son and I have been playing with this requirement. Rather than messing about with a bunch of arrays, we used functions to re-map the addresses of pixels in a serpentine array. Because node-pixel uses functions for addressing rather than presenting strips as 'array-like'. It wouldn't take much to add cr/rc functionality, I guess. Although it would perhaps add the need for an argument/options style object, using minor/major axis rather than column/row. Which would probably better than a bunch of unnamed positional arguments the way we did it. Anyway its all in a nice-and-small PR :)