Polygon Rendering Behavior
- Dominant language
- JavaScript
- Stars
- 15.7k
- Forks
- 3.9k
- Avg merge
- 4d 6h
- Merged PRs (30d)
- 34
Description
### What happened?
When the vertices of a polygon are in a particular order, it may sometimes fail to render correctly even when said vertices are following the counter clockwise (CCW) convention. When rendering incorrectly, the boundary of the polygon will appear outside of the vertices or will not obey the vertices locations. In the sandcastle, the purple polygon has it's vertices in an order that makes it display correctly while the blue polygon has the same vertices but in a different order and is displayed incorrectly.
cc. @jpthompson212
### Reproduction steps
1. Load Sandcastle
2. Shift blue polygon vertices by one index. ([0] --> [1]...)
3. Run Sandcastle
### Sandcastle example
https://sandcastle.cesium.com/#c=vVRdT9swFP0rVrSHFGVOO8qEsrZa10asgo2qwHhYpuIml8bCsSPbATLU/z7no5BCW20v80OSe3POyb2+xwkFVxrdU3gAifqIwwMagaJZgn+UOTuwwjIeCa4J5SADq/Up4AEPKyZIDY+g5guWQb+mjohJKkr4Ib6VIhnDUgKooZQkt3+igCOzjtsOQp02bjtV3Dk8cjbirom76+j9RwNfByW1e4SLW5X5VZRUFZQKli8FL+uZP1AdmycS3s1Fppkp3/RYNYuBa6opKEyiyH6qdDhJwEOBNc1kymCthTJF+RLJOEsWqBBRqBBGtWRg1XXVcA/VasWKKUgiwzj3NrfKaUCALmPtoU4jV0t7SMsNbJ0fCSakt55UGeEvZ8PRaQOaEA2SEvYGduXjovwhS2Nit/FRq0Fy3aUkPGNEUp0/M78RHePZcDwZfr+YT/3ZfOyfzHwfHaBug2vavMxTeGYNqxif+Odj/2IyqqErc19ttZCEyIznbzy0xyII7TLJbscZwBYHVeXscMv/cYopYYtRXlrYM+fp1Wx69nrSbybQ/BK+FdInYWzbqaBcO2jeQv3BusQ9p6ZsSJl00VHFfSmvjDcaLbP0EdgF/W32sNNspljhFnNX3bwC7jkM118nlzvg1zTSsYc+NN6uGs8RqFDStGrm5t1Tw47CnI00pmFpyGd/VrvVwkzwJdVZBAed47bbPDnTycpB/6JE9E6hm3qExfjMxXKsntI5g8G6g880SYXUKJPMxtjVkKRGD5S7yMI70DhUquAW0J7bpPYieo9o1N/yw0chI0qZN7cZK6cWWIOea/BvqEyQyJyAc+MrRvICFncGZ1USY9xzTbidqYVgCyJfKf8B
### Environment
Browser: Chrome Version 131.0.6778.265 (Official Build) (64-bit)
CesiumJS Version: 1.125
Operating System: Windows 11 23H2 22631.4751
Contributor guide
Research direction
Start by loading the linked Sandcastle example in CesiumJS 1.125 and reproduce the issue by shifting the blue polygon vertices by one index. Compare the purple and blue polygons and trace the polygon rendering behavior; done means both vertex orders render boundaries that match their vertices and follow the CCW convention.
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
- Needs clarification
- Newbie friendliness
- 35/100