I am unable to migrate a call to Cesium.Shapes.computeCircleBoundary to get boundary points on a circle using the CircleOutlineGeometry (b29).
Objective: To get N distinct points R radians/D Degrees offset from each other, e.g 4 points on a circle boundary 90 degrees offset from each other. The same applies for points on an ellipse only the points might be at the semi-minor/major/ellipse boundaries.
Previously I would call;
Cesium.Shapes.computeCircleBoundary(Cesium.Ellipsoid.WGS84, circleCenterCartesian3.toString(), 250000.0, Math.PI / 2); to get points on the boundary of the circle.
like the following; (first 4 are relevant)
(-936293.5084711357, -3593004.369638257, 5174692.046762386),
(258063.45731426653, -4909440.063214418, 4049020.280361031),
(-1426866.9084858585, -5475568.28141778, 2923348.513959676),
(-2621223.874271261, -4159132.587841621, 4049020.280361031),
(-936293.5084711361, -3593004.369638257, 5174692.046762386),
(-936293.5084711357, -3593004.369638257, 5174692.046762386)
Using the suggestion in the b29 Changes.md; I think I need to use CircleOutlineGeometry. However, doing that I am unable to get a 'nice' set of x,y,z positions as in the above example. In fact I don't really get useable positions at all as they seem to be duplicates of each other
So far I have;
var circle = new Cesium.CircleOutlineGeometry({
center : Cesium.Cartesian3.fromDegrees(-75.59777, 40.03883),
radius : 100000.0,
granularity : Math.PI / 2
});
var geometry = Cesium.CircleOutlineGeometry.createGeometry(circle);
var float64ArrayPositions = geometry.attributes.position.values;
var positions = .slice.call(float64ArrayPositions);
1119258.861737524,-4760551.0964473635,4080785.815404867,
1312965.665401136,-4710807.606232919,4080785.8154048678
If I use Math.PI / 3 and so on, I just seem to get more useless points.
Also, as I flattening the positions values using slice, I no longer have an array of 3d positions which I can then use in say Polyline.positions or something but am unsure how to get those from a float64 array.
Any help would be appreciated.
Thanks.