- Amiya's personal website - http://aptnk.in -

PhD Nerds – First Crush

Everyone has a first crush...
Sometimes its the next door neighborer's cute daughter at other times it is some famous singer or actress. Geek or not one thing that happens when you see your crush pass by is that your heart goes...

[4]

First Crush

The function x^2 + (y-\sqrt[4]{x})^2 = 2+sin(t)  plot looks like this:

[5]

This is how the plot looks

For those who have access to Matlab check out the function for yourself:

  1. % My Heart Goes Animation
  2. % (c)-aptnk.in
  3.  
  4. function frames = myHeartGoes
  5. % Define number of frames
  6. nr_fr = 12;
  7. % Initialize matrix using 'moviein'
  8. frames = moviein(nr_fr);
  9.  
  10. % Generate frames with easy plotting function.
  11. for i [6] = 1 : nr_fr
  12. ezplot [7](['(x^2+(y-x^(1/4))^2)-',num2str [8](2+sin [9](i [6]))],[-2.5,3]);
  13. title [10]('My Heart Goes...')
  14. % Get every frame with 'getframe' and load the appropriate matrix.
  15. frames(:, i [6]) = getframe;
  16. end
  17. movie(frames,10);
Related Posts Plugin for WordPress, Blogger... [11]