-
Notifications
You must be signed in to change notification settings - Fork 5
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
Example of DSim + Quil integration #6
Comments
Hi, A Then I hope it becomes more straightforward to imagine how to use it for drawing since this is just about managing state over time. There is nothing too specific about that state when it comes to drawing, akin to how Re-frame uses generic Clojure data structures for building UIs for instance. I know @flyingmachine has been grokking with animation but I don't know how far or how well that went :) |
My little dsim/d3 experiment went well! The animation was meant to show requests and responses for a collection of nodes in a server cluster. I used dsim to model request timelines, something along the lines of:
This dsim timeline would describe the location of each request in reference to time zero. To produce animations, however, I needed the duration of each message's trip between nodes; if msg5 is at n1 at t15 and n2 at t30, the duration is 15. That just required writing a little helper function to derive these values from the dsim timeline data. Hope this helps. |
Thanks! |
I've been trying to learn DSim to do animation using Quil. While going through the docs, there is a mention of Quil integration and how animation is one of the things DSim can help with:
Now, as a newbie there is quite a lot to grok in Dsim, and the docs show useful code snippets. However, it still is quite difficult to jump from an abstract concept to a simple toy example (might just be that I'm also quite new to Clojure). It would be great if there was one or several runnable examples available.
In particular, it could be really helpful to see a simple example of how exactly an animation can be done using DSim + Quil combination. Even just giving an actual runnable example from the docs:
The main issue I can see people like myself encountering is how DSim's
ctx
would play with Quil'sfun-mode
- and whether you even need it when one is using DSim.P.S. I watched the wonderful referenced animation, and am really excited to try using DSim for animation!
P.P.S. I understand that asking for examples and docs improvement can be a big ask for maintainers. If someone was able to provide some samples for Quil, I'd be happy to turn them into a runnable example as a PR.
The text was updated successfully, but these errors were encountered: