How can I make a heart-shaped vector field emanating from a circle?

413 Views Asked by At

How can I make a heart shaped vector field like the image below, the lines getting progressively straighter as they approach the x's center and y's max on the bottom of the circle and if the x = 0 and the y = 1 the curves are the curviest? enter image description here

1

There are 1 best solutions below

3
On BEST ANSWER

First I think you should check this one out.

No but seriously, you can probably pose this as a differential equation with boundary conditions or an energy minimization. The boundary being the circle where points "outwards" at each point and outside the gradient should be minimized as well as increasing positive cost for absolute values of x:es for the vector field to deviate from [0,-1].

$$\min(v)\{|x|\cdot\|v-[0,-1]^t\| + \|\nabla v\| + c \|v-d\| \}$$

Where $v$ is the vector field we want to calculate, $c$ is the boundary mask for circle, $d$ is the vector pointing outwards at every point (radial vector). We may need to multiply with weights to get a good shape, I.e. noice curvature as compared to circle radius.