CesiumGS / CesiumGS/cesium

The problem of polyaline self intersection

Open
#9,274 0 comments 0 reactions 0 assignees View on GitHub
category - polyline type - bug
Dominant language
JavaScript
Stars
15.7k
Forks
3.9k
Avg merge
4d 6h
Merged PRs (30d)
34

Description

Hi,
I added a polylinegraphic with a larger pixel width and transparent material. I found that when the camera is far away from the target, it overlaps itself. Why does this happen?
code:

`var viewer = new Cesium.Viewer('cesiumContainer');
viewer.entities.add({
polyline: {
positions: [Cesium.Cartesian3.fromDegrees(133,30), Cesium.Cartesian3.fromDegrees(133.5,31), Cesium.Cartesian3.fromDegrees(134,30)],
width: 50,
material: Cesium.Color.GREEN.withAlpha(0.1)
}
});
viewer.flyTo(viewer.entities);`

![image](https://user-images.githubusercontent.com/37999729/101728088-b9480900-3af0-11eb-8c21-1c6879252f1b.png)
![image](https://user-images.githubusercontent.com/37999729/101728120-c664f800-3af0-11eb-803e-0df3c9ec8035.png)

Contributor guide

Open the contributing guide

Research direction

Start with the provided Cesium.Viewer and viewer.entities.add polyline example, reproducing the self-overlap at different camera distances with the 50-pixel transparent line. Trace the polyline rendering entry point involved in width and transparency handling; done means identifying the cause and confirming a fix or clearly documenting the rendering limitation.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
computer-graphics
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.