addPerson2 = () => {
let bodyweight = d3.select(svg2).select("#bodyweight").property("value");
let benchpress = d3.select(svg2).select("#benchpress").property("value");
let squat = d3.select(svg2).select("#squat").property("value");
let deadlift = d3.select(svg2).select("#deadlift").property("value");
let selectedGender = document.querySelector('input[name="gender"]:checked').value;
let bodyweightkg = bodyweight/2.2046
let benchpresskg = benchpress/2.2046
let squatkg = squat/2.2046
let deadliftkg = deadlift/2.2046
let Calcdots;
if (selectedGender === "male") {
Calcdots = (benchpresskg + squatkg + deadliftkg) * (500 / (-307.75076 + 24.0900756 * bodyweightkg - 0.1918759221 * Math.pow(bodyweightkg, 2) + 0.0007391293 * Math.pow(bodyweightkg, 3) - 0.000001093 * Math.pow(bodyweightkg, 4)));
} else {
Calcdots = (benchpresskg + squatkg + deadliftkg) * (500 / (-57.96288 + 13.6175032 * bodyweightkg - 0.1126655495 * Math.pow(bodyweightkg, 2) + 0.0005158568 * Math.pow(bodyweightkg, 3) - 0.0000010706 * Math.pow(bodyweightkg, 4)));;
}
mutable log = Calcdots;
d3.select(svg2).select("#DOTScircles2")
.append("circle")
.attr("cx", 360)
.attr("cy", 439)
.attr("r", 5)
.style("fill", "#50BF61")
.attr("transform", "rotate(0 360,439)")
.transition().duration(1000)
.attr("cy", scaleDOTS(Calcdots))
.transition().duration(1000)
.attr("transform", "rotate(" + (-90 + Math.random()*180) + " 360,439)");
}