Cut ellipse to terrain

Hi everyone,

I am a beginner to Cesium and what an interesting library it is.

I am currently investigating how to interact with the terrain data. I have an ellipse in a configured height from the ground and I want to cut it to the shape of the terrain. I have enabled depthTestAgainstTerrain and the terrain is cut though it as seen on the picture below.

However, I want to stop drawing the the ellipse when it hits the terrain and not continue on the other side of the terrain or mountain. I want to visualize “light of sight” from the center of the ellipse. How can I achieve this?

You can use depthFailMaterial to set color of lines under terrain. Also you can check this post. You can use it’s logic and create multiple lines between the radius and arc. You can set depthFailMaterial with a transparent color or Alpha 0.

  • Regards