| ²é¿´: 840 | »Ø¸´: 11 | ||
| µ±Ç°Ö»ÏÔʾÂú×ãÖ¸¶¨Ìõ¼þµÄ»ØÌû£¬µã»÷ÕâÀï²é¿´±¾»°ÌâµÄËùÓлØÌû | ||
Âí¶«ÑôÒø³æ (СÓÐÃûÆø)
|
[ÇóÖú]
LinuxÖÐÓÃVIM±àÒëGL¿âµÄÎÊÌâ ÒÑÓÐ1È˲ÎÓë
|
|
|
ÎÒÓÃCode::BlockÇÃÁËÒ»¶Î´úÂ룬³É¹¦Êä³ö×èÄáÕðµ´Í¼ÐΣ¡ ¼ÙÈçд½øvimÖÐÃüÃûΪtest.c£¬¿ÉÒÔÓÃgcc±àÒëÂ𣿠#include<GL/gl.h> #include<GL/glu.h> #include<GL/glut.h> #include<math.h> const int screenWidth=640; const int screenHeight=480; GLdouble a,b,c,d; void myInit(void){ glClearColor(1.0,1.0,1.0,0.0); glColor3f(0.0f,0.0f,0.0f); glPointSize(2.0); glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluOrtho2D(0.0,(GLdouble)screenWidth,0.0,(GLdouble)screenHeight); a=screenWidth/4.0; b=0.0; c=d=screenHeight/2.0; } void myDisplay(void){ glClear(GL_COLOR_BUFFER_BIT); glBegin(GL_POINTS); for(GLdouble x=0;x<4.0;x+=0.005){ GLdouble func=exp(-x)*cos(2*3.1415926*x); glVertex2d(a*x+b,c*func+d); } glEnd(); glFlush(); } int main(int argc,char**argv){ glutInit(&argc,argv); glutInitDisplayMode(GLUT_SINGLE|GLUT_RGB); glutInitWindowSize(screenWidth,screenHeight); glutInitWindowPosition(100,150); glutCreateWindow("Dot Plot of a Function" ;glutDisplayFunc(myDisplay); myInit(); glutMainLoop(); } |
» ²ÂÄãϲ»¶
275ѧ˶081000·þ´Óµ÷¼Áµ½ÆäËûרҵ£¬±£²»×¡±¾×¨ÒµÁË
ÒѾÓÐ8È˻ظ´
085600£¬320·ÖÇóµ÷¼Á
ÒѾÓÐ4È˻ظ´
071000ÉúÎïѧµ÷¼Á
ÒѾÓÐ4È˻ظ´
²ÄÁÏÓ뻯¹¤306·ÖÕÒµ÷¼Á
ÒѾÓÐ3È˻ظ´
Ò»Ö¾Ô¸±±¾©¿Æ¼¼²ÄÁÏ¿ÆÑ§Ó빤³Ì288·Ö£¬Çóµ÷¼Á
ÒѾÓÐ10È˻ظ´
һ־Ըͬ¼Ã´óѧ323·Ö£¨080500£©Çóµ÷¼Á
ÒѾÓÐ6È˻ظ´
Ò»Ö¾Ô¸085600ÖпÆÔºÄþ²¨Ëù276·ÖÇóµ÷¼Á
ÒѾÓÐ26È˻ظ´
²ÄÁÏר˶322·Ö
ÒѾÓÐ7È˻ظ´
²ÄÁϵ÷¼Á
ÒѾÓÐ4È˻ظ´
294·Ö080500²ÄÁÏ¿ÆÑ§Ó빤³ÌÇóµ÷¼Á
ÒѾÓÐ17È˻ظ´

youmengtian
ͳæ (³õÈëÎÄ̳)
- Ó¦Öú: 3 (Ó×¶ùÔ°)
- ½ð±Ò: 1072
- ºì»¨: 1
- Ìû×Ó: 36
- ÔÚÏß: 26.4Сʱ
- ³æºÅ: 2408430
- ×¢²á: 2013-04-09
- רҵ: ȼÉÕѧ
|
¿ÉÒÔ³¢ÊÔgcc test.c -o -IGL -Iglut ·¢×ÔСľ³æAndroid¿Í»§¶Ë |
8Â¥2015-10-20 08:53:43
2Â¥2015-10-19 23:07:53
lvweizhong
ͳæ (ÖøÃûдÊÖ)
- Ó¦Öú: 57 (³õÖÐÉú)
- ½ð±Ò: 3181.3
- ºì»¨: 10
- ɳ·¢: 1
- Ìû×Ó: 2064
- ÔÚÏß: 167.6Сʱ
- ³æºÅ: 3683385
- ×¢²á: 2015-02-09
- רҵ: ÊýÂÛ
3Â¥2015-10-19 23:09:21
Âí¶«Ñô
Òø³æ (СÓÐÃûÆø)
- Ó¦Öú: 0 (Ó×¶ùÔ°)
- ½ð±Ò: 2042.2
- É¢½ð: 300
- Ìû×Ó: 118
- ÔÚÏß: 23.2Сʱ
- ³æºÅ: 2752467
- ×¢²á: 2013-10-25
- ÐÔ±ð: GG
- רҵ: »¯Ñ§¹¤³Ì¼°¹¤Òµ»¯Ñ§

4Â¥2015-10-20 07:43:08














;
»Ø¸´´ËÂ¥
Âí¶«Ñô
10