1.算法
2. 源代码
#include "stdafx.h"
#include "GL/glut.h"
#include "stdlib.h"
void init()
{
glClearColor(1.0,1.0,1.0,0.0);
glMatrixMode(GL_PROJECTION);
gluOrtho2D(0.0,600.0,0.0,400.0);
}
typedef struct point
{
float x,y;
}point;
void setPixel(point BsplinePt)
{
glBegin(GL_POINTS);
glVertex2f(BsplinePt.x,BsplinePt.y);
glEnd();
}
float polyNomial(int k,int d,float u)
{
if(d==1)
{
if(u
本文深入探讨了计算机图形学中的B样条曲线生成算法,包括算法原理、源代码实现和最终的图形结果展示。
订阅专栏 解锁全文
4761

被折叠的 条评论
为什么被折叠?



