Thanks for the functions, Matt.

After some debugging I got them and the rest of the code working:
```javascript
var scratch = new Cartographic();

    //Helper functions
    function readCoordinate(element) {
        var digits = element.textContent.trim().split(/[\s,\n]+/g);
        var cartographic = Cartographic.fromDegrees(digits[0], digits[1], parseFloat(digits[2]), scratch);
        return Ellipsoid.WGS84.cartographicToCartesian(cartographic);
    }

    function readCoordinates(element) {
        var digits = element.textContent.trim().split(/[\s,\n]+/g);
        var numberOfCoordinates = digits.length / 3;
        var result = new Array(numberOfCoordinates);
        var resultIndex = 0;
        var cartographic;
        for ( var i = 0; i < digits.length; i += 3) {
            cartographic = Cartographic.fromDegrees(parseFloat(digits[i]), parseFloat(digits[i+1]), parseFloat(digits[i+2]), scratch);
            result[resultIndex] = Ellipsoid.WGS84.cartographicToCartesian(cartographic);
            resultIndex++;
        }
        return result;
    }
```