{"id":315383,"date":"2025-11-24T10:41:50","date_gmt":"2025-11-24T10:41:50","guid":{"rendered":"https:\/\/peraltafinancing.com\/animation\/opengl-computer-graphics-projects-on-solar-energy-solar-power\/"},"modified":"2025-11-24T10:41:50","modified_gmt":"2025-11-24T10:41:50","slug":"opengl-computer-graphics-projects-on-solar-energy-solar-power","status":"publish","type":"post","link":"https:\/\/fivemor.com\/?p=315383","title":{"rendered":"Opengl Computer Graphics Projects on Solar Energy Solar Power"},"content":{"rendered":"<p> <br \/>\n<\/p>\n<div id=\"\">\n<p><span style=\"font-size: 15px;\">void draw(){<\/span><\/p>\n<p><span style=\"font-size: 15px;\">if(day){<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glClearColor(0.9,0.9,0.9,0.0);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">}else{<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glClearColor(0.3,0.3,0.3,0.0);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">}<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glPushMatrix();<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glRotatef(angle,1,0,0);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glTranslatef(-10,20,-155);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glScaled(1,1,0.6);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">if(day){<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glColor3f(1,1,0);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">}else{<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glColor3f(1,1,1);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">}<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glutSolidSphere(5,100,100);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glPopMatrix();<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glPushMatrix();<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glTranslatef(0,-10,5);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glScaled(500,10,1000);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glColor3f(0.8,0.7,0.7);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glutSolidCube(1);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glPopMatrix();<\/span><\/p>\n<p><span style=\"font-size: 15px;\">drawHouse(-3,0,-55);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">drawHouse(-4,0,-35);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">drawHouse(-5,0,-15);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">drawHouse(-10,0,-15);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">\/\/Solar Panels<\/span><\/p>\n<p><span style=\"font-size: 15px;\">for(int i=-1;i&lt;3;i++)<\/span><\/p>\n<p><span style=\"font-size: 15px;\">{<\/span><\/p>\n<p><span style=\"font-size: 15px;\">for(int j=5;j&gt;-2;j&#8211;)<\/span><\/p>\n<p><span style=\"font-size: 15px;\">drawSolarPanel(i*2,1,j);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">}<\/span><\/p>\n<p><span style=\"font-size: 15px;\">\/\/draw power station.<\/span><\/p>\n<p><span style=\"font-size: 15px;\">stroke_output(0.8,1.8,&#8221;Power Station&#8221;);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">\/\/ transformer<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glPushMatrix();<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glTranslatef(15,5,-100);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">\/\/glScaled(0,2,0.2);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glColor3f(1,0.3,0.3);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glutSolidCube(15);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glPopMatrix();<\/span><\/p>\n<p><span style=\"font-size: 15px;\">\/\/Transformer Power levels<\/span><\/p>\n<p><span style=\"font-size: 15px;\">\/\/ y axis from 5 to 18 and show growth in one second delay<\/span><\/p>\n<p><span style=\"font-size: 15px;\">if(day){<\/span><\/p>\n<p><span style=\"font-size: 15px;\">if(grow&lt;=15000){<\/span><\/p>\n<p><span style=\"font-size: 15px;\">grow++;<\/span><\/p>\n<p><span style=\"font-size: 15px;\">angle+=0.002;<\/span><\/p>\n<p><span style=\"font-size: 15px;\">}<\/span><\/p>\n<p><span style=\"font-size: 15px;\">}<\/span><\/p>\n<p><span style=\"font-size: 15px;\">else{<\/span><\/p>\n<p><span style=\"font-size: 15px;\">if(grow&gt;=0){<\/span><\/p>\n<p><span style=\"font-size: 15px;\">grow&#8211;;<\/span><\/p>\n<p><span style=\"font-size: 15px;\">angle-=0.002;<\/span><\/p>\n<p><span style=\"font-size: 15px;\">}<\/span><\/p>\n<p><span style=\"font-size: 15px;\">}<\/span><\/p>\n<p><span style=\"font-size: 15px;\">if(grow&gt;1000){<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glPushMatrix();<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glTranslatef(14.8,-2,-99.8);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glScaled(1,0.05,1);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glColor3f(1,1,0);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glutSolidCube(15);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glPopMatrix();<\/span><\/p>\n<p><span style=\"font-size: 15px;\">}<\/span><\/p>\n<p><span style=\"font-size: 15px;\">if(grow&gt;2000){<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glPushMatrix();<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glTranslatef(14.8,-1,-99.8);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glScaled(1,0.05,1);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glColor3f(1,1,0);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glutSolidCube(15);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glPopMatrix();<\/span><\/p>\n<p><span style=\"font-size: 15px;\">}<\/span><\/p>\n<p><span style=\"font-size: 15px;\">if(grow&gt;3000){<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glPushMatrix();<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glTranslatef(14.8,0,-99.8);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glScaled(1,0.05,1);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glColor3f(1,1,0);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glutSolidCube(15);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glPopMatrix();<\/span><\/p>\n<p><span style=\"font-size: 15px;\">}<\/span><\/p>\n<p><span style=\"font-size: 15px;\">if(grow&gt;4000){<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glPushMatrix();<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glTranslatef(14.8,1,-99.8);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glScaled(1,0.05,1);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glColor3f(1,1,0);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glutSolidCube(15);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glPopMatrix();<\/span><\/p>\n<p><span style=\"font-size: 15px;\">}<\/span><\/p>\n<p><span style=\"font-size: 15px;\">if(grow&gt;5000){<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glPushMatrix();<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glTranslatef(14.8,2,-99.8);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glScaled(1,0.05,1);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glColor3f(1,1,0);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glutSolidCube(15);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glPopMatrix();<\/span><\/p>\n<p><span style=\"font-size: 15px;\">}<\/span><\/p>\n<p><span style=\"font-size: 15px;\">if(grow&gt;6000){<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glPushMatrix();<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glTranslatef(14.8,3,-99.8);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glScaled(1,0.05,1);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glColor3f(1,1,0);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glutSolidCube(15);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glPopMatrix();<\/span><\/p>\n<p><span style=\"font-size: 15px;\">}<\/span><\/p>\n<p><span style=\"font-size: 15px;\">if(grow&gt;7000){<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glPushMatrix();<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glTranslatef(14.8,4,-99.8);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glScaled(1,0.05,1);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glColor3f(1,1,0);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glutSolidCube(15);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glPopMatrix();<\/span><\/p>\n<p><span style=\"font-size: 15px;\">}<\/span><\/p>\n<p><span style=\"font-size: 15px;\">if(grow&gt;8000){<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glPushMatrix();<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glTranslatef(14.8,5,-99.8);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glScaled(1,0.05,1);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glColor3f(1,1,0);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glutSolidCube(15);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glPopMatrix();<\/span><\/p>\n<p><span style=\"font-size: 15px;\">}<\/span><\/p>\n<p><span style=\"font-size: 15px;\">if(grow&gt;9000){<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glPushMatrix();<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glTranslatef(14.8,6,-99.8);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glScaled(1,0.05,1);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glColor3f(1,1,0);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glutSolidCube(15);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glPopMatrix();<\/span><\/p>\n<p><span style=\"font-size: 15px;\">}<\/span><\/p>\n<p><span style=\"font-size: 15px;\">if(grow&gt;10000){<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glPushMatrix();<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glTranslatef(14.8,7,-99.8);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glScaled(1,0.05,1);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glColor3f(1,1,0);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glutSolidCube(15);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glPopMatrix();<\/span><\/p>\n<p><span style=\"font-size: 15px;\">}<\/span><\/p>\n<p><span style=\"font-size: 15px;\">if(grow&gt;11000){<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glPushMatrix();<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glTranslatef(14.8,8,-99.8);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glScaled(1,0.05,1);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glColor3f(1,1,0);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glutSolidCube(15);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glPopMatrix();<\/span><\/p>\n<p><span style=\"font-size: 15px;\">}<\/span><\/p>\n<p><span style=\"font-size: 15px;\">if(grow&gt;12000){<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glPushMatrix();<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glTranslatef(14.8,9,-99.8);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glScaled(1,0.05,1);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glColor3f(1,1,0);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glutSolidCube(15);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glPopMatrix();<\/span><\/p>\n<p><span style=\"font-size: 15px;\">}<\/span><\/p>\n<p><span style=\"font-size: 15px;\">if(grow&gt;13000){<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glPushMatrix();<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glTranslatef(14.8,10,-99.8);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glScaled(1,0.05,1);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glColor3f(1,1,0);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glutSolidCube(15);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glPopMatrix();<\/span><\/p>\n<p><span style=\"font-size: 15px;\">}<\/span><\/p>\n<p><span style=\"font-size: 15px;\">if(grow&gt;14000){<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glPushMatrix();<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glTranslatef(14.8,11,-99.8);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glScaled(1,0.05,1);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glColor3f(1,1,0);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glutSolidCube(15);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glPopMatrix();<\/span><\/p>\n<p><span style=\"font-size: 15px;\">}<\/span><\/p>\n<p><span style=\"font-size: 15px;\">if(grow&gt;15000){<\/span><\/p>\n<p><span style=\"font-size: 15px;\">}<\/span><\/p>\n<p><span style=\"font-size: 15px;\">}<\/span><\/p>\n<p><span style=\"font-size: 15px;\">void doDisplay()<\/span><\/p>\n<p><span style=\"font-size: 15px;\">{<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glLoadIdentity();<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glTranslatef(0.0f,0.0f,-13.0f);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">\/\/ Write your Own Code Here<\/span><\/p>\n<p><span style=\"font-size: 15px;\">if(help1){<\/span><\/p>\n<p><span style=\"font-size: 15px;\">help();<\/span><\/p>\n<p><span style=\"font-size: 15px;\">}<\/span><\/p>\n<p><span style=\"font-size: 15px;\">else<\/span><\/p>\n<p><span style=\"font-size: 15px;\">{<\/span><\/p>\n<p><span style=\"font-size: 15px;\">draw();<\/span><\/p>\n<p><span style=\"font-size: 15px;\">}<\/span><\/p>\n<p><span style=\"font-size: 15px;\">GLfloat mat_ambient[]={0.0f,1.0f,2.0f,1.0f};<\/span><\/p>\n<p><span style=\"font-size: 15px;\">GLfloat mat_diffuse[]={0.0f,1.5f,.5f,1.0f};<\/span><\/p>\n<p><span style=\"font-size: 15px;\">GLfloat mat_specular[]={5.0f,1.0f,1.0f,1.0f};<\/span><\/p>\n<p><span style=\"font-size: 15px;\">GLfloat mat_shininess[]={100.0f};<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glMaterialfv(GL_FRONT,GL_AMBIENT,mat_ambient);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glMaterialfv(GL_FRONT,GL_DIFFUSE,mat_diffuse);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glMaterialfv(GL_FRONT,GL_SPECULAR,mat_specular);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glMaterialfv(GL_FRONT,GL_SHININESS,mat_shininess);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">\/*GLfloat lightIntensity[]={3.7f,0.7f,0.7f,1.0f}; Orange<\/span><\/p>\n<p><span style=\"font-size: 15px;\">GLfloat light_position[]={2.0f,5.0f,3.0f,1.0f};*\/<\/span><\/p>\n<p><span style=\"font-size: 15px;\">\/*light source properties*\/<\/span><\/p>\n<p><span style=\"font-size: 15px;\">\/\/if(day){<\/span><\/p>\n<p><span style=\"font-size: 15px;\">GLfloat lightIntensity[]={1.7f,1.7f,1.7f,1.0f};<\/span><\/p>\n<p><span style=\"font-size: 15px;\">GLfloat light_position[]={2.0f,0.0f,0.0f,0.0f};<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glLightfv(GL_LIGHT0,GL_POSITION,light_position);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">GLfloat light_position2[]={0.0f,0.0f,8.0f,0.0f};<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glLightfv(GL_LIGHT0,GL_POSITION,light_position2);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">GLfloat light_position3[]={0.0f,5.0f,15.0f,0.0f};<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glLightfv(GL_LIGHT0,GL_POSITION,light_position3);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glLightfv(GL_LIGHT0,GL_DIFFUSE,lightIntensity);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">\/*}else{<\/span><\/p>\n<p><span style=\"font-size: 15px;\">GLfloat lightIntensity[]={0.7f,0.7f,0.7f,0.5f};<\/span><\/p>\n<p><span style=\"font-size: 15px;\">GLfloat light_position[]={2.0f,0.0f,0.0f,0.0f};<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glLightfv(GL_LIGHT0,GL_POSITION,light_position);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">GLfloat light_position2[]={0.0f,0.0f,8.0f,0.0f};<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glLightfv(GL_LIGHT0,GL_POSITION,light_position2);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">GLfloat light_position3[]={0.0f,2.0f,2.0f,0.0f};<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glLightfv(GL_LIGHT0,GL_POSITION,light_position3);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glLightfv(GL_LIGHT0,GL_DIFFUSE,lightIntensity);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">}*\/<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glFlush();<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glutSwapBuffers();<\/span><\/p>\n<p><span style=\"font-size: 15px;\">}<\/span><\/p>\n<p><span style=\"font-size: 15px;\">void mykey(unsigned char key,int x,int y)<\/span><\/p>\n<p><span style=\"font-size: 15px;\">{<\/span><\/p>\n<p><span style=\"font-size: 15px;\">if(key==&#8217;q&#8217;||key==&#8217;Q&#8217;)<\/span><\/p>\n<p><span style=\"font-size: 15px;\">{<\/span><\/p>\n<p><span style=\"font-size: 15px;\">exit(0);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">}<\/span><\/p>\n<p><span style=\"font-size: 15px;\">if(key==&#8217;h&#8217;||key==&#8217;H&#8217;)<\/span><\/p>\n<p><span style=\"font-size: 15px;\">{<\/span><\/p>\n<p><span style=\"font-size: 15px;\">help1=!help1;<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glutPostRedisplay();<\/span><\/p>\n<p><span style=\"font-size: 15px;\">}<\/span><\/p>\n<p><span style=\"font-size: 15px;\">if(key==&#8217;s&#8217; || key==&#8217;S&#8217;){<\/span><\/p>\n<p><span style=\"font-size: 15px;\">if(day){<\/span><\/p>\n<p><span style=\"font-size: 15px;\">day=false;<\/span><\/p>\n<p><span style=\"font-size: 15px;\">}else{<\/span><\/p>\n<p><span style=\"font-size: 15px;\">day=true;<\/span><\/p>\n<p><span style=\"font-size: 15px;\">}<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glutPostRedisplay();<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glutIdleFunc(doDisplay);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">}<\/span><\/p>\n<p><span style=\"font-size: 15px;\">}<\/span><\/p>\n<p><span style=\"font-size: 15px;\">int main(int argc, char *argv[])<\/span><\/p>\n<p><span style=\"font-size: 15px;\">{<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glutInit(&amp;argc, argv);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glutInitDisplayMode(GLUT_DOUBLE|GLUT_RGB);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glutInitWindowSize(640,480);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glutInitWindowPosition(0,0);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glutCreateWindow(&#8220;Solar power&#8221;);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glutDisplayFunc(doDisplay);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glEnable(GL_LIGHTING);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glEnable(GL_LIGHT0);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glShadeModel(GL_SMOOTH);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glEnable(GL_DEPTH_TEST);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glEnable(GL_NORMALIZE);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glutKeyboardFunc(mykey);<\/span><\/p>\n<p><span style=\"font-size: 15px;\">doInit();<\/span><\/p>\n<p><span style=\"font-size: 15px;\">glutMainLoop();<\/span><\/p>\n<p><span style=\"font-size: 15px;\">return 0;<\/span><\/p>\n<p><span style=\"font-size: 15px;\">}<\/span><\/p>\n<\/div>\n\n","protected":false},"excerpt":{"rendered":"<p>void draw(){ if(day){ glClearColor(0.9,0.9,0.9,0.0); }else{ glClearColor(0.3,0.3,0.3,0.0); } glPushMatrix(); glRotatef(angle,1,0,0); glTranslatef(-10,20,-155); glScaled(1,1,0.6); if(day){ glColor3f(1,1,0); }else{ glColor3f(1,1,1); } glutSolidSphere(5,100,100); glPopMatrix(); glPushMatrix(); glTranslatef(0,-10,5); glScaled(500,10,1000); glColor3f(0.8,0.7,0.7); glutSolidCube(1); glPopMatrix(); drawHouse(-3,0,-55); drawHouse(-4,0,-35); drawHouse(-5,0,-15); drawHouse(-10,0,-15); \/\/Solar Panels for(int i=-1;i&lt;3;i++) { for(int j=5;j&gt;-2;j&#8211;) drawSolarPanel(i*2,1,j); } \/\/draw power station. stroke_output(0.8,1.8,&#8221;Power Station&#8221;); \/\/ transformer glPushMatrix(); glTranslatef(15,5,-100); \/\/glScaled(0,2,0.2); glColor3f(1,0.3,0.3); glutSolidCube(15); glPopMatrix(); \/\/Transformer Power levels \/\/ y [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":315385,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12035],"tags":[4507,974,2457,17996,1783,4799,3152],"dealstore":[],"offerexpiration":[],"class_list":["post-315383","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-animation","tag-computer","tag-energy","tag-graphics","tag-opengl","tag-power","tag-projects","tag-solar"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Opengl Computer Graphics Projects on Solar Energy Solar Power - Som2ny Network<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/fivemor.com\/?p=315383\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Opengl Computer Graphics Projects on Solar Energy Solar Power - Som2ny Network\" \/>\n<meta property=\"og:description\" content=\"void draw(){ if(day){ glClearColor(0.9,0.9,0.9,0.0); }else{ glClearColor(0.3,0.3,0.3,0.0); } glPushMatrix(); glRotatef(angle,1,0,0); glTranslatef(-10,20,-155); glScaled(1,1,0.6); if(day){ glColor3f(1,1,0); }else{ glColor3f(1,1,1); } glutSolidSphere(5,100,100); glPopMatrix(); glPushMatrix(); glTranslatef(0,-10,5); glScaled(500,10,1000); glColor3f(0.8,0.7,0.7); glutSolidCube(1); glPopMatrix(); drawHouse(-3,0,-55); drawHouse(-4,0,-35); drawHouse(-5,0,-15); drawHouse(-10,0,-15); \/\/Solar Panels for(int i=-1;i&lt;3;i++) { for(int j=5;j&gt;-2;j&#8211;) drawSolarPanel(i*2,1,j); } \/\/draw power station. stroke_output(0.8,1.8,&#8221;Power Station&#8221;); \/\/ transformer glPushMatrix(); glTranslatef(15,5,-100); \/\/glScaled(0,2,0.2); glColor3f(1,0.3,0.3); glutSolidCube(15); glPopMatrix(); \/\/Transformer Power levels \/\/ y [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/fivemor.com\/?p=315383\" \/>\n<meta property=\"og:site_name\" content=\"Som2ny Network\" \/>\n<meta property=\"article:published_time\" content=\"2025-11-24T10:41:50+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/11\/Opengl20Computer20Graphics20Projects20on20Solar20Energy20Solar20Power.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"729\" \/>\n\t<meta property=\"og:image:height\" content=\"389\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/fivemor.com\/?p=315383#article\",\"isPartOf\":{\"@id\":\"https:\/\/fivemor.com\/?p=315383\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371\"},\"headline\":\"Opengl Computer Graphics Projects on Solar Energy Solar Power\",\"datePublished\":\"2025-11-24T10:41:50+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/fivemor.com\/?p=315383\"},\"wordCount\":566,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/fivemor.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/fivemor.com\/?p=315383#primaryimage\"},\"thumbnailUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/11\/Opengl20Computer20Graphics20Projects20on20Solar20Energy20Solar20Power.jpg\",\"keywords\":[\"Computer\",\"Energy\",\"Graphics\",\"OpenGL\",\"Power\",\"Projects\",\"Solar\"],\"articleSection\":[\"Animation\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/fivemor.com\/?p=315383#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/fivemor.com\/?p=315383\",\"url\":\"https:\/\/fivemor.com\/?p=315383\",\"name\":\"Opengl Computer Graphics Projects on Solar Energy Solar Power - Som2ny Network\",\"isPartOf\":{\"@id\":\"https:\/\/fivemor.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/fivemor.com\/?p=315383#primaryimage\"},\"image\":{\"@id\":\"https:\/\/fivemor.com\/?p=315383#primaryimage\"},\"thumbnailUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/11\/Opengl20Computer20Graphics20Projects20on20Solar20Energy20Solar20Power.jpg\",\"datePublished\":\"2025-11-24T10:41:50+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/fivemor.com\/?p=315383#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/fivemor.com\/?p=315383\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/fivemor.com\/?p=315383#primaryimage\",\"url\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/11\/Opengl20Computer20Graphics20Projects20on20Solar20Energy20Solar20Power.jpg\",\"contentUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/11\/Opengl20Computer20Graphics20Projects20on20Solar20Energy20Solar20Power.jpg\",\"width\":729,\"height\":389},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/fivemor.com\/?p=315383#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/fivemor.com\/?bp_activities=1\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Opengl Computer Graphics Projects on Solar Energy Solar Power\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/fivemor.com\/#website\",\"url\":\"https:\/\/fivemor.com\/\",\"name\":\"Som2ny Network\",\"description\":\"Daily Deals\",\"publisher\":{\"@id\":\"https:\/\/fivemor.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/fivemor.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/fivemor.com\/#organization\",\"name\":\"Som2ny Network\",\"url\":\"https:\/\/fivemor.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/4a0953c4-logo-300x86-1.png\",\"contentUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/4a0953c4-logo-300x86-1.png\",\"width\":300,\"height\":86,\"caption\":\"Som2ny Network\"},\"image\":{\"@id\":\"https:\/\/fivemor.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/729ae85bf62b9917e93538db2f2688ca?s=96&r=g&default=https%3A%2F%2Ffivemor.com%2Fwp-content%2Fplugins%2Fbuddypress-first-letter-avatar%2Fimages%2Fdefault%2F96%2Flatin_a.png\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/729ae85bf62b9917e93538db2f2688ca?s=96&r=g&default=https%3A%2F%2Ffivemor.com%2Fwp-content%2Fplugins%2Fbuddypress-first-letter-avatar%2Fimages%2Fdefault%2F96%2Flatin_a.png\",\"caption\":\"admin\"},\"sameAs\":[\"https:\/\/fivemor.com\"],\"url\":\"https:\/\/fivemor.com\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Opengl Computer Graphics Projects on Solar Energy Solar Power - Som2ny Network","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/fivemor.com\/?p=315383","og_locale":"en_US","og_type":"article","og_title":"Opengl Computer Graphics Projects on Solar Energy Solar Power - Som2ny Network","og_description":"void draw(){ if(day){ glClearColor(0.9,0.9,0.9,0.0); }else{ glClearColor(0.3,0.3,0.3,0.0); } glPushMatrix(); glRotatef(angle,1,0,0); glTranslatef(-10,20,-155); glScaled(1,1,0.6); if(day){ glColor3f(1,1,0); }else{ glColor3f(1,1,1); } glutSolidSphere(5,100,100); glPopMatrix(); glPushMatrix(); glTranslatef(0,-10,5); glScaled(500,10,1000); glColor3f(0.8,0.7,0.7); glutSolidCube(1); glPopMatrix(); drawHouse(-3,0,-55); drawHouse(-4,0,-35); drawHouse(-5,0,-15); drawHouse(-10,0,-15); \/\/Solar Panels for(int i=-1;i&lt;3;i++) { for(int j=5;j&gt;-2;j&#8211;) drawSolarPanel(i*2,1,j); } \/\/draw power station. stroke_output(0.8,1.8,&#8221;Power Station&#8221;); \/\/ transformer glPushMatrix(); glTranslatef(15,5,-100); \/\/glScaled(0,2,0.2); glColor3f(1,0.3,0.3); glutSolidCube(15); glPopMatrix(); \/\/Transformer Power levels \/\/ y [&hellip;]","og_url":"https:\/\/fivemor.com\/?p=315383","og_site_name":"Som2ny Network","article_published_time":"2025-11-24T10:41:50+00:00","og_image":[{"width":729,"height":389,"url":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/11\/Opengl20Computer20Graphics20Projects20on20Solar20Energy20Solar20Power.jpg","type":"image\/jpeg"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/fivemor.com\/?p=315383#article","isPartOf":{"@id":"https:\/\/fivemor.com\/?p=315383"},"author":{"name":"admin","@id":"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371"},"headline":"Opengl Computer Graphics Projects on Solar Energy Solar Power","datePublished":"2025-11-24T10:41:50+00:00","mainEntityOfPage":{"@id":"https:\/\/fivemor.com\/?p=315383"},"wordCount":566,"commentCount":0,"publisher":{"@id":"https:\/\/fivemor.com\/#organization"},"image":{"@id":"https:\/\/fivemor.com\/?p=315383#primaryimage"},"thumbnailUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/11\/Opengl20Computer20Graphics20Projects20on20Solar20Energy20Solar20Power.jpg","keywords":["Computer","Energy","Graphics","OpenGL","Power","Projects","Solar"],"articleSection":["Animation"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/fivemor.com\/?p=315383#respond"]}]},{"@type":"WebPage","@id":"https:\/\/fivemor.com\/?p=315383","url":"https:\/\/fivemor.com\/?p=315383","name":"Opengl Computer Graphics Projects on Solar Energy Solar Power - Som2ny Network","isPartOf":{"@id":"https:\/\/fivemor.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/fivemor.com\/?p=315383#primaryimage"},"image":{"@id":"https:\/\/fivemor.com\/?p=315383#primaryimage"},"thumbnailUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/11\/Opengl20Computer20Graphics20Projects20on20Solar20Energy20Solar20Power.jpg","datePublished":"2025-11-24T10:41:50+00:00","breadcrumb":{"@id":"https:\/\/fivemor.com\/?p=315383#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/fivemor.com\/?p=315383"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fivemor.com\/?p=315383#primaryimage","url":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/11\/Opengl20Computer20Graphics20Projects20on20Solar20Energy20Solar20Power.jpg","contentUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2025\/11\/Opengl20Computer20Graphics20Projects20on20Solar20Energy20Solar20Power.jpg","width":729,"height":389},{"@type":"BreadcrumbList","@id":"https:\/\/fivemor.com\/?p=315383#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/fivemor.com\/?bp_activities=1"},{"@type":"ListItem","position":2,"name":"Opengl Computer Graphics Projects on Solar Energy Solar Power"}]},{"@type":"WebSite","@id":"https:\/\/fivemor.com\/#website","url":"https:\/\/fivemor.com\/","name":"Som2ny Network","description":"Daily Deals","publisher":{"@id":"https:\/\/fivemor.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/fivemor.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/fivemor.com\/#organization","name":"Som2ny Network","url":"https:\/\/fivemor.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fivemor.com\/#\/schema\/logo\/image\/","url":"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/4a0953c4-logo-300x86-1.png","contentUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/4a0953c4-logo-300x86-1.png","width":300,"height":86,"caption":"Som2ny Network"},"image":{"@id":"https:\/\/fivemor.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fivemor.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/729ae85bf62b9917e93538db2f2688ca?s=96&r=g&default=https%3A%2F%2Ffivemor.com%2Fwp-content%2Fplugins%2Fbuddypress-first-letter-avatar%2Fimages%2Fdefault%2F96%2Flatin_a.png","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/729ae85bf62b9917e93538db2f2688ca?s=96&r=g&default=https%3A%2F%2Ffivemor.com%2Fwp-content%2Fplugins%2Fbuddypress-first-letter-avatar%2Fimages%2Fdefault%2F96%2Flatin_a.png","caption":"admin"},"sameAs":["https:\/\/fivemor.com"],"url":"https:\/\/fivemor.com\/?author=1"}]}},"_links":{"self":[{"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/posts\/315383","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=315383"}],"version-history":[{"count":0,"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/posts\/315383\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/media\/315385"}],"wp:attachment":[{"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=315383"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=315383"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=315383"},{"taxonomy":"dealstore","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fdealstore&post=315383"},{"taxonomy":"offerexpiration","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fofferexpiration&post=315383"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}