I somehow came across this beautiful visualization of strange attractors written in Three.js. Then I remembered VisPy , a scientific visualization package in Python that I heard of in context of Vedo . We use Vedo for visualization at the Thousand Brains Project , so I decided to poke around the VisPy API and write some code without using LLM.1
VisPy has an “imperative” feel that I quite like. I’ll probably try to do a longer write-up on things I’ve learned from various visualization packages I’ve used in Python (e.g. matplotlib, seaborn, altair, plotnine, things built-in to pandas, etc.) over the years.
How I made the above gif:
- Generated 10,000 points in 3D.
- For the animation, it’s actually just updating the Canvas with some starting index and “length” of the points I want to show.
- The camera is a TurnTable camera that also gets updated, i.e.
view.camera.azimuth += 0.2in every Canvas update. - Saved every 10 frames as gif using
imageio.
For my next steps, I’m interested in taking a look at the Allen Mouse Brain example with Datoviz.
I’ve been taking a little break from using LLMs in my work from fear of cognitive debt . Though I probably cannot be on this “break” forever, so far it’s been quite more enjoyable than expected and satisfying to code. ↩︎