How to make a 2D toy example like this?

Hello everyone!
I want to make a 2D toy example like this

2D toy example video
image

This problem is maximize the cosine similarity between two vectors.
image

Then the optimal vector is w* or cw*. (c > 0)
I want to make this example using Adam or SGD and plot the results like that video.

So, how to build the example??