Draw cone between two points

Hi,

Is there a way to draw a cone by specifying a lat/long/alt for each end?

Something like:

var fromPosition = Cesium.Cartesian3.fromDegrees(-105.0, 40.0, 0);
var toPosition = Cesium.Cartesian3.fromDegrees(-104.0, 40.0, 20000);
var angle = Cesium.Math.toRadians(5);

var cone = generateCone(fromPosition, toPosition, angle);
viewer.entities.add(cone);

``

Hi – we don’t have support for specifying cone position this way, but the calculations hopefully won’t be too hard. :slight_smile:

Best,

  • Rachel

Hi Rachel,

I’m still struggling with this one. Could I trouble you for a gist please? It would be really helpful.

Thank you,

Fidel

Code example was posted here: https://groups.google.com/d/msg/cesium-dev/GkygObEcZ1g/4T8jwd8OCgAJ

Best,

  • Rachel

Hi Rachel, thanks again for the gist.

I noticed that for large cones, the vertex doesn’t touch the line’s point of origin. Any thoughts on where the error comes from?

Thanks,

Fidel