CesiumGS / CesiumGS/cesium

Errors with large ellipses

Open
#7,065 10 comments 0 reactions 0 assignees View on GitHub
category - polygons/geometry type - bug
Dominant language
JavaScript
Stars
15.7k
Forks
3.9k
Avg merge
4d 6h
Merged PRs (30d)
34

Description

When drawing very large ellipses, there are visual errors, particularly in 2d mode. Some areas are missing and others get drawn twice. You can see this by visiting the Circles and Ellipses sandcastle and setting a semiMinorAxis and semiMajorAxis to 5000000 or greater. It seems to make it worse if they are very far north. (see screenshots). You can fix the 3d by adding a little height to it, but it doesn't help the 2d projection.

Here is code to reproduce the error:

`var viewer = new Cesium.Viewer('cesiumContainer');`

`var redEllipse = viewer.entities.add({`
` position: Cesium.Cartesian3.fromDegrees(-103.0, 80.0),`
` name : 'Red ellipse on surface',`
` ellipse : {`
` semiMinorAxis : 6000000.0,`
` semiMajorAxis : 6000000.0,`
` material : Cesium.Color.RED.withAlpha(0.5)`
` }`
`});`

![3d](https://user-images.githubusercontent.com/10120236/45983688-eba5e280-c01a-11e8-81d4-dadeaa594882.PNG)
![2d](https://user-images.githubusercontent.com/10120236/45983690-ecd70f80-c01a-11e8-84ea-2c8e129676c4.PNG)

Contributor guide

Open the contributing guide

Research direction

Start with the Circles and Ellipses sandcastle and reproduce the issue using the provided entity at latitude 80 with semi-axis values of 6000000. Compare 3D and 2D views while checking the ellipse rendering path; done means large ellipses render without missing or duplicated areas in 2D.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
computer-graphics, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.