数学与图形库
|
|---MATH.INC
|---MYGRAPH.INC
|---MYHEAD.H
|---readme.txt
|
|---3ddemo.rar
|----3DDEMO.C
|----3DDEMO.exe
|----3DDEMO2.C
|----3DDEMO2.exe
|----3DDEMO3.C
|----3DDEMO3.exe
---------------------------------------------------------------------------------------------------
|---MATH.INC
/*Math.Inc BY BIANMING 2004-11-24
/* by 边明明,西安邮电学院。*/
/*这个是俺自己写的一个c语言数学库,在tc2.0下测试通过。请大家放心使用O_o!
特别加入了三维向量的运算TDA,用于图形库中的画向量。
Radians - converts degrees to radians
Degrees - converts radians to degrees
CosD - cosine in degrees
SinD - sine in degrees
Power - power a^n
Log - log base 10
Exp10 - exp base 10
Sign - negative=-1 positive=1 null=0
IntSign - negative=-1 positive=1 null=0
IntSqrt - integer aquare root
IntPower - integer power a^n
*/
#define Ln10 2.30258509299405E+000
#define Pi 3.1415927
#define PiOver180 1.74532925199433E-002
#define PiUnder180 5.72957795130823E+001
typedef enum {false, true} Boolean;
typedef unsigned char Byte;
typedef unsigned int Word;
int Round(float x)
{
return((int)(x+0.5));
}
int Trunc(float x)
{
return((int)(x));
}
float SqrFP(float x)
{
return(x*x);
}
int Sqr(int x)
{
return(x*x);
}
float Radians(float Angle)
{
return(Angle*PiOver180);
}
float Degrees(float Angle)
{
return(Angle*PiUnder180);
}
float CosD(float Angle)
{
return(cos(Radians(Angle)));
}
float SinD(float Angle)
{
return(sin(Radians(Angle)));
}
float Power(float Base,int E)
{
float BPower;
int t;
if(E==0) return(1);
else
{
BPower=1.0;
for(t=1;t<=E;t++)
BPower*=Base;
return(BPower);
}
}
float Log(float x)
{
return(log(x)/Ln10);
}
float Exp10(float x)
{
return(exp(x*Ln10));
}
float Sign(float x)
{
if(x<0) return(-1);
if(x>0) return(1);
else return(0);
}
int IntSign(int x)
{
if(x<0) return(-1);
if(x>0) return(1);
else return(0);
}
int IntSqrt(int x)
{
int OddInt,OldArg,FirstSqrt;
OddInt=1;
OldArg=x;
while(x>=0)
{
x-=OddInt;
OddInt+=2;
}
FirstSqrt=OddInt >> 1;
if(Sqr(FirstSqrt)-FirstSqrt+1 > OldArg)
return(FirstSqrt-1);
else
return(FirstSqrt);
}
int IntPower(int Base,int E)
{
int BPower;
int t;
if(E==0) return(1);
else
{
BPower=1;
for(t=1;t<=E;t++)
BPower*=Base;
return(BPower);
}
}
/*三维向量操作
vec - Make Vector三参数生成一实数向量
VecInt - Make Integer Vector三参数生成一整数向量
UnVec - Get Components of Vector实向量x,y,z轴传给三个数
UnVecInt - Get Components of Integer Vector整向量x,y,z轴传给三个数
VecDot - Vector Dot Product两向量的点乘积
VecCross - Vector Cross Product向量叉乘积
VecLen - Vector length向量长度
VecNormalize - Vector Normalize 规格化向量,0长度向量不能规格化
VecMatxMult - Vector Matrix Multiple 一个4×4矩阵于一向量乘积
VecSub - Vector Subtraction俩向量的差赋值给另一向量
VecSubInt - Vector Subtraction Integer整数向量差赋值
VecAdd - Vector Addition俩向量和赋值给另一向量
VecAdd3 - Vector Addition仨向量和赋值给另一向量
VecCopy - Vector Copy向量拷贝
VecLinComb - Vector Linear Combination C=R*A+S*B
VecScalMult - Vector Scalar Multiple实向量与实数乘积
VecScalMultI - Vector Scalar Multiple整向量与实数乘积
VecScalMultInt- Vector Scalar Multiple and Rounding整向量与整数乘积
VecAddScalMult- Vector Add scalar Multiple C=R*A+B
VecNull - Vector Null 实向量置零
VecNullInt - Vector Null Integer整向量置零
VecElemMult - Vector Element Mulitiple C=R*A*B
*/
typedef float TDA;
typedef int TDIA;
typedef float FDA;
typedef float Matx4x4;
void Vec(float r,float s,float t,TDA a)
{
a=r;a=s;a=t;
}
void VecInt(int r,int s,int t,TDIA a)
{
a=r;a=s;a=t;
}
void UnVec(TDA a,float *r,float *s,float *t)
{
*r=a;*s=a;*t=a;
}
void UnVecInt(TDIA a,int *r,int *s,int *t)
{
*r=a;*s=a;*t=a;
}
float VecDot(TDA a,TDA b)
{
return(a*b+a*b+a*b);
}
void VecCross(TDA a,TDA b,TDA c)
{
c=a*b-a*b;
c=a*b-a*b;
c=a*b-a*b;
}
float VecLen(TDA a)
{
return(sqrt(SqrFP(a)+SqrFP(a)+SqrFP(a)));
}
void VecNormalize(TDA a)
{
float dist,invdist;
dist=VecLen(a);
if(!(dist==0.0))
{
invdist=1.0/dist;
a*=invdist;
a*=invdist;
a*=invdist;
}
else
{
puts("Zero-Length Vectors Cannot be Nomalized!!!");
exit(1);
}
}
void VecMatxMult(FDA a,Matx4x4 Matrix,FDA b)
{
int mrow, mcol;
for(mcol=0;mcol<4;mcol++)
{
b=0;
for(mrow=0;mrow<4;mrow++)
b+=a*Matrix;
}
}
void VecSub(TDA a,TDA b,TDA c)
{
c=a-b;
c=a-b;
c=a-b;
}
void VecSubInt(TDIA a,TDIA b,TDIA c)
{
c=a-b;
c=a-b;
c=a-b;
}
void VecAdd(TDA a,TDA b,TDA c)
{
c=a+b;
c=a+b;
c=a+b;
}
void VecAdd3(TDA a,TDA b,TDA c,TDA d)
{
d=a+b+c;
d=a+b+c;
d=a+b+c;
}
void VecCopy(TDA a,TDA b)
{
b=a;
b=a;
b=a;
}
void VecLinComb(float r,TDA a,float s,TDA b,TDA c)
{
c=r*a+s*b;
c=r*a+s*b;
c=r*a+s*b;
}
void VecScalMult(float r,TDA a,TDA b)
{
b=r*a;
b=r*a;
b=r*a;
}
void VecScalMultI(float r,TDIA a,TDA b)
{
b=r*a;
b=r*a;
b=r*a;
}
void VecScalMultInt(float r,TDA a,TDIA b)
{
b=Round(r*a);
b=Round(r*a);
b=Round(r*a);
}
void VecAddScalMult(float r,TDA a,TDA b,TDA c)
{
c=r*a+b;
c=r*a+b;
c=r*a+b;
}
void VecNull(TDA a)
{
a=0.0;
a=0.0;
a=0.0;
}
void VecNullInt(TDIA a)
{
a=0;
a=0;
a=0;
}
void VecElemMult(float r, TDA a,TDA b,TDA c)
{
c=r*a*b;
c=r*a*b;
c=r*a*b;
}
/*
ZeroMatrix - zeros the elements of a 4x4 matrix
Translate3D - make translation matrix把一向量线性转换道空间的新位置生成新矩阵
Scale3D - make Scaling matrix使一向量转换成矩阵
Rotate3D - make rotation matrix使一向量旋转生成一矩阵
ZeroAllMatricies - zeros all matricies used in tranformation
Multiply3DMatricies - multiply 2 4x4 matricies矩阵相乘
PrepareMatrix - prepare the transformation matrix (Tm=S*R*T)生成一个完整的仿射变换矩阵
PrepareInvMatrix - prepare the inverse transformation matrix
Transform - multiply a vertex by the transformation matrix 向量与矩阵相乘生成新向量
*/
void ZeroMatrix(Matx4x4 a)
{
int i,j;
for(i=0;i<4;i++)
for(j=0;j<4;j++)
a
=0.0;
}
void Translate3D(float tx, float ty, float tz,Matx4x4 a)
{
int i;
ZeroMatrix(a);
for(i=0;i<4;i++)
a=1.0;
a=-tx;
a=-ty;
a=-tz;
}
void Scale3D(float sx,float sy,float sz,Matx4x4 a)
{
ZeroMatrix(a);
a=sx;
a=sy;
a=sz;
a=1.0;
}
void Rotate3D(int m,float theta, Matx4x4 a)
{
int m1,m2;
float c,s;
ZeroMatrix(a);
a=1.0;
a=1.0;
m1=(m%3)+1;
m2=(m1%3);
m1=-1;
c=CosD(theta);
s=SinD(theta);
a=c;
a=s;
a=c;
a=-s;
}
void Multiply3DMatricies(Matx4x4 a,Matx4x4 b,Matx4x4 c)
{
int i,j,k;
float ab;
for(i=0;i<4;i++)
{
for(j=0;j<4;j++)
{
ab=0;
for(k=0;k<4;k++)
ab+=a*b;
c=ab;
}
}
}
void MatCopy(Matx4x4 a,Matx4x4 b)
{
int i,j;
for(i=0;i<4;i++)
for(j=0;j<4;j++)
b=a;
}
void PrepareMatrix(float tx,float ty,float tz,
float sx,float sy,float sz,
float rx,float ry,float rz,
Matx4x4 XForm)
{
Matx4x4 m1,m2,m3,m4,m5,m6,m7,m8,m9;
Scale3D(sx,sy,sz,m1);
Rotate3D(1,rx,m2);
Rotate3D(2,ry,m3);
Rotate3D(3,rz,m4);
Translate3D(tx,ty,tz,m5);
Multiply3DMatricies(m2,m1,m6);
Multiply3DMatricies(m3,m6,m7);
Multiply3DMatricies(m4,m7,m8);
Multiply3DMatricies(m5,m8,m9);
MatCopy(m9,XForm);
}
void PrepareInvMatrix(float tx,float ty,float tz,
float sx,float sy,float sz,
float rx,float ry,float rz,
Matx4x4 XForm)
{
Matx4x4 m1,m2,m3,m4,m5,m6,m7,m8,m9;
Scale3D(sx,sy,sz,m1);
Rotate3D(1,rx,m2);
Rotate3D(2,ry,m3);
Rotate3D(3,rz,m4);
Translate3D(tx,ty,tz,m5);
Multiply3DMatricies(m4,m5,m6);
Multiply3DMatricies(m3,m6,m7);
Multiply3DMatricies(m2,m7,m8);
Multiply3DMatricies(m1,m8,m9);
MatCopy(m9,XForm);
}
void Transform(TDA a,Matx4x4 m,TDA b)
{
b=m*a+m*a+m*a+m;
b=m*a+m*a+m*a+m;
b=m*a+m*a+m*a+m;
}
---------------------------------------------------------------------------------------------------
|---MYGRAPH.INC
/*MYGraph.Inc BY BIANMING 2005-11-27
InitGraphics - initialize graphics
- 屏幕初始化,指明图形驱动路径 gpath
ExitGraphics - sound and wait for key press before exiting grapgics
- 生成图型后的调用
SetAxisZP - 设置图形原点座标,默认下以(0,439)为原点
SetAxisMid - 设置图形原点座标为屏幕中央
Plot - place pixel to screen
CylPlot - 极坐标画点法
GetPixel - gets pixel
- 从指定点返回颜色
Circle - circle draw routine
- 画给定圆心,半径,颜色的圆
Line - line draw routine
- 从给定点到另一点给定颜色的线
ShowAxis - 显示2D坐标轴 ,set X-Axis color,set Y-Axis color.
Title - set up text screen colors
- 为以文本方式输出准备屏幕
*/
int CentreX ,CentreY; /* 原点坐标*/
int MaxX; /*getmaxx*/
int MaxY; /*getmaxy*/
int MaxXres;
int MaxYres;
int MaxColor; /*最大颜色种数*/
void InitGraphics(char *gpath)
{
int gd=DETECT,gm;
initgraph(&gd,&gm,gpath);
MaxX=getmaxx(); /*getmaxx*/
MaxY=getmaxy(); /*getmaxy*/
MaxXres=MaxX+1;
MaxYres=MaxY+1;
MaxColor=getmaxcolor();
CentreX=0;
CentreY=MaxY;
}
void ExitGraphics(void)
{
sound(1000);
delay(500);
nosound();
getch();
cleardevice();
closegraph();
}
void SetAxisZP(int x,int y) /* 设置图形原点座标,默认下以(0,439)为原点*/
{
CentreX=x;
CentreY=y;
}
void SetAxisMid(void) /*设置图形原点座标为屏幕中央*/
{
int x,y;
x=MaxX>>1;
y=MaxY>>1;
SetAxisZP(x,y);
}
void Plot(int x,int y,unsigned char color)
{
int ScreenX,ScreenY;
ScreenX=x+CentreX;
ScreenY=MaxY-(y+CentreY);
if((ScreenX>=0)&&(ScreenX<=MaxX)&&(ScreenY>=0)&&(ScreenY<=MaxY))
putpixel(ScreenX,ScreenY,color);
}
void CylPlot(float R,float Theta,Byte color)
{
int x,y;
Theta=Radians(Theta);
x=(int)(R*sin(Theta));
y=(int)(R*cos(Theta));
Plot(x,y,color);
}
int GetPixel(int x,int y)
{
int ScreenX,ScreenY;
ScreenX=x+CentreX;
ScreenY=MaxY-(y+CentreY);
if((ScreenX>=0)&&(ScreenX<=MaxX)&&(ScreenY>=0)&&(ScreenY<=MaxY))
return(getpixel(ScreenX,ScreenY));
else
return(0);
}
void Swap(int *first,int *second)
{
int tmp;
tmp=*first;
*first=*second;
*second=tmp;
}
void Circle(int x,int y,int radius, Byte color) /*600×480 16 color*/
{
int a,af,b,bf,target,r2,asp;
asp=94;
target=0;
a=radius;
b=0;
r2=Sqr(radius);
while(a>=b)
{
b=Round(sqrt(r2-Sqr(a)));
Swap(&target,&b);
while(b<target)
{
af=(asp*a)/100;
bf=(asp*b)/100;
Plot(x+af,y+b,color);
Plot(x+bf,y+a,color);
Plot(x-af,y+b,color);
Plot(x-bf,y+a,color);
Plot(x-af,y-b,color);
Plot(x-bf,y-a,color);
Plot(x+af,y-b,color);
Plot(x+bf,y-a,color);
++b;
}
--a;
}
}
void Line(int xx1,int yy1,int xx2,int yy2,Byte color)
{
int LgDelta,ShDelta,Cycle,LgStep,ShStep;
LgDelta=xx2-xx1;
ShDelta=yy2-yy1;
if(LgDelta<0)
{
LgDelta=-LgDelta;
LgStep=-1;
}
else
LgStep=1;
if(ShDelta<0)
{
ShDelta=-ShDelta;
ShStep=-1;
}
else
ShStep=1;
if(ShDelta<LgDelta)
{
Cycle=LgDelta>>1;
while(xx1!=xx2)
{
Plot(xx1,yy1,color);
Cycle+=ShDelta;
if(Cycle>LgDelta)
{
Cycle-=LgDelta;
yy1+=ShStep;
}
xx1+=LgStep;
}
Plot(xx1,yy1,color);
}
else
{
Cycle=ShDelta>>1;
Swap(&LgDelta,&ShDelta);
Swap(&LgStep,&ShStep);
while(yy1!=yy2)
{
Plot(xx1,yy1,color);
Cycle+=ShDelta;
if(Cycle>LgDelta)
{
Cycle-=LgDelta;
xx1+=ShStep;
}
yy1+=LgStep;
}
Plot(xx1,yy1,color);
}
}
void ShowAxis(Byte xcolor,Byte ycolor)
{
Line(-200,0,200,0,xcolor);
Line(190,7,200,0,xcolor);
Line(190,-7,200,0,xcolor);/*x轴*/
Line(0,-200,0,200,ycolor);
Line(7,190,0,200,ycolor);
Line(-7,190,0,200,ycolor);/*y轴*/
}
void Title()
{
textcolor(YELLOW);
textbackground(BLUE);
clrscr();
}
/*FOR 3D GRAPHICS
InitPer - observer location and distances
- 给三维空间的观察者坐标赋值 Per控制是否是透视图 true-是 false-不是
InitPlotting - rotation and tilt angles
- 初始化用于三维图形中的变量
MapCoordinates - maps 3D space onto the 2D screen
- 将三维点投影到观察平面
Plot3D - plot a cartesian system point
- 在二维屏幕上画给定三维坐标和颜色的点
CylPlot3D - plot a Cylindrical system point
- 在二维屏幕上画给定半径,与xy平面角度,z高度和颜色的点 以Cylindrical坐标系统给出
SphPlot3D - plot a spherical system point
- 在二维屏幕上画以球形坐标r半径,Theta xy平面半径线的角度,Phi xz平面半径线的角度
- 的点
VecLine3D - plots a line from 3D coordinates
- 画以向量参数1为起点,向量参数2为终点,color为颜色的3D直线
Line3D - 画(x1,y1,z1)-(x2,y2,z2)的直线
Vec3D - 画向量
Ball - 画一个球体 (x,y,z)球心坐标,R半径,color颜色
*/
Boolean PerspectivePlot;
float Mx,My,Mz,ds; /*观察者坐标(Mx,My,Mz),距离(ds)赋值*/
void InitPer(Boolean Per,float x,float y,float z,float m)
{
PerspectivePlot=Per;
Mx=x;
My=y;
Mz=z;
ds=m;
}
float Angl ,Tilt; /* 观察者的旋转角,俯视角*/
float CosA ,SinA;
float CosB ,SinB;
float CosACosB,SinASinB;
float CosASinB,SinACosB;
void InitPlotting(float Ang,float Tlt)
{
Angl =Ang;
Tilt =Tlt;
CosA =CosD(Angl);
SinA =SinD(Angl);
CosB =CosD(Tilt);
SinB =SinD(Tilt);
CosACosB=CosA*CosB;
SinASinB=SinA*SinB;
CosASinB=CosA*SinB;
SinACosB=SinA*CosB;
}
void MapCoordinates(float x,float y,float z,int *Xp,int *Yp)
{
float Xt,Yt,Zt;
Xt=(Mx+x*CosA-y*SinA);
Yt=(My+x*SinASinB+y*CosASinB+z*CosB);
if(PerspectivePlot)
{
Zt=Mz+x*SinACosB+y*CosACosB-z*SinB;
*Xp=Round(ds*Xt/Zt);
*Yp=Round(ds*Yt/Zt);
}
else
{
*Xp=Round(Xt);
*Yp=Round(Yt);
}
}
void Plot3D(float x,float y,float z,Byte Color)
{
int Xp,Yp;
MapCoordinates(x,y,z,&Xp,&Yp);
Plot(Xp,Yp,Color);
}
void CylPlot3D(float Rho,float Theta,float z,Byte Color)
{
float x,y;
Theta=Radians(Theta);
x=Rho*cos(Theta);
y=Rho*sin(Theta);
Plot3D(x,y,z,Color);
}
void SphPlot3D(float r,float Theta,float Phi,Byte Color)
{
float x,y,z;
Theta=Radians(Theta);
Phi=Radians(Phi);
x=r*sin(Theta)*cos(Phi);
y=r*sin(Theta)*sin(Phi);
z=r*cos(Theta);
Plot3D(x,y,z,Color);
}
void VecLine3D(TDA P1,TDA P2,Byte Color)/*向量画3D直线*/
{
int Xp1,Yp1;
int Xp2,Yp2;
float x1,y1,z1;
float x2,y2,z2;
UnVec(P1,&x1,&y1,&z1);
UnVec(P2,&x2,&y2,&z2);
MapCoordinates(x1,y1,z1,&Xp1,&Yp1);
MapCoordinates(x2,y2,z2,&Xp2,&Yp2);
Line(Xp1,Yp1,Xp2,Yp2,Color);
}
void Line3D(float x1,float y1,float z1,float x2,float y2,float z2,int Color)
{
int Xp1,Yp1;
int Xp2,Yp2;
MapCoordinates(x1,y1,z1,&Xp1,&Yp1);
MapCoordinates(x2,y2,z2,&Xp2,&Yp2);
Line(Xp1,Yp1,Xp2,Yp2,Color);
}
void Vec3D(TDA P1,int Color) /*画P1向量*/
{
int Xp1,Yp1;
float x1,y1,z1;
UnVec(P1,&x1,&y1,&z1);
MapCoordinates(x1,y1,z1,&Xp1,&Yp1);
Line(0,0,Xp1,Yp1,Color);
}
void Ball(int x,int y,int z,int R,Byte color) /*画一个球体 (x,y,z)球心坐标,R半径,color颜色*/
{
int Theta,Phi;
for(Theta=0;Theta<180;Theta+=20)
{
for(Phi=0;Phi<180;Phi++)
{
Plot3D(x+R*CosD(Phi)*CosD(Theta),y+R*CosD(Phi)*SinD(Theta),z+R*SinD(Phi),color);
Plot3D(x+R*CosD(Phi)*CosD(Theta),y+R*CosD(Phi)*SinD(Theta),z-R*SinD(Phi),color);
}
}
for(Phi=-80;Phi<90;Phi+=20)
{
for(Theta=0;Theta<180;Theta++)
{
Plot3D(x+R*CosD(Phi)*CosD(Theta),y+R*CosD(Phi)*SinD(Theta),z+R*SinD(Phi),color);
Plot3D(x+R*CosD(Phi)*CosD(Theta),y-R*CosD(Phi)*SinD(Theta),z+R*SinD(Phi),color);
}
}
Plot3D(x,y,z,color+2);
}
/*
GetPixel3D- gets 3D pixel
- 从指定3D点返回颜色
COLORS:
BLACK 0 黑色 DARKGRAY 8 深灰
BLUE 1 兰色 LIGHTBLUE 9 深兰
GREEN 2 绿色 LIGHTGREEN 10 淡绿
CYAN 3 青色 LIGHTCYAN 11 淡青
RED 4 红色 LIGHTRED 12 淡红
MAGENTA 5 洋红 LIGHTMAGENTA 13 淡洋红
BROWN 6 棕色 YELLOW 14 黄色
LIGHTGRAY 7 淡灰 WHITE 15 白色
*/
int GetPixel3D(int x,int y,int z)
{
int xp,yp;
MapCoordinates(x,y,z,&xp,&yp);
return(GetPixel(xp,yp));
}
/* Set up of Coordinate Axes and color Palette
ShowAxis3D - 显示3D坐标轴 And Set Axis color
ShowPalette - 在屏幕上画出调色板
*/
void ShowAxis3D(Byte xcolor,Byte ycolor,Byte zcolor)
{
int x,y,z;
Line3D(-200, 0,0,200,0,0,xcolor);
Line3D(190,-7,0,200,0,0,xcolor);
Line3D(190, 7,0,200,0,0,xcolor); /*x-Axis*/
Line3D( 0,-200,0,0,200,0,ycolor);
Line3D(-7,190,0,0,200,0,ycolor);
Line3D( 7,190,0,0,200,0,ycolor); /*y-Axis*/
Line3D(0 ,0,-200,0,0,200,zcolor);
Line3D(0,-7,190,0,0,200,zcolor);
Line3D(0, 7,190,0,0,200,zcolor); /*z-Axis*/
}
void ShowPalette(void)
{
int y;
Byte Color;
for(Color=1;Color<MaxColor;Color++)
{
for(y=0;y<15;y++)
Line(-300,y+15*Color,-290,y+15*Color,Color);
}
}
---------------------------------------------------------------------------------------------------
|---MYHEAD.H
#include <stdio.h>
#include <dos.h>
#include <conio.h>
#include <math.h>
#include <graphics.h>
#include "math.inc"
#include "mygraph.inc"
---------------------------------------------------------------------------------------------------
|---readme.txt
/* by 边明明,西安邮电学院。*/
/*这个是俺自己写的一个c语言图形库和数学库,在tc2.0下测试通过。请大家放心使用O_o!
所有函数是相对于调整的坐标原点进行画图的,不是以屏幕原点坐标,这一点请大家注意!!!
特点是所有作图函数加入了颜色设置,
特别加入了3D作图,3D作图时要初始化观察者的坐标和距离(InitPer())。
还要初始化观察者相对与x轴旋转角,相对与xy平面的俯视角(InitPoltting())。
因为所有的3D作图函数都是相对于这个初始值进行作图的。
注意:在包含这个库时还要包含进stdio.h,dos.h,conio.h,math.h,graphics.h,math.inc这些库。
这里也可以一个include "myhead.h"。这个文件在压缩包里。
您可以在这个基础上继续建立自己的库。您也可以进行任意修改。O_o!
这里有几个例子:3Ddemo.c,3Ddemo2.c,3Ddemo3.c。
bmmm906@sohu.com
qq:53793208
西安邮电学院南校区 电科0303班 75号信箱。
---------------------------------------------------------------------------------------------------
[ Last edited by zzz19760225 on 2017-12-6 at 15:57 ]