- 博客(9)
- 资源 (1)
- 收藏
- 关注

原创 mtalab图像灰度变换
clear all;close all;clc;r=127; x=-r:r+1;sigma=20;y1=exp(-((x-80).^2)/(2*sigma^2));y2=exp(-((x+80).^2)/(2*sigma^2));y=y1+y2; %双峰高斯函数,任意函数都可以
2017-10-21 09:00:01
532

原创 OpenGL绘制正四面体
#include#include#includestatic float roangles;void init(void){ glClearColor(0.0, 0.0, 0.0, 0.0); glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); glEnable(GL_DEPTH_TEST);}void display(void){ glC
2017-10-19 19:45:21
9603
原创 银行家问题实验
#include #include #includeusing namespace std;#define M 3 //资源的种类数 #define N 5 //进程的个数 void output(int iMax[N][M], int iAllocation[N][M], int iNeed[N][M], int iAvailable[M], char cName[N]);
2017-10-28 15:59:34
1006
原创 谢尔宾斯基三角(Sierpinski triangle)
#include#include#include#includeGLfloat v[3][2] = { { -1.0, -0.58 }, { 1.0, -0.58 }, { 0.0, 1.15 } };int gCount = 1;void triangle(GLfloat *a, GLfloat *b, GLfloat *c){ glVertex2fv(a); glVertex
2017-10-11 20:25:37
2939
2
原创 用java语言编写输出希腊字母
package day11;public class xilazimu { public static void main(String args[]) { int startPosition=0,endPosition=0; char cSrart='α', cEnd = 'ω'; startPosition=(int) cSrart;
2017-09-13 16:56:33
3318
原创 Opengl绘制地图
#include#include#include#includeusing namespace std;class MapPoint{public:double longitude;double latitude;};class Polygon{public:vectorpoints;};vector polys; vector
2017-09-12 17:53:31
8937
4
原创 OPenGL点、线如何画
#includevoid Display(void){glClear(GL_COLOR_BUFFER_BIT);glBegin(GL_POINTS);/*glBegin支持的方式除了GL_POINTS和GL_LINES,还有GL_LINE_STRIP,GL_LINE_LOOP,GL_TRIANGLES,GL_TRIANGLE_STRIP,GL_TRIANGLE_FAN
2017-09-02 15:13:20
809
原创 用OpenGL来学习计算机图形学
第一个openGL程序(输出一个白色矩形)#include//需要包含头文件#include ,这是GLUT的头文件void Display(void)//以gl开头的都是OPengL的标准函数{glClear(GL_COLOR_BUFFER_BIT);//GL_COLOR_BUFFER_BIT表示清除颜色,glClear函数还可以清除其它的东西glRectf(-0.5f,
2017-09-02 13:48:37
803
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人