|
| 1 | ++++ |
| 2 | +date = '2026-02-27T19:30:06+02:00' |
| 3 | +draft = false |
| 4 | +title = 'Wavy Vector Field' |
| 5 | +description = '' |
| 6 | +thumbnail = '/images/wavyfield.gif' |
| 7 | +# showThumbnail = false |
| 8 | +tags = [] |
| 9 | +# coauthors = [ |
| 10 | +# { name = 'Jane Doe', link = 'mailto:jane@example.com' }, |
| 11 | +# ] |
| 12 | ++++ |
| 13 | + |
| 14 | +Firstly, we define a vector field each of its points depends on functions of its coordinates. |
| 15 | +So the two functions are $u,v : \mathbb R^2 \to \mathbb R$, such that |
| 16 | +$$u(x,y)=x+y, $$ $$ v(x,y)=\tan(x^2+y^2).$$ |
| 17 | + |
| 18 | +Our vector field function depends not only on the point but also on another parameter $t$ which we will use to mimic the animation, so |
| 19 | +$$f(x,y,t)=(u(x,y),t v(x,y))$$ |
| 20 | +However, we are not finished yet. |
| 21 | + |
| 22 | +We will stick each vector from the function at the point at which it's evaluated. This will be just a line starting from the point $(x,y)$ and ending at the point $(x,y)+f(x,y,t)$. |
| 23 | + |
| 24 | +But since I care about symmetry in my drawing, I put the negative side of the function to the point. So overall it will be a line starting from $(x,y)-f(x,y,t)$ and ending with $(x,y)+f(x,y,t)$. Explicitly, each line is defined as |
| 25 | +$$l(x,y,t)=\set{(1-a)\left((x,y)-f(x,y,t)\right)+a\left((x,y)+f(x,y,t)\right)\mid a \in [0,1]}$$ |
| 26 | + |
| 27 | +At the end the whole graph is |
| 28 | +$$G(t)=\bigcup_{(x,y)\in I}l(x,y,t)$$ |
| 29 | +where |
| 30 | +$I=\set{0.0075(x,y) \mid -\frac{80}{3}\le x,y \le\frac{80}{3},(x,y)\in \mathbb Z^2}$. |
| 31 | + |
| 32 | +This weird $0.0075$ is just for rescaling the grid. |
| 33 | + |
| 34 | +And the animated graph is done just by varying $t$ between -1 and 1. |
0 commit comments