Good algorithm for drawing solid 2-dimensional polygons?

回眸只為那壹抹淺笑 提交于 2019-12-04 09:53:40

问题


What is the simplest (and easiest, although that's subjective) algorithm for drawing solid (as in a single, solid color--no texture mapping) 2D polygons in memory? What is the most efficient method?

I am not interested in using the GPU or any rendering method, as the output of my program will not be to the screen.


回答1:


The Polygon Fill Teaching Tool will show you a very nice, simple algorithm for drawing filled polygons of any complexity.

I've implemented it for embedded graphics, and it's actually a neat (and fun!) algorithm.

-Adam



来源:https://stackoverflow.com/questions/356968/good-algorithm-for-drawing-solid-2-dimensional-polygons

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!