# How to draw smooth ringing diminishing sine wave in Inkscape

I want to draw a voltage spike and ringing. It normally looks like this (the red path):

I know I would most likely need to start by drawing a base line and then use the nodes to adjust it.

So I selected some nodes in the line and used the " make selected nodes smooth"... but it is utterly difficult to adjust it to look like a sine wave:

I think I just do not know how to do it properly. Can you please tell me what tools and process I need to go through to achive a waveform that is clean like the original above?

• You expect the ringing frequency grows higher as the amplitude decays. It's possible only in very complex systems. Usually the ringing amplitude only decays to certain percentage during every oscillation period, but the period stays constant. Jun 17, 2023 at 3:12
• @kexxgem Well that is true but my question is how I can draw a clean waveform. The one I draw is very smooth and does not look good Jun 17, 2023 at 7:53
• I write an answer. Jun 17, 2023 at 8:45
• @kexxgem would be very appreciated :) Jun 17, 2023 at 8:48

Use Extension > Render > Function plotter to draw the ringing. If you can program python you can draw the whole step response as a script. I make only the ringing with the function plotter and extend it manually.

Here's a rectangle in the left. It's duplicated to the right. The duplicate is selected and the function plotting extension is used:

It contains 600 simple curve segments joined together. Nothing less does look good. If there's a good reason, for ex. to prevent the program slowdown, you can simplify it. Path > Simplify makes it this simple:

It's probably still good enough for illustration purposes. In the next image there's inserted to the left a starting step with the Bezier curve tool a.k.a. "the pen". In the right the ending node is simply moved rightwards:

The right end can be extended smoothly as soon as the oscillation amplitude is decayed to smaller than the used line width. The left end extension needs some care to avoid any obtrusive irregularity. I had to adjust the starting node bezier handle.

Your example is complex. I drew a more common constant frequency exponential decay ringing which needs only a second order linear system to occur. Here's an example of changing frequency:

.

No idea of an electric circuit or mechanism which might generate this ringing (except a computer).

If it must be a drawing, not a plotted formula:

Draw with the pen a zigzag between separately drawn guides (red). The pen is in BSpline-mode. Essentially this is just the same set of clicks as what's needed to draw your "base line". Only set at first the pen to BSpline mode in the info line.

It's easier to keep the horizontal period if there's also some equal boxes (green) drawn before making the spline. Or alternatively draw on the grid:

This is good enough for illustrations only. It's practically impossible to draw any numerically known decay in this way.

• Thanks a ton! I learnt a lot Jun 19, 2023 at 20:58