Display a Ray and Plane

I an trying to find the intersection between a Ray and a Plane and while i get a result, i can’t figure out why it’s not where i expect it to be. A simple way to diagnose this would be to simply put my Ray and my Plane on the map (particularly the plane) and see how they are oriented. I’ve looked around but haven’t been able to find a way to do this. Any suggestions?


Sorry, I don’t believe we have any built in geometry types that would visualize a plane or a ray. You could possibly use a polyline to show a ray, but you would have to compute a start and stop position.

For a plane, I think you would have to write your own geometry type. Some of this code may be a little out dated, but it shows you the general method for creating a geometry type: https://github.com/AnalyticalGraphicsInc/cesium/wiki/Geometry-and-Appearances

Check out our contributors documentation for how to build the code: https://github.com/AnalyticalGraphicsInc/cesium/tree/master/Documentation/Contributors/BuildGuide