How to animate a path in svg?

All the questions are duplicates which are in the Toaster I looked , there is implementation but no explanation !
I ready-made solution is not necessary and it is necessary to understand : How is animation SVG
For example , on many websites (no examples as seen not often ) there are some buns , like on click/hover there is a change of the contour of SVG , let's just SAY there was a triangle and on any event ... even spontaneous changes this triangle in a circle , or a star in the book ,
Here is a small example on SVG SMIL where I transform from a controlled design in a square ,and if of the circle to make the rect that I don't get what and how to do , explain pliz ...
June 14th 19 at 18:57
1 answer
June 14th 19 at 18:59
as a General principle, apply the reference point of the animation... i.e. to turn the star into a book - draw Swede and a book... here's an example - there is one set of points and move them just

but! the theme is quite clever and so easy IMHO not explain that article - there are many code examples...

here is an example of transformation - there JS off inserting GIF'a and slow the animation, <animate dur="xxx"></animate> 'll see...

Find more questions by tags SVG