How to create a curved SVG path between two points?

I need to draw a symmetrically curved line between the centers of two circles.

    <circle class="spot" id="au" cx="1680" cy="700" r="0"></circle>
    <circle class="spot" id="sl" cx="1425" cy="525" r="0"></circle>

    <line id="line1" stroke-width="2" stroke="red"/>

This is the code I wrote so far. < line > element should be replaced with a curved path.

function drawNow() {
    let point1X = document.getElementById("au").getAttribute("cx");
    let point1Y = document.getElementById("au").getAttribute("cy");
    let point2X = document.getElementById("sl").getAttribute("cx");
    let point2Y = document.getElementById("sl").getAttribute("cy");

    let line1 = document.getElementById("line1");
    line1.setAttribute("x1", point1X);
    line1.setAttribute("y1", point1Y);
    line1.setAttribute("x2", point2X);
    line1.setAttribute("y2", point2Y);

124 thoughts on “How to create a curved SVG path between two points?”

  1. Definitely imagine that which you stated. Your favorite reason seemed to be
    on the net the simplest factor to keep in mind of. I say to you, I
    certainly get annoyed even as folks think about worries that they just do
    not recognize about. You controlled to hit the nail upon the highest and defined
    out the entire thing without having side-effects , folks could take a signal.
    Will probably be again to get more. Thank you

  2. Undeniably imagine that that you said. Your favorite justification seemed to be on the web the simplest factor to consider of.
    I say to you, I definitely get irked whilst other people consider
    issues that they just don’t know about. You controlled to hit
    the nail upon the highest and also defined out the whole thing without having
    side-effects , people can take a signal. Will likely be again to get more.
    Thank you

  3. Hello I am so delighted I found your website, I really found you
    by error, while I was browsing on Digg for something else, Anyways I am here now and
    would just like to say cheers for a tremendous post and a all round entertaining blog
    (I also love the theme/design), I don’t have time to browse it all at the minute but I have saved it
    and also included your RSS feeds, so when I have time I will
    be back to read a lot more, Please do keep up the fantastic