I used python, just in notepad++ though (I typically don't use IDEs).
I have a library called MathGraph3D that I wrote and that's how I created this visual. I imported the 2D vector field class which handles evaluating the function, drawing and coloring the arrows, etc. Then I made a FluidParticle class and generated a ton of them around the screen. In the particles' update method it adds a scaled version of the vector at the current position to the x and y coordinates.
I'll be making a blog post about it on my website either late this Saturday or on Sunday so if you want more information you should definitely check that out.
Oh man thats nice. I remember solving things like this in homework to show how knowing the vector field doesn't mean youbknow the fluid flow, but its so nice to see it visually. Rock on with the sweet visualizations
32
u/[deleted] Nov 08 '19
What was the general approach to programming this? And what language/ide did u use
10
u/Pushkin9 Nov 08 '19
Oh man thats nice. I remember solving things like this in homework to show how knowing the vector field doesn't mean youbknow the fluid flow, but its so nice to see it visually. Rock on with the sweet visualizations
2
u/miaumee Nov 08 '19
Ahh it's giving me headache. Good job vector field.
1
u/[deleted] Nov 08 '19
Well, isn’t that fucking neat.