bonnyfone / vectalign

Tool for create complex morphing animations using VectorDrawables (allows morphing between any pair of SVG images)
2.03k stars 160 forks source link

Request: put an executable ... #5

Closed AndroidDeveloperLB closed 8 years ago

AndroidDeveloperLB commented 8 years ago

so that all could run it without the need to compile it first.

bonnyfone commented 8 years ago

The project's README comes with a Download section which contains a direct download link to the latest available runnable jar.

AndroidDeveloperLB commented 8 years ago

@bonnyfone Odd. I didn't notice it. Thank you. Also, testing the jar file, I've noticed all "Alignment Strategy" items show an animation that makes the star to squeeze and lines to cross each other. Is there a way to customize it? In this example of star<->triangle, I would expect that even during morphing, the shape will not have crossing lines. I know you wrote that the result might not be nice, but maybe it's possible to put "pins" on the shapes, each with a number that tags them, so that each point would go to the corresponding one on the other shape?

bonnyfone commented 8 years ago

Yes that would be a super cool feature :) but it's completely infeasible using the current algorithm. As I wrote in the README, in order to achieve a working morphing on any pair of SVG images, the underlying problem as been relaxed and adapted to a simpler known problem: protein/nucleotide sequences alignment using Needleman-Wunsch algorithm. The price for this is a non predictable morphing. If you want to spend some time achieving better results, I suggest you to try altering the original SVGs (e.g. by semplifying paths) and vectalign them again.

For now, I don't plan to change the core algorithm in order to support this kind of control over the morphing effect (which would mean starting from scratch). Anyway, pull requests and ideas are always welcome ;)

AndroidDeveloperLB commented 8 years ago

Hmmmm... What if in the SVG editor, I create the paths, one after another, on both SVG files? For example, I create line#1 on both SVGs (different coordinates), and then line#2 , etc... Could I assume it to morph well? So that line#1 would move on SVG#1 to the coordinate of line#1 on SVG#2 ?

bonnyfone commented 8 years ago

Yes, it will. In this case, you won't need any vectalign at all since you are creating the same list of SVG commands on both images.

AndroidDeveloperLB commented 8 years ago

Nice. Do you know of any good free vector editing app (or website) ? Is it possible to also split a line into multiple lines, in case the number of the lines of the SVG files don't match? I think that if the splitting is done evenly, it might have good morphing, and avoid the need to plan the shapes with a strict number of lines from the beginning.

bonnyfone commented 8 years ago

Do you know of any good free vector editing app (or website) ?

I use InkScape.

Is it possible to also split a line into multiple lines, in case the number of the lines of the SVG files don't match? I think that if the splitting is done evenly, it might have good morphing, and avoid the need to plan the shapes with a strict number of lines from the beginning.

This is, more or less, what vectaling does.

AndroidDeveloperLB commented 8 years ago

And "vectaling " is available on InkScape ? Is it an automatic feature, or manual?