Hi all - this is Vector Toy, a side project I've been working on for a couple weeks: http://dandelany.github.io/vector-toy. Inspired by the famous Nullschool Earth wind map, I wanted to implement the same style of visualization for arbitrary 2D vector field functions, and to do so in a way that allows you to experiment with the functions direct-manipulation-style in the browser. So by changing the functions in the text boxes on the left, you can generate pretty much any vector field you can think of! Hope you enjoy playing with it as much as I do
- High-quality renders can be made by setting Fade to zero, # of Particles to a high number, and Line Width to a low number.
- Add interactivity easily by using the globals `mouseX` and `mouseY` in the vector functions, which represent the mouse cursor's current X and Y coordinates in the *field's* coordinate system (not pixel coords).
- The URL contains all of your settings, so you can share what you make by using the built-in link shortener at the top. Note that these links allow execution of arbitrary JS, so be aware that links from others may crash your tab or redirect you somewhere else. Never host this code on a domain where XSRF-style attack could be a concern.
- Some challenges, for the adventurous... Try to make a human face or figure, a Starry Night styled sky, or a realistic cross section of a fruit. Then send it to me so I can include it as one of the default presets, since I failed to make them myself
Have fun, and please post links here if you make any cool ones! I will add the best ones to the list of presets which are showed randomly on first page load. Thanks!
dandelany fucked around with this message at Feb 19, 2016 around 19:29
|# ? Feb 19, 2016 18:58|
|# ? May 26, 2019 07:38|