資源簡介
koch雪花分行的繪制,遞歸法,內部可以制定次數,可拾取
代碼片段和文件信息
//koch?snow
#include?
#include?
#include
using?namespace?std;
const?float?piover180?=?0.0174532925f;//a?degree
float?a=1width=0height=0;//weight?and?height?save?current?value
double?ratio;
int?ww?wh;
int?chosen[2];double?pxpy=0;//?
void?myinit()
{
/*?attributes?*/
??????glClearColor(1.0?1.0?1.0?1.0);?/*?white?background?*/
??????glColor3f(1.0?0.0?0.0);?/*?draw?in?red?*/
/*?set?up?viewing?*/
/*?50.0?x?50.0?camera?coordinate?window?with?origin?lower?left?*/
??chosen[0]=0;
}
?void?reshape?(int?w?int?h)
?{
??glViewport(0?0?w?h);//w:window?width;h:window?height
?
??glMatrixMode(GL_PROJECTION);
??????glLoadIdentity();
??????gluPerspective(45.0?(GLfloat)?w/(GLfloat)?h?0.001?200.0);
??width=w;he
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????539??2006-04-22?11:12??koch\kochsnow.dsw
?????文件??????33792??2011-10-13?15:26??koch\kochsnow.ncb
?????文件??????53760??2011-10-13?15:26??koch\kochsnow.opt
?????文件???????5439??2011-10-13?15:17??koch\loading.cpp
?????文件???????3413??2006-04-22?11:11??koch\loading.dsp
?????文件??????66560??2011-10-13?14:05??koch\loading.ncb
?????文件??????26672??2011-05-11?00:09??koch\loading.o
?????文件??????53760??2011-10-13?14:05??koch\loading.opt
?????文件???????1109??2011-10-13?15:17??koch\loading.plg
?????文件????????963??2011-05-11?00:09??koch\Makefile.win
?????文件??????49361??2000-04-08?17:57??koch\paisley.rgb
?????文件????????273??2011-05-27?15:00??koch\Project1.layout
????..A.SH.??????8704??2011-08-30?17:58??koch\Thumbs.db
?????目錄??????????0??2011-10-13?15:30??koch
-----------?---------??----------?-----??----
???????????????304345????????????????????14
- 上一篇:CRC32 verilog代碼
- 下一篇:數電課設簡易溫度控制器
評論
共有 條評論