- 博客(129)
- 资源 (11)
- 问答 (1)
- 收藏
- 关注
原创 openGl学习之判定点在三角形的内部还是外部
#include #include #include #include #include #include using namespace std;int screenWidth=640;int screenHeight=480;typedef struct{ float x; float y;}Point;typedef struct{ float x;
2014-12-08 17:32:13
2507
原创 OpenGL学习之求凸包
#include #include #include using namespace std;typedef struct{double x,y;} Point;void qsortpoint(Point s[],Point base,int start,int end);void sortstartedge(Point s[],int nums);void init(){
2014-12-08 12:14:36
1462
转载 OpenGL学习之API详解
转载自http://blog.youkuaiyun.com/wenzhy/article/details/3917515void glutDisplayFunc(void (*func)(void));注册当前窗口的显示回调函数参数:func:形为void func()的函数,完成具体的绘制操作这个函数告诉GLUT当窗口内容必须被绘制时,那个函数将被调用.当窗口改变大小或者
2014-11-18 22:32:16
1194
原创 OpenGl学习之钢体运动
#include #include #include #include GLsizei winWidth = 600,winHeight = 600;GLfloat xwcmin = 0.0;GLfloat ywcmax = 225.0;GLfloat xwcmax = 255.0;GLfloat ywxmin = 0.0;class wcPt2d{public: GLf
2014-09-15 11:23:12
2041
原创 OpenGL学习之glBlendFunc
//学习列表的使用#include #include #include #include #define width 500#define height 500void display(){ glClear(GL_COLOR_BUFFER_BIT); glEnable(GL_BLEND); //glBlendFunc(GL_ONE,GL_ZERO); //没有颜色的重叠
2014-09-08 21:34:01
1677
原创 OpenGl 学习之小球运动
#include #include void init(){ glClearColor(0.0,0.0,0.0,0.0); glDepthFunc(GL_LESS); /*func指定深度比较函 GL_NEVER,不通过(输入的深度值不取代参考值) GL_LESS,如果输入的深度值小于参考值,则通过 GL_EQUAL,如果输入的深度值等于参考值,则通过 GL_LEQUAL,如
2014-09-08 15:47:19
5290
转载 OpenGl学习之gluPerspective
gluPerspective(GLdouble fovy,GLdouble aspect,GLdouble zNear,GLdouble zFar)首先得设置gluPerspective,来看看它的参数都表示什么意思fovy,这个最难理解,我的理解是,眼睛睁开的角度,即,视角的大小,如果设置为0,相当你闭上眼睛了,所以什么也看不到,如果为180,那么可以认为你的视界很广阔,as
2014-09-08 15:32:32
813
转载 OpenGl学习之glPushMatrix、glPopMatrix
glPushMatrix、glPopMatrix操作其实就相当于栈里的入栈和出栈。 许多人不明白的可能是入的是什么,出的又是什么。例如你当前的坐标系原点在你电脑屏幕的左上方。现在你调用glPushMatrix,然后再调用一堆平移、旋转代码等等,然后再画图。那些平移和旋转都是基于坐上角为原点进行变化的。而且都会改变坐标的位置,经过了这些变化后,你的坐标肯定不再左上角了。 那如果想
2014-09-08 13:51:05
760
原创 openGL学习之三角形等分
#include GLfloat v[3][2] = {1,0,0,3,2,3};void triangle(GLfloat *a,GLfloat *b,GLfloat *c){ glBegin(GL_TRIANGLES); glVertex2fv(a); glVertex2fv(b); glVertex2fv(c);
2014-09-06 22:50:49
1050
转载 random forest(随机森林)
转载自:http://lincccc.com/?p=47Random Forest(s),随机森林,又叫Random Trees[2][3],是一种由多棵决策树组合而成的联合预测模型,天然可以作为快速且有效的多类分类模型。如下图所示,RF中的每一棵决策树由众多split和node组成:split通过输入的test取值指引输出的走向(左或右);node为叶节点,决定单棵决策树的最终输出,在分
2014-09-02 10:25:34
7005
原创 java实现柱状图
/* 这个程序没有任何的使用价值,起码我这么认为,因为malab应付这个任务 * 也就两行的代码就搞定了,写这个代码的目的完全是因为我们组里面他们写了个程序 * 生成一个渐变的柱状图,我就是好奇的想写一写*/
2014-07-10 20:25:19
6746
1
原创 Graphics2D学习
Java语言在Graphics类提供绘制各种基本的几何图形的基础上,扩展Graphics类提供一个Graphics2D类,它拥用更强大的二维图形处理能力,提供、坐标转换、颜色管理以及文字布局等更精确的控制。
2014-07-09 16:48:10
947
原创 C和指针课后习题(第八章)
8.2#include #include #include static double income_limits[] = { 0,23350,56550,117950,256500,DBL_MAX};static double tax[] = { 0,3502.50,12789.50,31832.50,81710.50};static double p[] =
2014-05-08 19:49:47
2620
原创 C和指针课后习题(第七章)
7.1/*The Hermite Polynomials are defined as follows:Write a recursive function to compute thevalue of Hn(x). Your function should match this prototype:int hermite( int n, int x );*/#include #i
2014-05-08 15:47:45
2262
原创 C和指针课后习题(第六章)
6.1#include #include #include char *find_char(char const *source,char const *chars){ int source_len = 0,chars_len = 0; int i = 0,j = 0; char ch; while(*(source+i++)!='\0') source_len++; w
2014-05-03 14:41:35
4354
原创 C和指针课后习题(第五章)
5.1#include #include #include int main(){ char ch; while(scanf("%c",&ch)) { if (islower(ch)) { putchar(toupper(ch)); } else putchar(ch); } system("pause"); return 0;}
2014-05-02 15:43:05
1639
原创 C和指针课后习题(第四章)
4.1#include #include #include float fun(float a,float number){ float b = (a+(number/a))/2; return b;}int main(){ float number; float a=1,b; printf("please input a number:\n"); scanf("%
2014-04-29 18:54:00
1454
请问RBF(径向基函数)中提到的mapping coefficients
2015-07-24
TA创建的收藏夹 TA关注的收藏夹
TA关注的人