Dapatkan array input
//Get input arrays
var x_values = document.getElementById('x_values').value.split(",").map(Number);
var y_values = document.getElementById('y_values').value.split(",").map(Number);
Clean Caterpillar