var finishMessage = '';
    var showInterval = false;
    var showPhase = 1;
    var amountOfNodes = 25;

    function destroy() {
      if (network !== null) {
        network.destroy();
        network = null;
      }
    }

    function updateValues() {
      offsetx = parseInt(document.getElementById('offsetx').value);
      offsety = parseInt(document.getElementById('offsety').value);
      duration = parseInt(document.getElementById('duration').value);
      scale = parseFloat(document.getElementById(