function polarToCartesianActual(polarcoords) {
    var cartesianCoords = [];
    var radius = polarcoords[0];
    var theta = polarcoords[1]; //in degrees
    var phi = polarcoords[2]; // in degrees

    var x = Math.abs(radius * Math.sin(phi * Math.PI / 180)) * Math.cos(theta * Math.PI/180);
    var y = radius * Math.cos(phi * Math.PI / 180);
    var z = Math.abs(radius * Math.sin(phi * Math.PI / 180)) * Math.sin(theta * Math.PI/180);
    cartesianCoords.push(x);
    cartesianCoords.push(y);
    cartesianCoords.push(z);
    return cartesianCoords;
}
Convert the given polar coords of the form [r, theta, phi] to cartesian
coordinates following the proper mathematical notation (from the zeros of
each axis)

r - radius of the line
theta - the xz-plane angle starting from x = 0 degrees
phi - the yz-plane angle starting from y = 0 degrees