i did all this in GenExpr quite a while ago, so cannot vouch for it being any good, but maybe it will be useful to you as a start.
i put it in a demo patch for you (patch based on the [hilbert~] helpfile), attached.
C74 IN YOUR INBOX
C74 RSS Feed | © Copyright Cycling '74 | Terms & Conditions
Let us tell you about notable Max projects, obscure facts, and creative media artists of all kinds.