Animation of simple electric circuits

Dear Synfig community

I have been playing with Synfig for a few days now trying to create educational animations for simple electric circuits concepts.

As an example, I am trying to create an animation showing how a resistive network can be “reduced” using a sequence of series/parallel combinations.

So an animation might show a couple of resistors squished into each other and combining into a single equivalent resistor.

I have a vector image of a resistor. My question is: how do I draw “wires” connecting a bunch of these resistor images. I need to move the resistors around and ideally the wires should move with the resistors stretching and shrinking as needed like elastic cords.

I tried using the “Link to Spline” feature, but the spline linking breaks anytime I try to “move” a resistor image by applying a translation layer or by changing its “origin” parameter.

I found a rather clumsy workaround that I tried to upload here, but apparently as a new user I am not allowed to upload files… But I was wondering if there is an elegant way to do this (i.e. move image objects around while staying linked to a spline).

More generally, I’d welcome any advice on how to do this kind of circuit animation.


If you select the origin point of a Group layer and “Link (it) to spline”, you’re constraining where this origin can be placed: it should be “on” the spline, like described here and shown here for an animation example.

If I understand correctly, you’re trying to have a “connector” line (using the vocabulary of LibreOffice Draw/Impress, MS PowerPoint, MS Visio, Gnome Dia, and other tools used to diagrams).

If so, maybe you should draw the wires and link its ‘edge’ vertex to the ‘edge’ vertex of the resistor terminal. When you move that resistor terminal vertex, the wire vertex would be moved too.
However, it would not auto-move other wire vertices, unless you make you of valuenode conversion and exportation and connection.

Thanks for the response. I’ll try the “edge to edge” link that you suggested.

Just a point of clarification: I was not linking the origin point of a Group layer to a spline; instead I was linking a non-vertex point on another spline to a vertex on a spline. (I wish I could just upload the file…)

I’ve been playing with that sort of thing. Not sure of what your exact issue is, but take a look at this. The ‘amount’ field is converted to linear in two spots (location and rotation). I am able to loop this and move the corners around.

link-spline-move-corners.sifz (2.5 KB)

I have almost certainly misunderstood the question. My apologies if so. I think the problem comes in when you would like to animate several arrows using the ‘duplicate’ layer. What you need to do is introduce an ‘add’ layer in between the (two) places where you’re hooking the ‘spline-to-*’ and hook the other addend (the one which now reads zero) to the rest of whatever is controlling the moving elements.

…and again I failed to proofread. NOT an ‘add layer’ but a convert to the add function in the parameters box where you have to click the little triangle carrots to expand and see the tree of conversions. I’ve gummed this one up good, is you’re really a developer and I showed you an example indistinguishable from an old tutorial :slight_smile:

It’s quite confusing that sometimes you click the orange spots on your spline and it shows you different options at different times. The vectors on the vector list, iv you click all the way down to them are sometimes divided into their ‘composite’ form using a convert conversion. And sometimes not! So, if you don’t see the list of parameters you want when you right-click, then quick click ‘convert’ to ‘composite’, and then try again. You will get a different parameter list.

Thanks for sharing this. Not quite sure this is related to the problem I was having, but I’ll play with it some more (it seems like a variation on the standard tutorials for an arrow following a spline?).

At the risk of missing the mark again, try this example: I have linked the centers (offset of the main group transformation) of four groups to eack of four vector components of this short spline, by exporting the group offsets and then 'connect’ed from the appropriate spots in the vector list to these four values.

The user interface to do this is tricky for a beginner. If this hits the spot, I could elaborate in another post.

4resistors.sifz (3.7 KB)