
Computer Graphics
文章平均质量分 69
CherylNatsu
这个作者很懒,什么都没留下…
展开
-
绘制贝塞尔曲线
简介明了直接上代码: #define PI 3.14159265 struct point { float x; float y; }; void decas(int point_count, struct point *point_v, float t, struct point *point_dst) { int r; float t1 = 1 - t; struct poin原创 2011-12-28 19:46:24 · 1524 阅读 · 0 评论 -
dda直线绘制算法
dda直线绘制算法,理论不好描述,这里就直接贴代码了: /* Draw Line */ void line_dda(struct state *state, int x1, int y1, int x2, int y2) { float dx, dy, k, x, y; int r; int t; dx = x1 - x2; dy = y1 - y2; if (abs(dx) > a原创 2011-12-28 19:10:44 · 2206 阅读 · 0 评论