<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2020194800836807725</id><updated>2026-04-06T02:53:15.982+05:30</updated><category term="Games"/><category term="Tutorial"/><category term="Complex Projects"/><category term="Simple Project"/><category term="Solar system"/><category term="3D Projects"/><category term="Networking Based Project"/><category term="Android"/><category term="3D Objects"/><category term="Gear Motion"/><category term="Clock"/><category term="Complex Project"/><category term="Flag"/><category term="Font Demo"/><category term="Nuclear Power Plant"/><category term="OpenGL Tutorial"/><category term="Tower of Hanoi"/><category term="Triangular Animation"/><category term="Fluids"/><category term="Graphics Editor"/><category term="Linked List"/><category term="Ludo Board Game"/><category term="Mancala board games"/><category term="Minesweeper"/><category term="Moving Ship"/><category term="OpenGL ES"/><category term="Robot"/><category term="SNAKE XENZIA GAME"/><category term="Simple Drawing"/><category term="Simple Haloed Lined Wireframe"/><category term="Simple Move Light"/><category term="Simulation"/><category term="Sorting"/><category term="Sphere"/><category term="Spot Light Swing"/><category term="Taj Mahal"/><category term="The Edge Game"/><category term="sample c++ opengl code"/><category term="3D Bi-Cycle"/><category term="3D Car"/><category term="3D Game"/><category term="3D Laptop"/><category term="3D Zoo"/><category term="Algorithm"/><category term="Animation"/><category term="Aquarium"/><category term="Astronomer"/><category term="Bellman-Ford Algorithm"/><category term="Block Breaker"/><category term="Blockshooting"/><category term="Bucket Sort"/><category term="Bézier curves"/><category term="C#"/><category term="Chess"/><category term="Code Blocks"/><category term="Colors"/><category term="Crab Pong"/><category term="Cricket"/><category term="Cross Zero"/><category term="DSAV"/><category term="Data Communication"/><category term="Doll"/><category term="Electromagnetic induction"/><category term="Engineering Students"/><category term="Escapa"/><category term="Fighter Jet"/><category term="First Come First Serve"/><category term="Flag Hoisting"/><category term="GlutDino"/><category term="Glutplane"/><category term="Hawkeye"/><category term="IC engine"/><category term="Java"/><category term="Java OpenGL Graphics Programming"/><category term="Light Torus"/><category term="Martyr’s Monument"/><category term="Memory Game"/><category term="Memory blocks game"/><category term="Menu"/><category term="Mickey Mouse"/><category term="Miniature Steam Engine"/><category term="Motion Blur"/><category term="MoveLight"/><category term="Movie Based Projects"/><category term="Multiplex"/><category term="OS Based Projects"/><category term="Olympic"/><category term="OpenGL Programming"/><category term="OpenGL Projects"/><category term="Origami"/><category term="PI Day"/><category term="Paint"/><category term="Paper Folding"/><category term="Particles Drop"/><category term="Path Finding"/><category term="Pendulum"/><category term="Physics Projects"/><category term="Pong Game"/><category term="Project Report"/><category term="Projects Report"/><category term="Puzzles"/><category term="Queuqe"/><category term="Random Flowing lines"/><category term="Ray"/><category term="Rigid Body"/><category term="Rings"/><category term="Rubiks Cube"/><category term="Screen Saver"/><category term="Screen Saver Ship"/><category term="Shadow Cube"/><category term="Shadowfun"/><category term="Shaheed Minar"/><category term="Ship Iceberg"/><category term="Solar"/><category term="Space Invaders"/><category term="Space Shooter"/><category term="Stack"/><category term="Stars"/><category term="Sun"/><category term="Tic Tac Toe"/><category term="Traffic Signal"/><category term="Transformation"/><category term="Transformers"/><category term="Trippy"/><category term="Whirlpool"/><category term="flag of usa"/><category term="iOS"/><category term="iPhone"/><category term="moth"/><category term="moving car"/><category term="opengl c++ examples"/><category term="ping pong"/><category term="qix like"/><category term="water ripple effects"/><title type='text'>OpenGL Projects</title><subtitle type='html'>OpenGL Projects is all about the cg graphics programming particularly for VTU CSE students. OpenGL Projects also cover the topics over opengl tutorials, graphics tutorials and android programming</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.openglprojects.in/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2020194800836807725/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://www.openglprojects.in/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/2020194800836807725/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Rajeev</name><uri>http://www.blogger.com/profile/03147189487850777395</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>226</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2020194800836807725.post-1939455536235107480</id><published>2026-03-14T18:55:00.002+05:30</published><updated>2026-03-14T19:01:30.952+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="PI Day"/><title type='text'>Pi Day: Where Math Meets a Slice of Fun</title><content type='html'>&lt;p&gt;Every year on &lt;strong data-end=&quot;80&quot; data-start=&quot;61&quot;&gt;March 14 (3/14)&lt;/strong&gt;, all the math lovers around the world celebrate &lt;strong data-end=&quot;131&quot; data-start=&quot;121&quot;&gt;Pi Day&amp;nbsp;&lt;/strong&gt;—as a tribute to the mathematical constant &lt;strong data-end=&quot;181&quot; data-start=&quot;171&quot;&gt;π (pi). &lt;/strong&gt;The Value of Pi is&amp;nbsp;&lt;strong data-end=&quot;227&quot; data-start=&quot;219&quot;&gt;3.14&lt;/strong&gt;. upto two decimal place. As these may be slipt to 3 and 14 represeting 3 as march month and 14 as date, hence PI DAY.&amp;nbsp;This quirky holiday blends geeky fun with delicious pies, making math feel less intimidating and more indulgent.&lt;/p&gt;&lt;p&gt;Also the Value of Pi is long ending with each mathematician has cacluate to some extent of decimal places. The&amp;nbsp;Pi represents the ratio of a circle’s circumference to its diameter and appears in countless formulas, theorem, thesis etc and used in various feilds including science, engineering, and technology. PI being an infinite and non-repeating number, it has become one of the most famous constants in mathematics.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiN5j7WJDkBIRffx6OD956NsKPGdOiiw5bSSpfFqVLa4yBF7d3lbzubQCTcPDyijsjo2O5g0G-IHAMIWp5mXnbWAtrKKFk_wS99qQgdvTrpCbt24ULUxnz58Yjkd2N8FE1ZIW-q0Vo0fg-1u7M1FjePxMi1HeOW8Hbir7fDgDeHCbGvaa-8DobqIY_Ift0s/s1024/PI%20DAY.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1024&quot; data-original-width=&quot;1024&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiN5j7WJDkBIRffx6OD956NsKPGdOiiw5bSSpfFqVLa4yBF7d3lbzubQCTcPDyijsjo2O5g0G-IHAMIWp5mXnbWAtrKKFk_wS99qQgdvTrpCbt24ULUxnz58Yjkd2N8FE1ZIW-q0Vo0fg-1u7M1FjePxMi1HeOW8Hbir7fDgDeHCbGvaa-8DobqIY_Ift0s/s320/PI%20DAY.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;When it statrtd PI DAY?&lt;/h2&gt;
&lt;p data-end=&quot;811&quot; data-start=&quot;533&quot; style=&quot;text-align: justify;&quot;&gt;Today is Pi Day, celebrated on March 14 (or 3.14) to honor the mathematical constant π.&amp;nbsp;&lt;/p&gt;&lt;p data-end=&quot;811&quot; data-start=&quot;533&quot; style=&quot;text-align: justify;&quot;&gt;Interestingly, Pi Day began in&amp;nbsp;&lt;strong data-end=&quot;1324&quot; data-start=&quot;1278&quot;&gt;1988 at the Exploratorium in San Francisco&lt;/strong&gt;, where physicist Larry Shaw organized the first celebration. Over time, the tradition spread worldwide and even gained official recognition in the United States in 2009.&lt;/p&gt;&lt;p data-end=&quot;811&quot; data-start=&quot;533&quot; style=&quot;text-align: justify;&quot;&gt;The Story of Origin: 1988 At the San Francisco Exploratorium, Pi Day was first officially observed. It was created by Larry Shaw, a physicist known as the &quot;Prince of Pi.&quot; Shaw selected March 14 (3/14) as the date because it corresponds to the first three digits of the mathematical constant: 3.14. The Ritual: Shaw and his employees marched around one of the museum&#39;s circular areas as part of the first celebration, after which they ate a lot of fruit pies.The Logistics: Shaw discovered that &quot;pi&quot; and &quot;pie&quot; are homophones in addition to pies are—conveniently—circular in a flash of insight (or maybe just hunger).The Celebration&#39;s Development What was once a specialized staff party swiftly became a worldwide sensation.&lt;/p&gt;&lt;p data-end=&quot;811&quot; data-start=&quot;533&quot;&gt;Today, enthusiasts recite its endless digits, bake π-themed pies, and share memes poking fun at its irrational nature. In 2026, social media buzzes with crypto twists and cat-in-chef-hat antics, turning classrooms into pie parties.&lt;/p&gt;&lt;p data-end=&quot;1245&quot; data-start=&quot;865&quot;&gt;One of the reasons Pi Day is so popular is the &lt;strong data-end=&quot;954&quot; data-start=&quot;912&quot;&gt;endless supply of math jokes and memes&lt;/strong&gt;. After all, when a mathematical constant sounds exactly like a dessert, the internet can’t resist. You’ll often see jokes like: &lt;em data-end=&quot;1126&quot; data-start=&quot;1083&quot;&gt;“It’s okay, Pi Day is all about the pie!”&lt;/em&gt;—a reminder that sometimes learning math can be both educational and delicious.&lt;/p&gt;&lt;p data-end=&quot;1708&quot; data-start=&quot;1536&quot;&gt;So whether you’re a mathematician, a student, or just someone who enjoys dessert, Pi Day is a perfect reminder that &lt;strong data-end=&quot;1705&quot; data-start=&quot;1652&quot;&gt;math can be fun, creative, and surprisingly tasty&lt;/strong&gt;.&lt;/p&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Google PI Day Doodle&lt;/h2&gt;&lt;p data-end=&quot;1708&quot; data-start=&quot;1536&quot;&gt;Google has dedicate 14/03/2026 PI Day with a good mathematical Doodle as given -&amp;nbsp;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://www.google.com/logos/doodles/2026/pi-day-2026-6753651837111068.2-2xa.gif&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;400&quot; data-original-width=&quot;1000&quot; height=&quot;160&quot; src=&quot;https://www.google.com/logos/doodles/2026/pi-day-2026-6753651837111068.2-2xa.gif&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p data-end=&quot;1708&quot; data-start=&quot;1536&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p data-end=&quot;1708&quot; data-start=&quot;1536&quot;&gt;Google created a unique interactive Doodle in celebration of the ancient Greek mathematician Archimedes and his groundbreaking technique for determining the limits of pi in commemoration of Pi Day in 2026.&lt;/p&gt;&lt;p data-end=&quot;811&quot; data-start=&quot;533&quot;&gt;


&lt;/p&gt;&lt;p data-end=&quot;1822&quot; data-start=&quot;1710&quot;&gt;And remember: if anyone asks why you’re eating pie on March 14, just say it’s for &lt;strong data-end=&quot;1816&quot; data-start=&quot;1792&quot;&gt;educational purposes&lt;/strong&gt;. 😄&lt;/p&gt;&lt;p data-end=&quot;1822&quot; data-start=&quot;1710&quot;&gt;Why not join in? Grab a slice of apple pie, ponder infinity, and remember: even Einstein would approve. Pi reminds us circles are endless—and so is the joy in a good pun. Happy Pi Day! (198 words) PI Day Video for you -https://www.youtube.com/shorts/ZWlDDm_R_HQ&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.openglprojects.in/feeds/1939455536235107480/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.openglprojects.in/2026/03/pi-day-where-math-meets-slice-of-fun.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2020194800836807725/posts/default/1939455536235107480'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2020194800836807725/posts/default/1939455536235107480'/><link rel='alternate' type='text/html' href='http://www.openglprojects.in/2026/03/pi-day-where-math-meets-slice-of-fun.html' title='Pi Day: Where Math Meets a Slice of Fun'/><author><name>Rajeev</name><uri>http://www.blogger.com/profile/03147189487850777395</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiN5j7WJDkBIRffx6OD956NsKPGdOiiw5bSSpfFqVLa4yBF7d3lbzubQCTcPDyijsjo2O5g0G-IHAMIWp5mXnbWAtrKKFk_wS99qQgdvTrpCbt24ULUxnz58Yjkd2N8FE1ZIW-q0Vo0fg-1u7M1FjePxMi1HeOW8Hbir7fDgDeHCbGvaa-8DobqIY_Ift0s/s72-c/PI%20DAY.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2020194800836807725.post-5706640564736930916</id><published>2026-03-05T03:13:00.002+05:30</published><updated>2026-03-05T03:25:24.961+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Engineering Students"/><category scheme="http://www.blogger.com/atom/ns#" term="OpenGL Projects"/><title type='text'>Top 20 OpenGL Projects for Engineering Students</title><content type='html'>&lt;h1 style=&quot;text-align: justify;&quot;&gt;ABSTRACT&lt;/h1&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Computer graphics plays an important role in fields such as gaming, simulation, visualization, and scientific computing. OpenGL is one of the most widely used graphics APIs for building cross-platform graphics applications. Through practical projects, engineering students can gain a deeper understanding of rendering pipelines, GPU programming, shaders, and 3D mathematics.&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;This report presents &lt;strong&gt;twenty OpenGL project ideas&lt;/strong&gt; categorized by difficulty level, including beginner, intermediate, and advanced projects. Each project is designed to strengthen practical skills in modern graphics programming using C++ and OpenGL. The goal of these projects is to help students develop the ability to design and implement real-time graphics applications.&lt;/p&gt;&lt;hr style=&quot;text-align: justify;&quot; /&gt;&lt;h1 style=&quot;text-align: justify;&quot;&gt;TABLE OF CONTENTS&lt;/h1&gt;&lt;ol&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Introduction&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Objectives&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Development Tools and Technologies&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Beginner-Level OpenGL Projects&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Intermediate-Level OpenGL Projects&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Advanced-Level OpenGL Projects&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Applications of OpenGL Projects&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Conclusion&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;References&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh93YvxElpMHy6EK8oYZOP8aHgA_X07xJbC7Chtff3Or3MG9Rtp7qX6wWzyxNvJKZD5oVcUrq78MTaX2Ys8uBO-9hu0afNLAphIyyfYlgs6ifaFZbw242L5xJ5f44AodnGGaxe4L0CL6EKSYgYUkIvHF4fQR5lRo0Q11s-KBTqLBc6I_VfDAX8l1zaP-LW2/s1600/Top%2020%20OpenGL%20Projects%20for%20Engineering%20Students.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;896&quot; data-original-width=&quot;1600&quot; height=&quot;358&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh93YvxElpMHy6EK8oYZOP8aHgA_X07xJbC7Chtff3Or3MG9Rtp7qX6wWzyxNvJKZD5oVcUrq78MTaX2Ys8uBO-9hu0afNLAphIyyfYlgs6ifaFZbw242L5xJ5f44AodnGGaxe4L0CL6EKSYgYUkIvHF4fQR5lRo0Q11s-KBTqLBc6I_VfDAX8l1zaP-LW2/w640-h358/Top%2020%20OpenGL%20Projects%20for%20Engineering%20Students.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;hr style=&quot;text-align: justify;&quot; /&gt;&lt;h1 style=&quot;text-align: justify;&quot;&gt;1. INTRODUCTION&lt;/h1&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;OpenGL (Open Graphics Library) is an industry-standard graphics API used for developing two-dimensional and three-dimensional graphics applications. It provides developers with the tools needed to control the GPU and implement efficient rendering pipelines.&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;In modern computer graphics education, practical implementation is essential. Students must understand how rendering works through real projects that demonstrate concepts such as:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Vertex processing&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Lighting models&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Texture mapping&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Shader programming&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Real-time rendering techniques&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;The following project list is structured to help engineering students progressively build their skills from fundamental graphics programming to advanced rendering systems.&lt;/p&gt;&lt;hr style=&quot;text-align: justify;&quot; /&gt;&lt;h1 style=&quot;text-align: justify;&quot;&gt;2. OBJECTIVES&lt;/h1&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;The objectives of these OpenGL projects are:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;To understand the fundamentals of computer graphics.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;To develop practical experience with OpenGL programming.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;To explore GPU-based rendering techniques.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;To implement interactive graphics applications.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;To prepare students for careers in graphics programming, game development, and simulation.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;hr style=&quot;text-align: justify;&quot; /&gt;&lt;h1 style=&quot;text-align: justify;&quot;&gt;3. DEVELOPMENT TOOLS AND TECHNOLOGIES&lt;/h1&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;The following tools are commonly used for OpenGL development.&lt;/p&gt;&lt;table style=&quot;text-align: justify;&quot;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Tool&lt;/th&gt;&lt;th&gt;Purpose&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;OpenGL&lt;/td&gt;&lt;td&gt;Graphics rendering API&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;C++&lt;/td&gt;&lt;td&gt;Primary programming language&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;GLFW&lt;/td&gt;&lt;td&gt;Window creation and input handling&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;GLAD / GLEW&lt;/td&gt;&lt;td&gt;OpenGL function loading&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;GLM&lt;/td&gt;&lt;td&gt;Mathematics library&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;stb_image&lt;/td&gt;&lt;td&gt;Texture loading&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Assimp&lt;/td&gt;&lt;td&gt;3D model loading&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Dear ImGui&lt;/td&gt;&lt;td&gt;User interface for debugging&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;These libraries simplify the development of modern OpenGL applications.&lt;/p&gt;&lt;hr style=&quot;text-align: justify;&quot; /&gt;&lt;h1 style=&quot;text-align: justify;&quot;&gt;4. BEGINNER-LEVEL OPENGL PROJECTS&lt;/h1&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;These projects introduce the fundamental concepts of rendering and graphics programming.&lt;/p&gt;&lt;h2 style=&quot;text-align: justify;&quot;&gt;4.1 2D Shape Drawing Application&lt;/h2&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;This project allows users to draw basic geometric shapes such as:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Lines&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Triangles&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Rectangles&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Circles&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Concepts learned:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Vertex buffers&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Rendering primitives&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;User input handling&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;hr style=&quot;text-align: justify;&quot; /&gt;&lt;h2 style=&quot;text-align: justify;&quot;&gt;4.2 Interactive Solar System Simulation&lt;/h2&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;This project simulates planetary motion where planets revolve around the sun.&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Features:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Orbital motion&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Planet rotation&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Keyboard-controlled camera&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Concepts learned:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Hierarchical transformations&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Rotation matrices&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;hr style=&quot;text-align: justify;&quot; /&gt;&lt;h2 style=&quot;text-align: justify;&quot;&gt;4.3 3D Cube Viewer&lt;/h2&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;A simple program displaying a cube that can be rotated, scaled, and translated.&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Concepts learned:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Model, View, Projection matrices&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Basic camera system&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;hr style=&quot;text-align: justify;&quot; /&gt;&lt;h2 style=&quot;text-align: justify;&quot;&gt;4.4 Texture Mapping Demonstration&lt;/h2&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Render textured objects such as cubes or spheres.&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Concepts learned:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;UV coordinates&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Texture sampling&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Texture filtering&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;hr style=&quot;text-align: justify;&quot; /&gt;&lt;h2 style=&quot;text-align: justify;&quot;&gt;4.5 Basic 3D Model Viewer&lt;/h2&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Load and render a 3D model file.&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Features:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Model loading&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Lighting&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Camera control&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Concepts learned:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Mesh structures&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Model rendering pipeline&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;hr style=&quot;text-align: justify;&quot; /&gt;&lt;h1 style=&quot;text-align: justify;&quot;&gt;5. INTERMEDIATE-LEVEL OPENGL PROJECTS&lt;/h1&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;These projects introduce more advanced graphics techniques.&lt;/p&gt;&lt;h2 style=&quot;text-align: justify;&quot;&gt;5.1 Real-Time Terrain Generator&lt;/h2&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Generate terrain using procedural methods such as noise functions.&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Concepts learned:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Heightmaps&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Procedural generation&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;hr style=&quot;text-align: justify;&quot; /&gt;&lt;h2 style=&quot;text-align: justify;&quot;&gt;5.2 3D Maze Navigation Game&lt;/h2&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;A small game where the player navigates through a maze using a first-person camera.&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Concepts learned:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Collision detection&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Camera systems&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Game logic&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;hr style=&quot;text-align: justify;&quot; /&gt;&lt;h2 style=&quot;text-align: justify;&quot;&gt;5.3 Particle System Simulation&lt;/h2&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Simulate visual effects such as fire, smoke, or rain.&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Concepts learned:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Particle systems&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;GPU instancing&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;hr style=&quot;text-align: justify;&quot; /&gt;&lt;h2 style=&quot;text-align: justify;&quot;&gt;5.4 Shadow Mapping&lt;/h2&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Implement dynamic shadows in a scene.&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Concepts learned:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Depth maps&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Framebuffer objects&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;hr style=&quot;text-align: justify;&quot; /&gt;&lt;h2 style=&quot;text-align: justify;&quot;&gt;5.5 Physics-Based Bouncing Ball Simulation&lt;/h2&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Simulate objects bouncing under gravity.&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Concepts learned:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Motion equations&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Collision response&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;hr style=&quot;text-align: justify;&quot; /&gt;&lt;h2 style=&quot;text-align: justify;&quot;&gt;5.6 First-Person Camera System&lt;/h2&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Develop a camera system similar to those used in FPS games.&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Features:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Mouse look&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Keyboard movement&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Perspective projection&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;hr style=&quot;text-align: justify;&quot; /&gt;&lt;h2 style=&quot;text-align: justify;&quot;&gt;5.7 Water Rendering Simulation&lt;/h2&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Render animated water surfaces.&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Concepts learned:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Reflection&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Refraction&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Wave animation&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;hr style=&quot;text-align: justify;&quot; /&gt;&lt;h1 style=&quot;text-align: justify;&quot;&gt;6. ADVANCED-LEVEL OPENGL PROJECTS&lt;/h1&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;These projects involve complex rendering algorithms and system design.&lt;/p&gt;&lt;h2 style=&quot;text-align: justify;&quot;&gt;6.1 Real-Time Ray Tracing (Hybrid)&lt;/h2&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Implement basic ray tracing techniques using shaders.&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Concepts learned:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Ray-object intersection&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Reflection and shadow calculations&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;hr style=&quot;text-align: justify;&quot; /&gt;&lt;h2 style=&quot;text-align: justify;&quot;&gt;6.2 Deferred Rendering Engine&lt;/h2&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Build a rendering pipeline capable of handling multiple lights efficiently.&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Concepts learned:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;G-buffer rendering&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Deferred shading&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;hr style=&quot;text-align: justify;&quot; /&gt;&lt;h2 style=&quot;text-align: justify;&quot;&gt;6.3 Procedural City Generator&lt;/h2&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Automatically generate buildings and urban layouts.&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Concepts learned:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Procedural modeling&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Scene generation&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;hr style=&quot;text-align: justify;&quot; /&gt;&lt;h2 style=&quot;text-align: justify;&quot;&gt;6.4 Cloth Simulation&lt;/h2&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Simulate cloth movement using physics models.&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Concepts learned:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Mass-spring systems&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Real-time simulation&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;hr style=&quot;text-align: justify;&quot; /&gt;&lt;h2 style=&quot;text-align: justify;&quot;&gt;6.5 GPU Fluid Simulation&lt;/h2&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Create a real-time fluid or smoke simulation.&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Concepts learned:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Numerical simulation&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Compute shaders&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;hr style=&quot;text-align: justify;&quot; /&gt;&lt;h2 style=&quot;text-align: justify;&quot;&gt;6.6 OpenGL Mini Game Engine&lt;/h2&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Develop a basic rendering engine supporting:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Scene management&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Lighting systems&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Model loading&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Camera control&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;hr style=&quot;text-align: justify;&quot; /&gt;&lt;h2 style=&quot;text-align: justify;&quot;&gt;6.7 Augmented Reality Viewer&lt;/h2&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Integrate computer vision with OpenGL rendering.&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Concepts learned:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Camera calibration&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Marker tracking&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;3D overlay rendering&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;hr style=&quot;text-align: justify;&quot; /&gt;&lt;h2 style=&quot;text-align: justify;&quot;&gt;6.8 Virtual Reality Scene Viewer&lt;/h2&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Render stereoscopic scenes for VR headsets.&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Concepts learned:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Stereo rendering&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Head tracking integration&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;hr style=&quot;text-align: justify;&quot; /&gt;&lt;h1 style=&quot;text-align: justify;&quot;&gt;7. APPLICATIONS OF OPENGL PROJECTS&lt;/h1&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;OpenGL-based systems are widely used in many industries:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Video game development&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Scientific visualization&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;CAD and engineering software&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Virtual reality systems&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Simulation and training environments&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Medical imaging visualization&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Developing OpenGL projects prepares students for careers in these fields.&lt;/p&gt;&lt;hr style=&quot;text-align: justify;&quot; /&gt;&lt;h1 style=&quot;text-align: justify;&quot;&gt;8. CONCLUSION&lt;/h1&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;OpenGL projects provide engineering students with hands-on experience in computer graphics programming. By implementing progressively complex projects, students can develop a deep understanding of rendering pipelines, shader programming, and real-time graphics techniques.&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;These twenty projects offer a structured pathway from beginner concepts to advanced graphics development, helping students build a strong foundation in modern graphics programming.&lt;/p&gt;&lt;hr style=&quot;text-align: justify;&quot; /&gt;&lt;h1 style=&quot;text-align: justify;&quot;&gt;9. REFERENCES&lt;/h1&gt;&lt;ol&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;OpenGL Architecture Review Board. &lt;em&gt;OpenGL Programming Guide&lt;/em&gt;.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Shreiner, Dave et al. &lt;em&gt;OpenGL SuperBible&lt;/em&gt;.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Akenine-Möller, Tomas et al. &lt;em&gt;Real-Time Rendering&lt;/em&gt;.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;OpenGL Official Documentation.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Graphics programming tutorials and educational resources.&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.openglprojects.in/feeds/5706640564736930916/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.openglprojects.in/2026/03/top-20-opengl-projects-for-engineering-students.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2020194800836807725/posts/default/5706640564736930916'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2020194800836807725/posts/default/5706640564736930916'/><link rel='alternate' type='text/html' href='http://www.openglprojects.in/2026/03/top-20-opengl-projects-for-engineering-students.html' title='Top 20 OpenGL Projects for Engineering Students'/><author><name>Rajeev</name><uri>http://www.blogger.com/profile/03147189487850777395</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh93YvxElpMHy6EK8oYZOP8aHgA_X07xJbC7Chtff3Or3MG9Rtp7qX6wWzyxNvJKZD5oVcUrq78MTaX2Ys8uBO-9hu0afNLAphIyyfYlgs6ifaFZbw242L5xJ5f44AodnGGaxe4L0CL6EKSYgYUkIvHF4fQR5lRo0Q11s-KBTqLBc6I_VfDAX8l1zaP-LW2/s72-w640-h358-c/Top%2020%20OpenGL%20Projects%20for%20Engineering%20Students.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2020194800836807725.post-1297154354431016757</id><published>2025-12-26T00:44:00.003+05:30</published><updated>2025-12-26T00:45:49.885+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Games"/><category scheme="http://www.blogger.com/atom/ns#" term="Space Shooter"/><title type='text'>Space Shooter game built with OpenGL -18CSL67/21CSL66</title><content type='html'>&lt;p&gt;Students &lt;span class=&quot;red&quot;&gt;at&lt;/span&gt; &lt;span class=&quot;blue&quot;&gt;Visvesvaraya Technological University (VTU) &lt;/span&gt;&lt;span class=&quot;red&quot;&gt;frequently&lt;/span&gt; &lt;span class=&quot;red&quot;&gt;engage&lt;/span&gt; &lt;span class=&quot;red&quot;&gt;in&lt;/span&gt;&lt;span class=&quot;blue&quot;&gt; OpenGL mini-projects as &lt;/span&gt;&lt;span class=&quot;red&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;red&quot;&gt;component&lt;/span&gt;&lt;span class=&quot;blue&quot;&gt; of the Computer Graphics and Visualization (18CSL67/21CSL66) course&lt;/span&gt;. The &lt;span class=&quot;red&quot;&gt;newest&lt;/span&gt; &lt;span class=&quot;red&quot;&gt;initiatives&lt;/span&gt; for 2025 &lt;span class=&quot;red&quot;&gt;focus&lt;/span&gt; &lt;span class=&quot;red&quot;&gt;on&lt;/span&gt;&lt;span class=&quot;blue&quot;&gt; interactive simulations and &lt;/span&gt;&lt;span class=&quot;red&quot;&gt;visual&lt;/span&gt; &lt;span class=&quot;red&quot;&gt;representations&lt;/span&gt; &lt;span class=&quot;red&quot;&gt;of&lt;/span&gt; &lt;span class=&quot;red&quot;&gt;algorithms.&lt;/span&gt;&lt;/p&gt;&lt;div data-pm-slice=&quot;2 1 []&quot;&gt;&lt;span class=&quot;blue&quot;&gt;A&amp;nbsp;&lt;span class=&quot;Yjhzub&quot; data-processed=&quot;true&quot; face=&quot;&amp;quot;Google Sans&amp;quot;, Arial, sans-serif&quot; jscontroller=&quot;zYmgkd&quot; jsuid=&quot;QL8uxb_a&quot; style=&quot;background-color: white; color: #0a0a0a; font-size: 16px; font-weight: bolder;&quot;&gt;Space Shooter game built with OpenGL&lt;/span&gt;&amp;nbsp;is a &lt;/span&gt;&lt;span class=&quot;red&quot;&gt;typical&lt;/span&gt; project for &lt;span class=&quot;red&quot;&gt;understanding&lt;/span&gt; computer graphics, &lt;span class=&quot;red&quot;&gt;usually&lt;/span&gt; developed &lt;span class=&quot;red&quot;&gt;in&lt;/span&gt; C++ language and &lt;span class=&quot;red&quot;&gt;utilizing&lt;/span&gt; &lt;span class=&quot;red&quot;&gt;well-known&lt;/span&gt; libraries &lt;span class=&quot;red&quot;&gt;such&lt;/span&gt; &lt;span class=&quot;red&quot;&gt;as&lt;/span&gt;&lt;span class=&quot;blue&quot;&gt; GLFW, GLUT, and GLEW&lt;/span&gt;.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;blue&quot;&gt;These games are &lt;/span&gt;&lt;span class=&quot;red&quot;&gt;typically&lt;/span&gt; 2D &lt;span class=&quot;red&quot;&gt;featuring&lt;/span&gt; &lt;span class=&quot;red&quot;&gt;traditional&lt;/span&gt; arcade-style &lt;span class=&quot;red&quot;&gt;mechanics&lt;/span&gt; and are &lt;span class=&quot;red&quot;&gt;frequently&lt;/span&gt; &lt;span class=&quot;red&quot;&gt;presented&lt;/span&gt; as &lt;span class=&quot;red&quot;&gt;assignments&lt;/span&gt; for courses &lt;span class=&quot;red&quot;&gt;in&lt;/span&gt;&lt;span class=&quot;blue&quot;&gt; computer graphics and visualization&lt;/span&gt;.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://camo.githubusercontent.com/0e279f06a563138f995e8eb0e5c5343f62096f6e90aa0fa9f4c8ab526d65cd52/68747470733a2f2f696d6775722e636f6d2f51657a396e76782e706e67&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;747&quot; data-original-width=&quot;1493&quot; height=&quot;320&quot; src=&quot;https://camo.githubusercontent.com/0e279f06a563138f995e8eb0e5c5343f62096f6e90aa0fa9f4c8ab526d65cd52/68747470733a2f2f696d6775722e636f6d2f51657a396e76782e706e67&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;red&quot;&gt;Typical&lt;/span&gt; &lt;span class=&quot;red&quot;&gt;Attributes&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;blue&quot;&gt;2D Graphics: The game &lt;/span&gt;&lt;span class=&quot;red&quot;&gt;mainly&lt;/span&gt; &lt;span class=&quot;red&quot;&gt;employs&lt;/span&gt; 2D rendering, &lt;span class=&quot;red&quot;&gt;leveraging&lt;/span&gt; OpenGL to &lt;span class=&quot;red&quot;&gt;render&lt;/span&gt;&lt;span class=&quot;blue&quot;&gt; points, lines, and polygons, which are &lt;/span&gt;&lt;span class=&quot;red&quot;&gt;subsequently&lt;/span&gt; textured to &lt;span class=&quot;red&quot;&gt;depict&lt;/span&gt;&lt;span class=&quot;blue&quot;&gt; spaceships, bullets, and backgrounds&lt;/span&gt;.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;red&quot;&gt;Game&lt;/span&gt; Mechanics:&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The &lt;span class=&quot;red&quot;&gt;gamer&lt;/span&gt; &lt;span class=&quot;red&quot;&gt;navigates&lt;/span&gt; a &lt;span class=&quot;red&quot;&gt;spacecraft&lt;/span&gt; &lt;span class=&quot;red&quot;&gt;around&lt;/span&gt; the &lt;span class=&quot;red&quot;&gt;display&lt;/span&gt; &lt;span class=&quot;red&quot;&gt;(typically&lt;/span&gt; using&lt;span class=&quot;blue&quot;&gt; &#39;W&#39;, &#39;S&#39;, &#39;A&#39;, &#39;D&#39; or &#39;I&#39;, &#39;K&#39;, &#39;J&#39;, &#39;L&#39; &lt;/span&gt;&lt;span class=&quot;red&quot;&gt;buttons)&lt;/span&gt; and &lt;span class=&quot;red&quot;&gt;fires&lt;/span&gt; &lt;span class=&quot;red&quot;&gt;at&lt;/span&gt; &lt;span class=&quot;red&quot;&gt;foes&lt;/span&gt; with &lt;span class=&quot;red&quot;&gt;designated&lt;/span&gt; keys.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Enemies &lt;span class=&quot;red&quot;&gt;may&lt;/span&gt; &lt;span class=&quot;red&quot;&gt;consist&lt;/span&gt; &lt;span class=&quot;red&quot;&gt;of&lt;/span&gt; &lt;span class=&quot;red&quot;&gt;standard&lt;/span&gt;&lt;span class=&quot;blue&quot;&gt; minions and bosses &lt;/span&gt;&lt;span class=&quot;red&quot;&gt;that&lt;/span&gt; &lt;span class=&quot;red&quot;&gt;have&lt;/span&gt; health bars.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;blue&quot;&gt;Collision detection is &lt;/span&gt;&lt;span class=&quot;red&quot;&gt;an&lt;/span&gt; &lt;span class=&quot;red&quot;&gt;essential&lt;/span&gt; &lt;span class=&quot;red&quot;&gt;aspect,&lt;/span&gt; &lt;span class=&quot;red&quot;&gt;frequently&lt;/span&gt; &lt;span class=&quot;red&quot;&gt;employing&lt;/span&gt;&lt;span class=&quot;blue&quot;&gt; Axis-Aligned Bounding Boxes (AABB) or &lt;/span&gt;&lt;span class=&quot;red&quot;&gt;circular/spherical&lt;/span&gt; detection, to &lt;span class=&quot;red&quot;&gt;identify&lt;/span&gt; when projectiles &lt;span class=&quot;red&quot;&gt;strike&lt;/span&gt; enemies or when the player &lt;span class=&quot;red&quot;&gt;takes&lt;/span&gt; &lt;span class=&quot;red&quot;&gt;damage&lt;/span&gt;.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Power-ups, &lt;span class=&quot;red&quot;&gt;like&lt;/span&gt; those that &lt;span class=&quot;red&quot;&gt;enhance&lt;/span&gt;&lt;span class=&quot;blue&quot;&gt; fire rate or &lt;/span&gt;&lt;span class=&quot;red&quot;&gt;reduce&lt;/span&gt; boss health, &lt;span class=&quot;red&quot;&gt;might&lt;/span&gt; be &lt;span class=&quot;red&quot;&gt;obtainable&lt;/span&gt;.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Technical &lt;span class=&quot;red&quot;&gt;Execution:&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The games &lt;span class=&quot;red&quot;&gt;frequently&lt;/span&gt; &lt;span class=&quot;red&quot;&gt;use&lt;/span&gt;&lt;span class=&quot;blue&quot;&gt; a game loop for &lt;/span&gt;&lt;span class=&quot;red&quot;&gt;ongoing&lt;/span&gt;&lt;span class=&quot;blue&quot;&gt; updates and rendering&lt;/span&gt;.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Libraries &lt;span class=&quot;red&quot;&gt;like&lt;/span&gt; stb_image are &lt;span class=&quot;red&quot;&gt;utilized&lt;/span&gt; for loading &lt;span class=&quot;red&quot;&gt;textures,&lt;/span&gt; &lt;span class=&quot;red&quot;&gt;while&lt;/span&gt; OpenAL is &lt;span class=&quot;red&quot;&gt;often&lt;/span&gt; &lt;span class=&quot;red&quot;&gt;selected&lt;/span&gt; for audio.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;red&quot;&gt;Fundamental&lt;/span&gt;&lt;span class=&quot;blue&quot;&gt; shaders (color, texture, font) are &lt;/span&gt;&lt;span class=&quot;red&quot;&gt;generally&lt;/span&gt; &lt;span class=&quot;red&quot;&gt;applied&lt;/span&gt;.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;red&quot;&gt;Elements&lt;/span&gt; &lt;span class=&quot;red&quot;&gt;such&lt;/span&gt; &lt;span class=&quot;red&quot;&gt;as&lt;/span&gt; score &lt;span class=&quot;red&quot;&gt;trackers,&lt;/span&gt; health &lt;span class=&quot;red&quot;&gt;indicators,&lt;/span&gt; &lt;span class=&quot;red&quot;&gt;primary&lt;/span&gt;&lt;span class=&quot;blue&quot;&gt; menus, and game over screens are also &lt;/span&gt;&lt;span class=&quot;red&quot;&gt;included&lt;/span&gt; &lt;span class=&quot;red&quot;&gt;in&lt;/span&gt;&lt;span class=&quot;blue&quot;&gt; the user experience&lt;/span&gt;.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;red&quot;&gt;Coding&lt;/span&gt; &lt;span class=&quot;red&quot;&gt;Materials&lt;/span&gt; and &lt;span class=&quot;red&quot;&gt;Educational&lt;/span&gt; &lt;span class=&quot;red&quot;&gt;Tools&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;red&quot;&gt;Many&lt;/span&gt; open-source &lt;span class=&quot;red&quot;&gt;projects&lt;/span&gt; can &lt;span class=&quot;red&quot;&gt;be&lt;/span&gt; &lt;span class=&quot;red&quot;&gt;found&lt;/span&gt;&lt;span class=&quot;blue&quot;&gt; on GitHub, which can &lt;/span&gt;&lt;span class=&quot;red&quot;&gt;act&lt;/span&gt; as &lt;span class=&quot;red&quot;&gt;great&lt;/span&gt; &lt;span class=&quot;red&quot;&gt;educational&lt;/span&gt; &lt;span class=&quot;red&quot;&gt;tools&lt;/span&gt; or &lt;span class=&quot;red&quot;&gt;foundations&lt;/span&gt;&lt;span class=&quot;blue&quot;&gt; for your own &lt;/span&gt;&lt;span class=&quot;red&quot;&gt;initiative&lt;/span&gt;&lt;span class=&quot;red&quot;&gt;.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Also See&amp;nbsp;&amp;nbsp;&lt;span style=&quot;background-color: white; color: #666666; font-family: &amp;quot;Trebuchet MS&amp;quot;, Trebuchet, Verdana, sans-serif; font-size: 22px;&quot;&gt;&lt;a href=&quot;https://www.openglprojects.in/2018/02/space-invaders-freeglut-project.html#gsc.tab=0&quot;&gt;Space Invaders Freeglut Project&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;red&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;Basic 2D Game: &lt;span class=&quot;red&quot;&gt;An&lt;/span&gt; &lt;span class=&quot;red&quot;&gt;uncomplicated&lt;/span&gt; &lt;span class=&quot;red&quot;&gt;execution&lt;/span&gt;&lt;span class=&quot;blue&quot;&gt; in C++ and OpenGL for &lt;/span&gt;&lt;span class=&quot;red&quot;&gt;fundamental&lt;/span&gt; &lt;span class=&quot;red&quot;&gt;understanding&lt;/span&gt;.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;red&quot;&gt;Contemporary&lt;/span&gt; OpenGL &lt;span class=&quot;red&quot;&gt;Method:&lt;/span&gt; A more &lt;span class=&quot;red&quot;&gt;intricate&lt;/span&gt; &lt;span class=&quot;red&quot;&gt;endeavor&lt;/span&gt; &lt;span class=&quot;red&quot;&gt;focused&lt;/span&gt; &lt;span class=&quot;red&quot;&gt;on&lt;/span&gt; &lt;span class=&quot;red&quot;&gt;tidy&lt;/span&gt; code and &lt;span class=&quot;red&quot;&gt;contemporary&lt;/span&gt; OpenGL &lt;span class=&quot;red&quot;&gt;capabilities,&lt;/span&gt; &lt;span class=&quot;red&quot;&gt;featuring&lt;/span&gt; &lt;span class=&quot;red&quot;&gt;an&lt;/span&gt; &lt;span class=&quot;red&quot;&gt;extensive&lt;/span&gt; roadmap &lt;span class=&quot;red&quot;&gt;that&lt;/span&gt; &lt;span class=&quot;red&quot;&gt;includes&lt;/span&gt; &lt;span class=&quot;red&quot;&gt;elements&lt;/span&gt; &lt;span class=&quot;red&quot;&gt;such&lt;/span&gt; &lt;span class=&quot;red&quot;&gt;as&lt;/span&gt; collision detection, &lt;span class=&quot;red&quot;&gt;sound,&lt;/span&gt;&lt;span class=&quot;blue&quot;&gt; and state machines&lt;/span&gt;.&lt;br /&gt;&lt;/div&gt;&lt;p&gt;Multiplayer &lt;span class=&quot;red&quot;&gt;Edition:&lt;/span&gt;&lt;span class=&quot;blue&quot;&gt; A project that &lt;/span&gt;&lt;span class=&quot;red&quot;&gt;features&lt;/span&gt; a &lt;span class=&quot;red&quot;&gt;two-player&lt;/span&gt; game &lt;span class=&quot;red&quot;&gt;along&lt;/span&gt; with a menu and introductory system&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://camo.githubusercontent.com/65bcf624c6b197b0f92bb67beff6e41f1f16046e6213c03b8867a486a10de933/68747470733a2f2f696d6775722e636f6d2f4473354a4f364f2e706e67&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;597&quot; data-original-width=&quot;1198&quot; height=&quot;319&quot; src=&quot;https://camo.githubusercontent.com/65bcf624c6b197b0f92bb67beff6e41f1f16046e6213c03b8867a486a10de933/68747470733a2f2f696d6775722e636f6d2f4473354a4f364f2e706e67&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://github.com/imanojg/Space-Shooter-Using-OpenGL/raw/main/images/Game.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;670&quot; data-original-width=&quot;1242&quot; height=&quot;345&quot; src=&quot;https://github.com/imanojg/Space-Shooter-Using-OpenGL/raw/main/images/Game.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://raw.githubusercontent.com/imanojg/Space-Shooter-Using-OpenGL/main/images/Winning.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;797&quot; data-original-width=&quot;1513&quot; height=&quot;337&quot; src=&quot;https://raw.githubusercontent.com/imanojg/Space-Shooter-Using-OpenGL/main/images/Winning.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Game Description&lt;/p&gt;&lt;p&gt;Keybord control for PLAYER 1 :&lt;/p&gt;&lt;p&gt;W - UP&lt;/p&gt;&lt;p&gt;S - DOWN&lt;/p&gt;&lt;p&gt;A - LEFT&lt;/p&gt;&lt;p&gt;D - RIGHT&lt;/p&gt;&lt;p&gt;C - to shoot, Use &#39;w&#39; and &#39;s&#39; to change direction.&lt;/p&gt;&lt;p&gt;Keybord control for PLAYER 2 :&lt;/p&gt;&lt;p&gt;I - UP&lt;/p&gt;&lt;p&gt;K - DOWN&lt;/p&gt;&lt;p&gt;J - LEFT&lt;/p&gt;&lt;p&gt;L - RIGHT&lt;/p&gt;&lt;p&gt;M - to shoot, Use &#39;I&#39; and &#39;K&#39; to change direction.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://camo.githubusercontent.com/c710ffebb5fa7447b28ce514c9e44c6d53057a1cc24858c05f5c5072eeda4c9a/68747470733a2f2f696d6775722e636f6d2f48574f35616f5a2e706e67&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;597&quot; data-original-width=&quot;1197&quot; height=&quot;319&quot; src=&quot;https://camo.githubusercontent.com/c710ffebb5fa7447b28ce514c9e44c6d53057a1cc24858c05f5c5072eeda4c9a/68747470733a2f2f696d6775722e636f6d2f48574f35616f5a2e706e67&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Objective&lt;/p&gt;&lt;p&gt;kill your opponent.&lt;/p&gt;&lt;p&gt;Each time a player gets shot, LIFE decreases by 5 points.&lt;/p&gt;&lt;p&gt;Source Code - 1. &lt;a href=&quot;https://github.com/rajathpi/space-shooter&quot; target=&quot;_blank&quot;&gt;Download Free&lt;/a&gt;&amp;nbsp;2. &lt;a href=&quot;https://github.com/imanojg/Space-Shooter-Using-OpenGL&quot; target=&quot;_blank&quot;&gt;Alternate Download Source Code link&lt;/a&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.openglprojects.in/feeds/1297154354431016757/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.openglprojects.in/2025/12/Space-Shooter-game-built-with-OpenGL-18CSL67-21CSL66.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2020194800836807725/posts/default/1297154354431016757'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2020194800836807725/posts/default/1297154354431016757'/><link rel='alternate' type='text/html' href='http://www.openglprojects.in/2025/12/Space-Shooter-game-built-with-OpenGL-18CSL67-21CSL66.html' title='Space Shooter game built with OpenGL -18CSL67/21CSL66'/><author><name>Rajeev</name><uri>http://www.blogger.com/profile/03147189487850777395</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2020194800836807725.post-7760410829942775252</id><published>2025-07-26T03:09:00.003+05:30</published><updated>2025-10-12T00:50:11.550+05:30</updated><title type='text'>Drawing Mountains in OpenGL Using Bitmap Loaders</title><content type='html'>&lt;p style=&quot;text-align: justify;&quot;&gt;Using the OpenGL Glut library, we have created numerous straightforward and intricate programs, but none of them have used texturing or image loading. We tried to find how to load image in the Opengl? &lt;a href=&quot;https://stackoverflow.com/questions/14173320/loading-images-in-opengl&quot; target=&quot;_blank&quot;&gt;The stackoverflow question pertaining to &quot;Loading images in openGL&quot;&lt;/a&gt;&amp;nbsp;yielded the best response.&lt;/p&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Images Loading in OpenGL Graphics Programming&lt;/h2&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;We can claim that working with OpenGL graphics programmiong, the image loading is seems to be difficult task. External libraries such as stb_image.h, DevIL (Developer&#39;s Image Library), FreeImage, and SOIL (Simple OpenGL Image Library) are used to read and decode images into raw pixel data; OpenGL does not import image files directly. This data is then sent to the GPU as a texture using OpenGL methods such as glGenTextures, glBindTexture, and glTexImage2D for rendering.&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;In addition to images/photos/pictures, textures can be used to contain a sizable collection of arbitrary data that can be sent to the shaders for rendering the object.&lt;/p&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Drawing Mountains in OpenGL&lt;/h2&gt;&lt;p&gt;In this Computer graphics Open project we are going to generate the mountains using the image texture with use of bitmap loaders.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTUFKxYXohMe9CwHB8QG4eIfHrP-oQPjAqHg5I-dYfy9Gzo3e5c_JG8k5B4-_ToBI4nLsuLvUdKY4T8PWWuX9kTVRnsLH8PX28ClQyEACuvW0JG6xTb67Ai7Ta5ZlVQPBsCEuc4qJE2bdsPIOIVachS_qRMty4wWclefcZF74ySd5fTV-AIwc_F5OzlcXp/s783/Mountains%20in%20OpenGL%20Using%20Bitmap%20Loaders.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;754&quot; data-original-width=&quot;783&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTUFKxYXohMe9CwHB8QG4eIfHrP-oQPjAqHg5I-dYfy9Gzo3e5c_JG8k5B4-_ToBI4nLsuLvUdKY4T8PWWuX9kTVRnsLH8PX28ClQyEACuvW0JG6xTb67Ai7Ta5ZlVQPBsCEuc4qJE2bdsPIOIVachS_qRMty4wWclefcZF74ySd5fTV-AIwc_F5OzlcXp/s16000/Mountains%20in%20OpenGL%20Using%20Bitmap%20Loaders.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;1. Grass Like Texture to Mountains&lt;/h4&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;We are randomly generating the mountains using a normalized pseudo-random number generator and fractal techniques. The windows are displayed differently each time you resize them or start the project program application.&amp;nbsp;&lt;span style=&quot;text-align: left;&quot;&gt;This application relies on GLUT and uses a bitmap for the grass texture. Therefore, they were loaded into the program for use using BitmapLoader.h.&lt;/span&gt;&lt;/p&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;2. Random Number for (Gaussian) distribution&lt;/h4&gt;&lt;p style=&quot;text-align: left;&quot;&gt;Let first define the randomNormal utility function, which uses the central limit theorem approximation (sum of uniform random variables) to produce a random number with a normal (Gaussian) distribution.&lt;/p&gt;
&lt;pre&gt;double randomNormal (double mu, double sigma)
{
double sum = 0;
for(int i = 0; i &amp;lt; 12; i++)
sum = sum + (double)rand()/RAND_MAX;
sum -= 6;
return sigma*sum + mu;
}&amp;nbsp;&lt;/pre&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;3. Texture Creation and Circle Drawing Functions&lt;/h4&gt;&lt;div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Using raw bitmap data, createTexture1 loads a texture into OpenGL and sets its filtering mode to nearest neighbor (pixelated look) and wrapping mode to clamp.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Draw_circle uses a polygon of 36 vertices (one every 10 degrees) to approximate a 2D filled circle. This might stand in for the sun or another round object in the picture.&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;See Also - &lt;a href=&quot;https://www.openglprojects.in/2014/03/draw-circle-opengl.html#gsc.tab=0&quot;&gt;How to draw circle in OpenGL&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: justify;&quot;&gt;4.&amp;nbsp;Fractal Mountain Generation Function&lt;/h4&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;div&gt;By periodically splitting a quadrilateral and applying a random height displacement, this recursive program creates fractal landscape.&lt;/div&gt;&lt;div&gt;Lighting effects are used to draw the quad once it is sufficiently small (perim &amp;lt;= tolerance). Using the Lambertian model, the lighting simulates diffuse light by shading the polygon according to its normal and light positions.&lt;/div&gt;&lt;div&gt;In order to produce four smaller quads recursively and add height perturbations for realistic terrain detail, it computes a displaced midpoint if it is not small enough.&lt;/div&gt;&lt;h4&gt;5. Initialization of OpenGL and Textures&lt;/h4&gt;&lt;div&gt;&lt;div&gt;Uses the external method LoadBitmapFile to load the grass bitmap texture from the file. The program exits and prints an error if loading is unsuccessful. Specifies the scene&#39;s clipping volume and sets up the OpenGL projection matrix with an orthographic projection (no perspective). transforms the clean background into a dark gray.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2&gt;Running the Program to get Desire Result&lt;/h2&gt;&lt;div&gt;Before compiling the program place the grass image in the source folder, let the program load and run pefectly. If the grass image not present then comiplation will be error free but non loading of image lead to failure of outcome.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3&gt;Downloads&lt;/h3&gt;&lt;div&gt;Source code will be provie for both main program and header file including the bitmap image on request by you to our email id openglprojects@gmail.com&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.openglprojects.in/feeds/7760410829942775252/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.openglprojects.in/2025/07/Drawing-Mountains-in-OpenGL-Using-Bitmap-Loaders.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2020194800836807725/posts/default/7760410829942775252'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2020194800836807725/posts/default/7760410829942775252'/><link rel='alternate' type='text/html' href='http://www.openglprojects.in/2025/07/Drawing-Mountains-in-OpenGL-Using-Bitmap-Loaders.html' title='Drawing Mountains in OpenGL Using Bitmap Loaders'/><author><name>Rajeev</name><uri>http://www.blogger.com/profile/03147189487850777395</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTUFKxYXohMe9CwHB8QG4eIfHrP-oQPjAqHg5I-dYfy9Gzo3e5c_JG8k5B4-_ToBI4nLsuLvUdKY4T8PWWuX9kTVRnsLH8PX28ClQyEACuvW0JG6xTb67Ai7Ta5ZlVQPBsCEuc4qJE2bdsPIOIVachS_qRMty4wWclefcZF74ySd5fTV-AIwc_F5OzlcXp/s72-c/Mountains%20in%20OpenGL%20Using%20Bitmap%20Loaders.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2020194800836807725.post-1567782612329895065</id><published>2025-06-18T02:30:00.004+05:30</published><updated>2025-06-22T01:50:39.199+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Solar"/><title type='text'>Opengl Computer Graphics Projects on Solar Energy Solar Power</title><content type='html'>&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;We are going to get started Opengl Computer Graphics Projects on Solar Power/Solar Energy.&lt;div&gt;&lt;br /&gt;&amp;nbsp;&lt;h2&gt;Abstract&lt;/h2&gt;&lt;div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;The Main aim of this Mini OpenGL Project is to illustrate/demonstrate the working principle of Solar power/Solar Energy using the concepts and usage of pre-built functions in OpenGL.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;In this we are going to demo Solar power using OpenGL. During day electricity is generated through solar panels which are set in fields called as solar farms and is transmitted to near by homes and excess is stored in a power station. During night the power station supplies the stored power to homes. We have used input devices like mouse and key board to interact with in the OpenGL C/C++ program.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Solar Power&lt;/h2&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Solar power is the power or say energy generated by conversion of sunlight into electricity using solar panels. For Generating energy or power these panels (Solar Panels), uses the photovoltaic cells in them which, convert light into direct current (DC). The DC, afterwards converted to alternating current (AC) for further use in electricity supply or to grid connection, or for storage in batteries. This is&amp;nbsp; a renewable, green, clean energy source, with many advantages , helps in minimizing greenhouse gas emissions during operation and save plane from &lt;a href=&quot;https://www.britannica.com/science/global-warming&quot; target=&quot;_blank&quot;&gt;Global warming&lt;/a&gt;.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjn_mOvVmQWWVxtSoDVDSGBW3OAC1Yww8vV7n8aCRft9nIbBOIOKW4TXEhQ7oOFIzm31wVnlf7AtmfnQkBR6d1ITMOA3_oQvFGimxl1EZGdfVnqKwunlPtFpTbHEEG5H0tpPLoQogO8H4QLqgaKCOfNFi-l8UHijQpYkHIUuM-FGRGsJ-PypzL7Ey2bhpsh/s729/Opengl%20Computer%20Graphics%20Projects%20on%20Solar%20Energy%20Solar%20Power.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;389&quot; data-original-width=&quot;729&quot; height=&quot;171&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjn_mOvVmQWWVxtSoDVDSGBW3OAC1Yww8vV7n8aCRft9nIbBOIOKW4TXEhQ7oOFIzm31wVnlf7AtmfnQkBR6d1ITMOA3_oQvFGimxl1EZGdfVnqKwunlPtFpTbHEEG5H0tpPLoQogO8H4QLqgaKCOfNFi-l8UHijQpYkHIUuM-FGRGsJ-PypzL7Ey2bhpsh/s320/Opengl%20Computer%20Graphics%20Projects%20on%20Solar%20Energy%20Solar%20Power.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;h2 style=&quot;background: 0px 0px rgb(255, 255, 255); border: 0px; box-sizing: border-box; color: #16161a; font-family: &amp;quot;Open Sans&amp;quot;, Arial, sans-serif; font-size: 23px; line-height: 1.3em; margin: 0px 0px 20px; outline: none; padding: 0px; text-align: start; vertical-align: baseline;&quot;&gt;1. The Basics&lt;/h2&gt;&lt;div&gt;We are going to code this OpenGL C/C++ program using MS Visual Studio, you are free to use other IDE like Code Block, Dev C++ etc.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;First we are going to develop front page where user will input their interaction to start the program. A help screen will also create for getting the information or usage. User will have choice and program will accordingly.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;We will implement various primitive functions for creating the square, rectangle and circle shape for create the diagram require for the demo of this&amp;nbsp;Opengl Computer Graphics Projects on Solar Energy.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h2 style=&quot;background: 0px 0px rgb(255, 255, 255); border: 0px; box-sizing: border-box; color: #16161a; font-family: &amp;quot;Open Sans&amp;quot;, Arial, sans-serif; font-size: 23px; line-height: 1.3em; margin: 0px 0px 20px; outline: none; padding: 0px; text-align: start; vertical-align: baseline;&quot;&gt;2. Implementation&lt;/h2&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;2. 1 Various functions used in this program.&lt;/div&gt;&lt;div&gt;&amp;nbsp;glutInit() : interaction between the windowing system and OPENGL is&lt;/div&gt;&lt;div&gt;initiated&lt;/div&gt;&lt;div&gt;&amp;nbsp;glutInitDisplayMode() : used when double buffering is required and depth&lt;/div&gt;&lt;div&gt;information is required&lt;/div&gt;&lt;div&gt;&amp;nbsp;glutCreateWindow() : this opens the OPENGL window and displays the title&lt;/div&gt;&lt;div&gt;at top of the window&lt;/div&gt;&lt;div&gt;&amp;nbsp;glutInitWindowSize() : specifies the size of the window&lt;/div&gt;&lt;div&gt;&amp;nbsp;glutInitWindowPosition() : specifies the position of the window in screen&lt;/div&gt;&lt;div&gt;co-ordinates&lt;/div&gt;&lt;div&gt;&amp;nbsp;glutKeyboardFunc() : handles normal ascii symbols&lt;/div&gt;&lt;div&gt;&amp;nbsp;glutSpecialFunc() : handles special keyboard keys&lt;/div&gt;&lt;div&gt;&amp;nbsp;glutReshapeFunc() : sets up the callback function for reshaping the window&lt;/div&gt;&lt;div&gt;&amp;nbsp;glutIdleFunc() : this handles the processing of the background&lt;/div&gt;&lt;div&gt;&amp;nbsp;glutDisplayFunc() : this handles redrawing of the window&lt;/div&gt;&lt;div&gt;&amp;nbsp;glutMainLoop() : this starts the main loop, it never returns&lt;/div&gt;&lt;div&gt;&amp;nbsp;glViewport() : used to set up the viewport&lt;/div&gt;&lt;div&gt;&amp;nbsp;glVertex3fv() : used to set up the points or vertices in three dimensions&lt;/div&gt;&lt;div&gt;&amp;nbsp;glColor3fv() : used to render color to faces&lt;/div&gt;&lt;div&gt;&amp;nbsp;glFlush() : used to flush the pipeline&lt;/div&gt;&lt;div&gt;glutPostRedisplay() : used to trigger an automatic redrawal of the object&lt;/div&gt;&lt;div&gt;&amp;nbsp;glMatrixMode() : used to set up the required mode of the matrix&lt;/div&gt;&lt;div&gt;&amp;nbsp;glLoadIdentity() : used to load or initialize to the identity matrix&lt;/div&gt;&lt;div&gt;&amp;nbsp;glTranslatef() : used to translate or move the rotation centre from one&lt;/div&gt;&lt;div&gt;point to another in three dimensions&lt;/div&gt;&lt;div&gt;glRotatef() : used to rotate an object through a specified rotation angle&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; text-align: start;&quot;&gt;&lt;span face=&quot;Open Sans, Arial, sans-serif&quot; style=&quot;color: #16161a;&quot;&gt;&lt;div&gt;&lt;h2 style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; line-height: 1.3em; margin: 0px 0px 20px; outline: none; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;br /&gt;&lt;/h2&gt;&lt;div&gt;Also See -&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;a href=&quot;https://www.openglprojects.in/2020/03/electromagnetic-induction-demo-opengl-program.html&quot; target=&quot;_blank&quot;&gt;Electromagnetic induction demo with opengl graphic program&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://www.openglprojects.in/2015/04/mini-solar-system-computer-graphics-programs.html&quot; target=&quot;_blank&quot;&gt;Mini Solar System Computer Graphics Programs&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://www.openglprojects.in/2015/05/3d-solar-system-opengl-graphics-program.html#gsc.tab=0&quot; target=&quot;_blank&quot;&gt;3D Solar System OpenGL graphics program&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://www.openglprojects.in/2015/04/wind-mill-cplusplus-projects-download.html#gsc.tab=0&quot; target=&quot;_blank&quot;&gt;Wind Mill C++ Projects Download&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: 0px 0px; background-repeat: initial; background-size: initial; border: 0px; box-sizing: border-box; line-height: 1.3em; margin: 0px 0px 20px; outline: none; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-size: 23px;&quot;&gt;3. User Interaction&amp;nbsp;&lt;/span&gt;&lt;/h2&gt;&lt;/div&gt;&lt;div style=&quot;font-size: 15px;&quot;&gt;This program Opengl Computer Graphics Projects on Solar Energy Solar Power includes following interaction through keyboard.&lt;/div&gt;&lt;div style=&quot;font-size: 15px;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;font-size: 15px;&quot;&gt;S-&amp;gt;&amp;nbsp; Toggle Day or night&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-size: 15px; text-align: start;&quot;&gt;&lt;span face=&quot;Open Sans, Arial, sans-serif&quot; style=&quot;color: #16161a;&quot;&gt;&lt;div&gt;H-&amp;gt; Get Help Menu&lt;/div&gt;&lt;div&gt;Q-&amp;gt; Quit&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;Open Sans&amp;quot;, Arial, sans-serif&quot; style=&quot;background-color: white; color: #16161a; font-size: 15px; text-align: start;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;h2 style=&quot;background: 0px 0px rgb(255, 255, 255); border: 0px; box-sizing: border-box; color: #16161a; font-family: &amp;quot;Open Sans&amp;quot;, Arial, sans-serif; font-size: 23px; line-height: 1.3em; margin: 0px 0px 20px; outline: none; padding: 0px; text-align: start; vertical-align: baseline;&quot;&gt;4. Source Code&lt;/h2&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;Open Sans&amp;quot;, Arial, sans-serif&quot; style=&quot;background-color: white; color: #16161a; font-size: 15px; text-align: start;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;Open Sans&amp;quot;, Arial, sans-serif&quot; style=&quot;background-color: white; color: #16161a; font-size: 15px; text-align: start;&quot;&gt;The complete Source code of this&amp;nbsp;&lt;/span&gt;&lt;span face=&quot;Open Sans, Arial, sans-serif&quot; style=&quot;color: #16161a;&quot;&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;Opengl Computer Graphics&lt;/span&gt;&lt;/span&gt;&lt;span face=&quot;&amp;quot;Open Sans&amp;quot;, Arial, sans-serif&quot; style=&quot;background-color: white; color: #16161a; font-size: 15px; text-align: start;&quot;&gt;&amp;nbsp;project can be found in the below&lt;/span&gt;&lt;span face=&quot;&amp;quot;Open Sans&amp;quot;, Arial, sans-serif&quot; style=&quot;background-color: white; color: #16161a; font-size: 15px; text-align: start;&quot;&gt;. Please Let Us know about your opinion, feedback, question, doubt or any other&amp;nbsp;&lt;/span&gt;&lt;span face=&quot;&amp;quot;Open Sans&amp;quot;, Arial, sans-serif&quot; style=&quot;background-color: white; color: #16161a; font-size: 15px; text-align: start;&quot;&gt;queries&lt;/span&gt;&lt;span face=&quot;&amp;quot;Open Sans&amp;quot;, Arial, sans-serif&quot; style=&quot;background-color: white; color: #16161a; font-size: 15px; text-align: start;&quot;&gt;&amp;nbsp;in the comments section below.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;Open Sans&amp;quot;, Arial, sans-serif&quot; style=&quot;background-color: white; color: #16161a; font-size: 15px; text-align: start;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face=&quot;&amp;quot;Open Sans&amp;quot;, Arial, sans-serif&quot; style=&quot;background-color: white; color: #16161a; text-align: start;&quot;&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;void draw(){&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;if(day){&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glClearColor(0.9,0.9,0.9,0.0);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;}else{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glClearColor(0.3,0.3,0.3,0.0);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glPushMatrix();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glRotatef(angle,1,0,0);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glTranslatef(-10,20,-155);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glScaled(1,1,0.6);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;if(day){&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glColor3f(1,1,0);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;}else{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glColor3f(1,1,1);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glutSolidSphere(5,100,100);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glPopMatrix();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glPushMatrix();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glTranslatef(0,-10,5);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glScaled(500,10,1000);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glColor3f(0.8,0.7,0.7);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glutSolidCube(1);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glPopMatrix();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;drawHouse(-3,0,-55);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;drawHouse(-4,0,-35);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;drawHouse(-5,0,-15);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;drawHouse(-10,0,-15);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;//Solar Panels&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;for(int i=-1;i&amp;lt;3;i++)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;for(int j=5;j&amp;gt;-2;j--)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;drawSolarPanel(i*2,1,j);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;//draw power station.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;stroke_output(0.8,1.8,&quot;Power Station&quot;);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;// transformer&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glPushMatrix();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glTranslatef(15,5,-100);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;//glScaled(0,2,0.2);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glColor3f(1,0.3,0.3);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glutSolidCube(15);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glPopMatrix();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;//Transformer Power levels&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;// y axis from 5 to 18 and show growth in one second delay&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;if(day){&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;if(grow&amp;lt;=15000){&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;grow++;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;angle+=0.002;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;else{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;if(grow&amp;gt;=0){&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;grow--;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;angle-=0.002;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;if(grow&amp;gt;1000){&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glPushMatrix();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glTranslatef(14.8,-2,-99.8);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glScaled(1,0.05,1);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glColor3f(1,1,0);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glutSolidCube(15);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glPopMatrix();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;if(grow&amp;gt;2000){&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glPushMatrix();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glTranslatef(14.8,-1,-99.8);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glScaled(1,0.05,1);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glColor3f(1,1,0);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glutSolidCube(15);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glPopMatrix();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;if(grow&amp;gt;3000){&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glPushMatrix();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glTranslatef(14.8,0,-99.8);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glScaled(1,0.05,1);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glColor3f(1,1,0);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glutSolidCube(15);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glPopMatrix();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;if(grow&amp;gt;4000){&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glPushMatrix();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glTranslatef(14.8,1,-99.8);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glScaled(1,0.05,1);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glColor3f(1,1,0);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glutSolidCube(15);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glPopMatrix();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;if(grow&amp;gt;5000){&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glPushMatrix();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glTranslatef(14.8,2,-99.8);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glScaled(1,0.05,1);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glColor3f(1,1,0);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glutSolidCube(15);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glPopMatrix();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;if(grow&amp;gt;6000){&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glPushMatrix();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glTranslatef(14.8,3,-99.8);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glScaled(1,0.05,1);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glColor3f(1,1,0);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glutSolidCube(15);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glPopMatrix();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;if(grow&amp;gt;7000){&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glPushMatrix();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glTranslatef(14.8,4,-99.8);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glScaled(1,0.05,1);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glColor3f(1,1,0);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glutSolidCube(15);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glPopMatrix();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;if(grow&amp;gt;8000){&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glPushMatrix();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glTranslatef(14.8,5,-99.8);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glScaled(1,0.05,1);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glColor3f(1,1,0);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glutSolidCube(15);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glPopMatrix();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;if(grow&amp;gt;9000){&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glPushMatrix();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glTranslatef(14.8,6,-99.8);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glScaled(1,0.05,1);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glColor3f(1,1,0);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glutSolidCube(15);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glPopMatrix();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;if(grow&amp;gt;10000){&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glPushMatrix();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glTranslatef(14.8,7,-99.8);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glScaled(1,0.05,1);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glColor3f(1,1,0);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glutSolidCube(15);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glPopMatrix();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;if(grow&amp;gt;11000){&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glPushMatrix();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glTranslatef(14.8,8,-99.8);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glScaled(1,0.05,1);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glColor3f(1,1,0);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glutSolidCube(15);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glPopMatrix();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;if(grow&amp;gt;12000){&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glPushMatrix();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glTranslatef(14.8,9,-99.8);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glScaled(1,0.05,1);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glColor3f(1,1,0);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glutSolidCube(15);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glPopMatrix();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;if(grow&amp;gt;13000){&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glPushMatrix();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glTranslatef(14.8,10,-99.8);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glScaled(1,0.05,1);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glColor3f(1,1,0);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glutSolidCube(15);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glPopMatrix();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;if(grow&amp;gt;14000){&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glPushMatrix();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glTranslatef(14.8,11,-99.8);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glScaled(1,0.05,1);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glColor3f(1,1,0);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glutSolidCube(15);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glPopMatrix();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;if(grow&amp;gt;15000){&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;void doDisplay()&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glLoadIdentity();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glTranslatef(0.0f,0.0f,-13.0f);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;// Write your Own Code Here&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;if(help1){&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;help();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;else&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;draw();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;GLfloat mat_ambient[]={0.0f,1.0f,2.0f,1.0f};&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;GLfloat mat_diffuse[]={0.0f,1.5f,.5f,1.0f};&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;GLfloat mat_specular[]={5.0f,1.0f,1.0f,1.0f};&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;GLfloat mat_shininess[]={100.0f};&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glMaterialfv(GL_FRONT,GL_AMBIENT,mat_ambient);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glMaterialfv(GL_FRONT,GL_DIFFUSE,mat_diffuse);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glMaterialfv(GL_FRONT,GL_SPECULAR,mat_specular);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glMaterialfv(GL_FRONT,GL_SHININESS,mat_shininess);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;/*GLfloat lightIntensity[]={3.7f,0.7f,0.7f,1.0f}; Orange&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;GLfloat light_position[]={2.0f,5.0f,3.0f,1.0f};*/&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;/*light source properties*/&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;//if(day){&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;GLfloat lightIntensity[]={1.7f,1.7f,1.7f,1.0f};&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;GLfloat light_position[]={2.0f,0.0f,0.0f,0.0f};&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glLightfv(GL_LIGHT0,GL_POSITION,light_position);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;GLfloat light_position2[]={0.0f,0.0f,8.0f,0.0f};&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glLightfv(GL_LIGHT0,GL_POSITION,light_position2);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;GLfloat light_position3[]={0.0f,5.0f,15.0f,0.0f};&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glLightfv(GL_LIGHT0,GL_POSITION,light_position3);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glLightfv(GL_LIGHT0,GL_DIFFUSE,lightIntensity);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;/*}else{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;GLfloat lightIntensity[]={0.7f,0.7f,0.7f,0.5f};&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;GLfloat light_position[]={2.0f,0.0f,0.0f,0.0f};&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glLightfv(GL_LIGHT0,GL_POSITION,light_position);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;GLfloat light_position2[]={0.0f,0.0f,8.0f,0.0f};&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glLightfv(GL_LIGHT0,GL_POSITION,light_position2);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;GLfloat light_position3[]={0.0f,2.0f,2.0f,0.0f};&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glLightfv(GL_LIGHT0,GL_POSITION,light_position3);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glLightfv(GL_LIGHT0,GL_DIFFUSE,lightIntensity);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;}*/&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glFlush();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glutSwapBuffers();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;void mykey(unsigned char key,int x,int y)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;if(key==&#39;q&#39;||key==&#39;Q&#39;)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;exit(0);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;if(key==&#39;h&#39;||key==&#39;H&#39;)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;help1=!help1;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glutPostRedisplay();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;if(key==&#39;s&#39; || key==&#39;S&#39;){&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;if(day){&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;day=false;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;}else{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;day=true;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glutPostRedisplay();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glutIdleFunc(doDisplay);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;int main(int argc, char *argv[])&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glutInit(&amp;amp;argc, argv);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glutInitDisplayMode(GLUT_DOUBLE|GLUT_RGB);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glutInitWindowSize(640,480);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glutInitWindowPosition(0,0);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glutCreateWindow(&quot;Solar power&quot;);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glutDisplayFunc(doDisplay);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glEnable(GL_LIGHTING);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glEnable(GL_LIGHT0);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glShadeModel(GL_SMOOTH);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glEnable(GL_DEPTH_TEST);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glEnable(GL_NORMALIZE);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glutKeyboardFunc(mykey);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;doInit();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;glutMainLoop();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;return 0;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 15px;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;font-size: 15px;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;div class=&quot;alert-message alert-info&quot;&gt;We have so many good programs in OpenGL.  &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.openglprojects.in/feeds/1567782612329895065/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.openglprojects.in/2025/06/Opengl-Computer-Graphics-Projects-on-Solar-Energy-Solar-Power.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2020194800836807725/posts/default/1567782612329895065'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2020194800836807725/posts/default/1567782612329895065'/><link rel='alternate' type='text/html' href='http://www.openglprojects.in/2025/06/Opengl-Computer-Graphics-Projects-on-Solar-Energy-Solar-Power.html' title='Opengl Computer Graphics Projects on Solar Energy Solar Power'/><author><name>Rajeev</name><uri>http://www.blogger.com/profile/03147189487850777395</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjn_mOvVmQWWVxtSoDVDSGBW3OAC1Yww8vV7n8aCRft9nIbBOIOKW4TXEhQ7oOFIzm31wVnlf7AtmfnQkBR6d1ITMOA3_oQvFGimxl1EZGdfVnqKwunlPtFpTbHEEG5H0tpPLoQogO8H4QLqgaKCOfNFi-l8UHijQpYkHIUuM-FGRGsJ-PypzL7Ey2bhpsh/s72-c/Opengl%20Computer%20Graphics%20Projects%20on%20Solar%20Energy%20Solar%20Power.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2020194800836807725.post-4601554936931675922</id><published>2025-04-27T03:53:00.013+05:30</published><updated>2025-04-27T04:24:59.171+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Data Communication"/><category scheme="http://www.blogger.com/atom/ns#" term="Networking Based Project"/><title type='text'>Create OpenGL CG Projects on Networking Data Communication</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;We have developed Selective Repeat ARQ a networking based Create OpenGL CG Projects with C/C++. In this post we are going to create new networking based project. As well aware of Internet which help us communicate through various means including mail, chat and social media. We are going to create OpenGL Project on Networking Data Communication.
Let&#39;s get started with some basics information.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: justify;&quot;&gt;Abstract -&amp;nbsp;&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Our Aim is to Create, design and the illustrate the concepts and usage of Data Communication over Internet Using OpenGL C/C++.

The Communication between two devices begins with a message/information of which one send the message and other receive it. The first device is called source, or sender while the second device i is the destination/receiver, of the message. The destination receives the message and interprets it. Another element involved in the process is called channel, which consists of the media that provides the pathway over which the message can travel from source to destination.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;

&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNYQd6vvD_A2fjXT1IGI8a6ttjyX4Mxp8id6XO0-uFXcFKqTvGIoX6BuAyZzGoozdYMFPFRH6-yWOSHgzJnSj14UhFP4DDD1WH-qX6i9iEsSYA9-BzX7lBhUuXPncWHvVdg_zWX_2pQHnQfeGKlY7GlVIknWQBC2I61TCJb3NLABenToPd8qEVTLxPVHAT/s1366/CG%20Projects%20on%20Networking%20Data%20Communication1.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;723&quot; data-original-width=&quot;1366&quot; height=&quot;169&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNYQd6vvD_A2fjXT1IGI8a6ttjyX4Mxp8id6XO0-uFXcFKqTvGIoX6BuAyZzGoozdYMFPFRH6-yWOSHgzJnSj14UhFP4DDD1WH-qX6i9iEsSYA9-BzX7lBhUuXPncWHvVdg_zWX_2pQHnQfeGKlY7GlVIknWQBC2I61TCJb3NLABenToPd8qEVTLxPVHAT/s320/CG%20Projects%20on%20Networking%20Data%20Communication1.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

This program is implemented using various OpenGL functions which are shown below&lt;/div&gt;&lt;div class=&quot;download_code&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;download_code&quot;&gt;Various functions used in this program.&lt;/div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;glutInit() : interaction between the windowing system and OPENGL is initiated&lt;/li&gt;&lt;li&gt;glutInitDisplayMode() : used when double buffering is required and depth information is required&lt;/li&gt;&lt;li&gt;glutCreateWindow() : this opens the OPENGL window and displays the title at top of the window&lt;/li&gt;&lt;li&gt;glutInitWindowSize() : specifies the size of the window&lt;/li&gt;&lt;li&gt;glutInitWindowPosition() : specifies the position of the window in screen co-ordinates&lt;/li&gt;&lt;li&gt;glutKeyboardFunc() : handles normal ASCII symbols&lt;/li&gt;&lt;li&gt;glutSpecialFunc() : handles special keyboard keys&lt;/li&gt;&lt;li&gt;glutReshapeFunc() : sets up the callback function for reshaping the window&lt;/li&gt;&lt;li&gt;glutIdleFunc() : this handles the processing of the background&lt;/li&gt;&lt;li&gt;glutDisplayFunc() : this handles redrawing of the window&lt;/li&gt;&lt;li&gt;glutMainLoop() : this starts the main loop, it never returns&lt;/li&gt;&lt;li&gt;glViewport() : used to set up the viewport&lt;/li&gt;&lt;li&gt;glVertex3fv() : used to set up the points or vertices in three dimensions&lt;/li&gt;&lt;li&gt;glColor3fv() : used to render color to faces&lt;/li&gt;&lt;li&gt;glFlush() : used to flush the pipeline&lt;/li&gt;&lt;li&gt;glutPostRedisplay() : used to trigger an automatic redrawal of the object&lt;/li&gt;&lt;li&gt;glMatrixMode() : used to set up the required mode of the matrix&lt;/li&gt;&lt;li&gt;glLoadIdentity() : used to load or initialize to the identity matrix&lt;/li&gt;&lt;li&gt;glTranslatef() : used to translate or move the rotation centre from one point to another in three dimensions&lt;/li&gt;&lt;li&gt;glRotatef() : used to rotate an object through a specified rotation angle&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Interactions&lt;/h3&gt;Interaction with program We can have an interaction with this project using popular input device like mouse and key board are used to interact with this program. Some keys of key board have specific function, we mentioned them below,&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;‘s/S’ - Start&lt;/li&gt;&lt;li&gt;‘n/N’ – Network&lt;/li&gt;&lt;li&gt;‘a/A’ – About Project&lt;/li&gt;&lt;/ol&gt;With these above mentioned keys, we can interact with the program. Also we can interact with this program by using mouse (input device), By click on right and left button On right click of mouse menu will occur. Select the option by left click of mouse.&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgekYSsHHh8N-cY4TYz0W67xEqXhKhat8yeIZke0m14JsSxIK__52rxdP1E7_brOLKruXFbu2p_omdFacd5Cb6k2yiT0fc2Np-B0NSgF9gyEKfZ10uzWo5eP7NRbWKLEJk2-h9B8uXjYr_9Jhn7RN5r28wGzsQIfmjgck2XF-7URPXAY1Rxw5ocIjX1xx8z/s1366/CG%20Projects%20on%20Networking%20Data%20Communication2.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;725&quot; data-original-width=&quot;1366&quot; height=&quot;170&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgekYSsHHh8N-cY4TYz0W67xEqXhKhat8yeIZke0m14JsSxIK__52rxdP1E7_brOLKruXFbu2p_omdFacd5Cb6k2yiT0fc2Np-B0NSgF9gyEKfZ10uzWo5eP7NRbWKLEJk2-h9B8uXjYr_9Jhn7RN5r28wGzsQIfmjgck2XF-7URPXAY1Rxw5ocIjX1xx8z/s320/CG%20Projects%20on%20Networking%20Data%20Communication2.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5cBGRqZKYfBKhN1prXtqIpN5XCXZR32PoooE4Sgtm2j6UDDytbaoIahywnrViTa6eg8dsu_LejPJtkmKEIS_5tVkEZiv553m1Czhd8OLhZglGFy6TX1BpcKgD_L9IUYX8FHTrFzWvUD20fWzTYcA3Jl5h55V93_3a_IgVUsCPWNLHKDKunzNcdy6LXsvU/s1366/CG%20Projects%20on%20Networking%20Data%20Communication3.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;718&quot; data-original-width=&quot;1366&quot; height=&quot;168&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5cBGRqZKYfBKhN1prXtqIpN5XCXZR32PoooE4Sgtm2j6UDDytbaoIahywnrViTa6eg8dsu_LejPJtkmKEIS_5tVkEZiv553m1Czhd8OLhZglGFy6TX1BpcKgD_L9IUYX8FHTrFzWvUD20fWzTYcA3Jl5h55V93_3a_IgVUsCPWNLHKDKunzNcdy6LXsvU/s320/CG%20Projects%20on%20Networking%20Data%20Communication3.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
 
&lt;div class=&quot;code-container&quot;&gt;
&lt;div class=&quot;code-header&quot;&gt;
&lt;span class=&quot;file-name&quot;&gt;&lt;/span&gt;
        &lt;button class=&quot;copy-btn&quot;&gt;Copy&lt;/button&gt;&lt;/div&gt;&lt;pre&gt;&lt;code class=&quot;hljs language-kotlin&quot; data-highlighted=&quot;yes&quot;&gt;#include&lt;stdlib .h=&quot;&quot;&gt;
#include&lt;windows .h=&quot;&quot;&gt;
#include&lt;string .h=&quot;&quot;&gt;
#include&lt;stdarg .h=&quot;&quot;&gt;
#include&lt;stdio .h=&quot;&quot;&gt;
#include &lt;gl glut.h=&quot;&quot;&gt;
static double x=0.0,x1=-3.0,x2=3.0,y1=0.0,y2=0;
static double x8=-4.0,x9=4.0,y8=1.0,y9=1;
static double move=-60;
static bool pca2pcb=false,pca2rt=false,rt2pca=false, pcb2pca=false, local=false,
dubai=false;
void P();
void d();
void *font;
void *currentfont;
void setFont(void *font)
{
currentfont=font;
}
void drawstring(float x,float y,float z,char *string)
{
char *c;
glRasterPos3f(x,y,z);
for(c=string;*c!=&#39;\0&#39;;c++)
{ glColor3f(0.0,1.0,1.0);
glutBitmapCharacter(currentfont,*c);
}
}
void stroke_output(GLfloat x, GLfloat y, char *format,...)
{ va_list args;
char buffer[200], *p;
va_start(args, format);
vsprintf(buffer, format, args);
va_end(args);
glPushMatrix();
DATA COMMUNICATION over INTERNET
11 Dept. of Computer Science &amp;amp; Engineering.
glTranslatef(-2.5, y, 0);
glScaled(0.003, 0.005, 0.005);
for (p = buffer; *p; p++)
glutStrokeCharacter(GLUT_STROKE_ROMAN, *p);
glPopMatrix();
}
//Windows
void window(float x4, float y4)
{
glLoadIdentity();
glColor3f(1.0,1.5,0.5);
glTranslatef(0.0f,0.0f,-11.0f);
for(float j=-2;j&lt;1 .5=&quot;&quot; 12=&quot;&quot; change=&quot;&quot; color=&quot;&quot; communication=&quot;&quot; computer=&quot;&quot; computers=&quot;&quot; condition=&quot;&quot; data=&quot;&quot; dept.=&quot;&quot; engineering.=&quot;&quot; f=&quot;&quot; float=&quot;&quot; for=&quot;&quot; glcolor3f=&quot;&quot; glloadidentity=&quot;&quot; glpopmatrix=&quot;&quot; glpushmatrix=&quot;&quot; glrotatef=&quot;&quot; glscaled=&quot;&quot; gltranslatef=&quot;&quot; glutsolidcube=&quot;&quot; glutsolidtorus=&quot;&quot; i=&quot;&quot; if=&quot;&quot; indows=&quot;&quot; internet=&quot;&quot; j=&quot;&quot; of=&quot;&quot; ondition=&quot;&quot; outer=&quot;&quot; over=&quot;&quot; pc=&quot;&quot; pca=&quot;&quot; pcb2pca=&quot;&quot; pcb=&quot;&quot; router=&quot;&quot; science=&quot;&quot; to=&quot;&quot; void=&quot;&quot; window1=&quot;&quot; x5=&quot;&quot; x6=&quot;&quot; x7=&quot;=5)&quot; x9=&quot;&quot; y5=&quot;&quot; y6=&quot;&quot; y7=&quot;&quot; z7=&quot;&quot;&gt;=-5 &amp;amp;&amp;amp; x9&amp;lt;=-4 &amp;amp;&amp;amp; x7==-5)
glColor3f(1,0,0);
glScaled(.7,.7,0);
glRotatef(95,1.0f,0.0f,0.0f);
glTranslatef(x7,y7,z7);
DATA COMMUNICATION over INTERNET
13 Dept. of Computer Science &amp;amp; Engineering.
glutSolidCube(.85);
glPopMatrix();
glPopMatrix();
}
//PC
void cpu(float x7, float y7, float z7)
{ glLoadIdentity();
glColor3f(0.5,0.5,.5);
glTranslatef(0.0f,0.0f,-13.0f);
glPushMatrix();
glPushMatrix();
glScaled(1,.3,0);
glRotatef(95,1.0f,0.0f,0.0f);
glTranslatef(x7,y7,z7);
glutSolidCube(1);
glPopMatrix();
glPushMatrix();
glColor3f(1,1,1);
glScaled(1,.3,0);
glRotatef(95,1.0f,0.0f,0.0f);
glTranslatef(x7,y7,z7);
glutSolidCube(.4);
glPopMatrix();
glPopMatrix();
}
//Draw LAN/WAN
void lan(double x8,double y8)
{
glClearColor(0.6,0.5,.5,0.0);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glLoadIdentity();
glTranslatef(0.0f,0.0f,-13.0f);
router(0,-1);
//Data Media (connected to Router)
glPushMatrix();
DATA COMMUNICATION over INTERNET
14 Dept. of Computer Science &amp;amp; Engineering.
glTranslatef(0.0,1.0,-2.0);
glScaled(0.1,5.0,0.1);
glColor3f(1,1,1);
glutWireCube(1.5);
glPopMatrix();
glPushMatrix();
glTranslatef(0.0,0.0,-2.0);
glScaled(5.1,0.1,0.1);
glColor3f(1,1,1);
glutWireCube(1.5);
glPopMatrix();
glPushMatrix();
glTranslatef(0.0,0.0,-2.0);
setFont(GLUT_BITMAP_TIMES_ROMAN_24);
glColor3f(0,0,0);
drawstring(1,3.5,-1.0,&quot;ROUTER&quot;);
setFont(GLUT_BITMAP_TIMES_ROMAN_24);
glColor3f(0,0,0);
drawstring(-4.6,.5,-1.0,&quot;PC-A&quot;);
setFont(GLUT_BITMAP_TIMES_ROMAN_24);
glColor3f(0,0,0);
drawstring(-.5,.5,-1.0,&quot;SWITCH&quot;);
setFont(GLUT_BITMAP_TIMES_ROMAN_24);
glColor3f(0,0,0);
drawstring(4,.5,-1.0,&quot;PC-B&quot;);
glPopMatrix();
//Data Transfer
if(pca2pcb){
// data
glPushMatrix();
glTranslatef(x8,y8,-2.0);
glScaled(0.1,0.1,0.1);
glColor3f(x8,0,1);
glutSolidCube(1);
glPopMatrix();
if(x8&amp;gt;=4){
DATA COMMUNICATION over INTERNET
15 Dept. of Computer Science &amp;amp; Engineering.
pcb2pca=true;
pca2pcb=false;
} }
//Ack
if(pcb2pca){
glPushMatrix();
glTranslatef(x8,y8,-2.0);
glScaled(0.1,0.1,0.1);
glColor3f(x8,0,1);
glutSolidCube(1);
glPopMatrix();
}
if(pca2rt)
{
glPushMatrix();
glTranslatef(x8,y8,-2.0);
glScaled(0.1,0.1,0.1);
glColor3f(x8,0,1);
glutSolidCube(1);
glPopMatrix();
}
// move the packet out of LAN
if(pca2rt &amp;amp;&amp;amp; rt2pca==false &amp;amp;&amp;amp; y8&amp;gt;=6)
{
glutIdleFunc(P);
}
//switch
glPushMatrix();
glColor3f(0.5,0.5,1.5);
glTranslatef(0.0,0,1.0);
glRotatef(15,1.0f,0.0f,0.0f);
glScaled(1.2,0.2,1.0);
glutSolidCube(1);
glPopMatrix();
pc(-5,1,0);
cpu(-3.5,7,1.5);
DATA COMMUNICATION over INTERNET
16 Dept. of Computer Science &amp;amp; Engineering.
pc(5,1,0);
cpu(3.5,7,1.5);
pc(0,20,2);
cpu(0,105,1.5);
glFlush();
glutSwapBuffers();
}
// Draw Network
void network(double ang,double x1,double x2,double y1,double y2)
{
glClearColor(0.0,0.85,1,0.0);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glLoadIdentity();
glTranslatef(0.0f,0.0f,-13.0f);
glBegin(GL_POLYGON);
glColor3f(0.0,1.8,0.0);
glVertex2f(-10,0);
glVertex2f(10,0);
glVertex2f(-10,-10);
glVertex2f(-10,10);
glEnd();
setFont(GLUT_BITMAP_TIMES_ROMAN_24);
glColor3f(0,0,0);
drawstring(-4.2,2.65,0.0,&quot;LOCAL BUILDING&quot;);
setFont(GLUT_BITMAP_TIMES_ROMAN_24);
glColor3f(0,0,0);
drawstring(-1.5,3.2,0.0,&quot;EARTH Connected with Fibric Wires&quot;);
setFont(GLUT_BITMAP_TIMES_ROMAN_24);
glColor3f(0,0,0);
drawstring(2.5,2.65,0.0,&quot;DUBAI BUILDING&quot;);
//Earth
glPushMatrix();
glColor3f(0.5,0.5,1.5);
glScaled(0.8,1,0.8);
glTranslatef(0.0,2.2,0.0);
glRotatef(ang,0.0f,-1.0f,0.0f);
DATA COMMUNICATION over INTERNET
17 Dept. of Computer Science &amp;amp; Engineering.
glutSolidSphere(1,20,20);
glPopMatrix();
//Building A
glLoadIdentity();
glTranslatef(0.0f,0.0f,-12.0f);
glPushMatrix();
glTranslatef(-3,-0.5,0.0);
glScaled(0.8,2.2,0.8);
glutSolidCube(1.8);
glPopMatrix();
window(-2.6, 1);
//Building B
glLoadIdentity();
glTranslatef(0.0f,0.0f,-12.0f);
glPushMatrix();
glTranslatef(3,-0.5,0.0);
glScaled(0.8,2.2,0.8);
glutSolidCube(1.8);
glPopMatrix();
window1(3.3, 1);
// Line 1
glPushMatrix();
glTranslatef(-3.0,1.0,-2.0);
glScaled(0.1,3.0,0.1);
glColor3f(1,1,1);
glutWireCube(1);
glPopMatrix();
glPushMatrix();
glTranslatef(-1.45,2.4,-2.0);
glScaled(3.0,0.2,0.1);
glColor3f(1,1,1);
glutWireCube(1);
glPopMatrix();
//Line 2
glPushMatrix();
DATA COMMUNICATION over INTERNET
18 Dept. of Computer Science &amp;amp; Engineering.
glTranslatef(3.0,1.0,-2.0);
glScaled(0.1,3.0,0.1);
glColor3f(1,1,1);
glutWireCube(1);
glPopMatrix();
glPushMatrix();
glTranslatef(1.45,2.4,-2.0);
glScaled(3.0,0.2,0.1);
glColor3f(1,1,1);
glutWireCube(1);
glPopMatrix();
// Transmission of Datapackets
glPushMatrix();
// Send Packets
if(local){
if(x1==-3 &amp;amp;&amp;amp; y1&amp;lt;=2.38)
glTranslatef(-3,y1,-2.0);
if(y1&amp;gt;=2.38 &amp;amp;&amp;amp; x1&amp;lt;=3)
glTranslatef(x1,2.38,-2.0);
if(x1&amp;gt;=3 &amp;amp;&amp;amp; y1&amp;gt;=0)
glTranslatef(3,y1,-2.0);
if(x1&amp;gt;=3 &amp;amp;&amp;amp; y1&amp;lt;=0.0)
{
dubai=true;
local=false;
} }
// Ack packets
if(dubai)
{
if(x2&amp;gt;=3 &amp;amp;&amp;amp; y2&amp;lt;=2.38)
glTranslatef(3,y2,-2.0);
if(y2&amp;gt;=2.38 &amp;amp;&amp;amp; x2&amp;gt;=-3)
glTranslatef(x2,2.38,-2.0);
if(x2&amp;lt;=-3 &amp;amp;&amp;amp; y2&amp;gt;=0.0)
glTranslatef(-3,y2,-2.0);
if(x2&amp;lt;=-3 &amp;amp;&amp;amp; y2&amp;lt;=0.0)
DATA COMMUNICATION over INTERNET
19 Dept. of Computer Science &amp;amp; Engineering.
{
dubai=false;
local=true;
rt2pca=true;
x8=0;
y8=6;
glutIdleFunc(d);
} }
glScaled(0.1,0.1,0.1);
glColor3f(1,1,1);
glutSolidCube(1);
glPopMatrix();
glFlush();
glutSwapBuffers();
}
void building(double ang)
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glLoadIdentity();
glTranslatef(0.0f,0.0f,-13.0f);
glPushMatrix();
glScaled(0.3,1.5,0.3);
glRotatef(90,1.0f,0.0f,0.0f);
glTranslatef(8.5,0,-0.5);
glutSolidTorus(0.2,1.0,40,40);
glPopMatrix();
glFlush();
glutSwapBuffers();
}
void about()
{
glClearColor(0.0,0.85,1,0.0);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glLoadIdentity();
glTranslatef(0.0f,0.0f,-13.0f);
setFont(GLUT_BITMAP_TIMES_ROMAN_24);
DATA COMMUNICATION over INTERNET
20 Dept. of Computer Science &amp;amp; Engineering.
glColor3f(0,0,0);
drawstring(-4.2,2,0.0,&quot;About Data Communication&quot;);
setFont(GLUT_BITMAP_TIMES_ROMAN_24);
glColor3f(0,0,0);
drawstring(-3.5,1.5,0.0,&quot;1. Data Communications refers to the exchange of
data between two devices via some&quot;);
glColor3f(0,0,0);
drawstring(-3.5,1,0.0,&quot; form of transmission medium such as a wire
cable.&quot;);
glColor3f(0,0,0);
drawstring(-3.5,.5,0.0,&quot;2. Similarly data and information from one computer
system can be transmitted to&quot;);
glColor3f(0,0,0);
drawstring(-3.5,0.0,0.0,&quot; other systems across geographical areas.&quot;);
glColor3f(0,0,0);
drawstring(-3.5,-0.5,0.0,&quot;3. Thus data transmission is the movement of
information using some standard methods.&quot;);
glColor3f(0,0,0);
drawstring(-3.5,-1,0.0,&quot;4. The effectiveness of a data communications
system depends on&quot;);
glColor3f(0,0,0);
drawstring(-3.5,-1.5,0.0,&quot; four fundamental characteristics: delivery,
accuracy, timeliness, and jitter.&quot;);
glColor3f(0,0,0);
drawstring(-3.5,-2,0.0,&quot;5. A network is two or more devices connected
through links.&quot;);
glColor3f(0,0,0);
drawstring(-3.5,-2.5,0.0,&quot;6. A link is a communications pathway that
transfers data from one device to another.&quot;);
glColor3f(0,0,0);
drawstring(-3.5,-3,0.0,&quot;7. Type of Connection : Point-to-Point &amp;amp;
Multipoint.&quot;);
glFlush();
glutSwapBuffers();
}
void s()
DATA COMMUNICATION over INTERNET
21 Dept. of Computer Science &amp;amp; Engineering.
{
lan(-4,1);
}
void n()
{
x-=0.07;
network(x,0,0,0,0);
}
void P()
{
if(local)
{
if(x1==-3 &amp;amp;&amp;amp; y1&amp;lt;=2.38){
y1+=0.01;
}
if(y1&amp;gt;=2.38 &amp;amp;&amp;amp; x1&amp;lt;=3.0)
{ x1+=0.01;
}
if(x1&amp;gt;=3 &amp;amp;&amp;amp; y1&amp;gt;=0.0){
y1-=0.01;
}
x+= .07;
network(x,x1,x2,y1,y2);
}
//Dubai to local
if(dubai)
{
if(x2&amp;gt;=3 &amp;amp;&amp;amp; y2&amp;lt;=2.38)
y2+=0.01;
if(y2&amp;gt;=2.38 &amp;amp;&amp;amp; x2&amp;gt;=-3)
x2-=0.01;
if(x2&amp;lt;=-3 &amp;amp;&amp;amp; y2&amp;gt;=0.0)
y2-=0.01;
x+= .07;
network(x,x1,x2,y1,y2);
} }
DATA COMMUNICATION over INTERNET
22 Dept. of Computer Science &amp;amp; Engineering.
void d()
{
if(pca2pcb)
{ if(x8&amp;gt;=-4 &amp;amp;&amp;amp; x8&amp;lt;=4){
x8+=0.01;
}
lan(x8,0);
}
if(pcb2pca)
{
if(x9&amp;lt;=4 &amp;amp;&amp;amp; x9&amp;gt;=-4){
x9-=0.01;
}
lan(x9,0);
}
// To Dubai
if(pca2rt &amp;amp; rt2pca==false)
{
if(x8&amp;gt;=-4 &amp;amp;&amp;amp; y8&amp;lt;=6){
if(x8&amp;lt;=0)
{x8+=0.01;
}
if(x8&amp;gt;=0 &amp;amp;&amp;amp; y8&amp;lt;=6)
{
y8+=0.01;
}
}
lan(x8,y8);
}
if(rt2pca)
{
if(x8&amp;lt;=0 &amp;amp;&amp;amp; y8&amp;lt;=6){
if(y8&amp;gt;=0)
{y8-=0.01;
}
if(x8&amp;gt;=-4 &amp;amp;&amp;amp; y8&amp;lt;=0)
DATA COMMUNICATION over INTERNET
23 Dept. of Computer Science &amp;amp; Engineering.
{
x8-=0.01;
} }
lan(x8,y8);
} }
void doInit()
{
/* Background and foreground color */
glClearColor(0.0,0.0,0.0,0);
glViewport(0,0,640,480);
/* Select the projection matrix and reset it then
setup our view perspective */
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective(30.0f,(GLfloat)640/(GLfloat)480,0.1f,200.0f);
/* Select the modelview matrix, which we alter with rotatef() */
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glClearDepth(2.0f);
glEnable(GL_DEPTH_TEST);
glDepthFunc(GL_LEQUAL);
}
void display()
{
glClearColor(0.1,0.1,0.5,0.0);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glLoadIdentity();
glTranslatef(0.0f,0.0f,-13.0f);
setFont(GLUT_BITMAP_TIMES_ROMAN_24);
glColor3f(3.0,1.0,1.0);
drawstring(-1.5,3.0,0.0,&quot;DEPARTMENT OF COMPUTER SCIENCE&quot;);
setFont(GLUT_BITMAP_TIMES_ROMAN_24);
glColor3f(0.0,1.0,1.0);
drawstring(-3.0,2.5,0.0,&quot;Computer Graphics Mini Project on DATA
COMMUNICATION IN NETWORK&quot;);
DATA COMMUNICATION over INTERNET
24 Dept. of Computer Science &amp;amp; Engineering.
setFont(GLUT_BITMAP_TIMES_ROMAN_24);
glColor3f(0.0,1.0,1.0);
drawstring(-1,2,0,&quot;Using OPENGL&quot;);
setFont(GLUT_BITMAP_TIMES_ROMAN_24);
glColor3f(0.0,1.0,1.0);
drawstring(-0.5,1.5,0,&quot;By&quot;);
setFont(GLUT_BITMAP_TIMES_ROMAN_24);
glColor3f(0.0,1.0,1.0);
drawstring(-2,1,0,&quot;BUSHRA JABEEN (USN : 3KB10CS022)&quot;);
setFont(GLUT_BITMAP_TIMES_ROMAN_24);
glColor3f(0.0,1.0,1.0);
drawstring(-2,.5,0,&quot;BUSHRA SULTANA (USN : 3KB10CS023)&quot;);
stroke_output(-2.0, -1, &quot;s --&amp;gt; Start&quot;);
stroke_output(-2.0, -1.75, &quot;A --&amp;gt; About&quot;);
stroke_output(-2.0, -3,&quot;q --&amp;gt; Quit&quot;);
GLfloat mat_ambient[]={0.0f,1.0f,2.0f,1.0f};
GLfloat mat_diffuse[]={0.0f,1.5f,.5f,1.0f};
GLfloat mat_specular[]={5.0f,1.0f,1.0f,1.0f};
GLfloat mat_shininess[]={50.0f};
glMaterialfv(GL_FRONT,GL_AMBIENT,mat_ambient);
glMaterialfv(GL_FRONT,GL_DIFFUSE,mat_diffuse);
glMaterialfv(GL_FRONT,GL_SPECULAR,mat_specular);
glMaterialfv(GL_FRONT,GL_SHININESS,mat_shininess);
GLfloat lightIntensity[]={1.7f,1.7f,1.7f,1.0f};
GLfloat light_position3[]={0.0f,5.0f,5.0f,0.0f};
glLightfv(GL_LIGHT0,GL_POSITION,light_position3);
glLightfv(GL_LIGHT0,GL_DIFFUSE,lightIntensity);
glEnable(GL_COLOR_MATERIAL);
glFlush();
glutSwapBuffers();
}
void menu(int id)
{
switch(id)
{
case 1:glutIdleFunc(about);
DATA COMMUNICATION over INTERNET
25 Dept. of Computer Science &amp;amp; Engineering.
break;
case 2:glutIdleFunc(s);
break;
case 3:glutIdleFunc(d);
break;
case 4:glutIdleFunc(P);
break;
case 5:glutIdleFunc(n);
break;
case 6:
pca2pcb=true;
x8=-4;
glutIdleFunc(d);
break;
case 7:
local=true;
dubai=false;
pca2rt=true;
x8=-4.0;x9=4.0;y8=0.0; y9=0;
pca2pcb=false;
pcb2pca=false;
glutIdleFunc(d);
break;
case 8: pca2rt=false;
pca2pcb=false;
x8=-4.0;x9=4.0;y8=1.0; y9=0;
x=0.0;x1=-3.0;x2=3.0;y1=0.0;y2=2.38;
pca2pcb=false;pca2rt=false; pcb2pca=false;
glutIdleFunc(s);
break;
case 9:exit(0);
break;
}
glFlush();
glutSwapBuffers();
glutPostRedisplay();
DATA COMMUNICATION over INTERNET
26 Dept. of Computer Science &amp;amp; Engineering.
}
void mykey(unsigned char key,int x,int y)
{
if(key==&#39;s&#39;)
{
glutIdleFunc(s);
}
if(key==&#39;n&#39;)
{
glutIdleFunc(n);
}
if(key==&#39;P&#39;)
{
glutIdleFunc(P);
}
if(key==&#39;A&#39;)
{
glutIdleFunc(about);
}
if(key==&#39;q&#39;||key==&#39;Q&#39;)
{
exit(0);
}
}
void main(int argc, char *argv[])
{
glutInit(&amp;amp;argc, argv);
glutInitDisplayMode(GLUT_DOUBLE|GLUT_RGB);
glutInitWindowSize(1000,480);
glutInitWindowPosition(0,0);
glutCreateWindow(&quot;Data Communication in Network&quot;);
glutDisplayFunc(display);
glEnable(GL_LIGHTING);
glEnable(GL_LIGHT0);
glShadeModel(GL_SMOOTH);
glEnable(GL_DEPTH_TEST);
DATA COMMUNICATION over INTERNET
27 Dept. of Computer Science &amp;amp; Engineering.
glEnable(GL_NORMALIZE);
glutKeyboardFunc(mykey);
glutCreateMenu(menu);
glutAddMenuEntry(&quot;About Project &#39;A&#39;&quot;,1);
glutAddMenuEntry(&quot;Local Area Network(LAN) &#39;s&#39;&quot;,2);
glutAddMenuEntry(&quot;Local Area Network(LAN) &#39;n&#39;&quot;,3);
glutAddMenuEntry(&quot;Wide Area Network(WAN) &#39;P&#39;&quot;,5);
glutAddMenuEntry(&quot;Transfer data from PC-A to PC-B &#39;1&#39;&quot;,6);
glutAddMenuEntry(&quot;Transfer data from PC-A to Company B --&amp;gt;&#39;2&#39;&quot;,7);
glutAddMenuEntry(&quot;Reset &#39;r&#39;&quot;,8);
glutAddMenuEntry(&quot;Quit &#39;q&#39;&quot;,9);
glutAttachMenu(GLUT_RIGHT_BUTTON);
doInit();
glutMainLoop();
}
&lt;/1&gt;&lt;/gl&gt;&lt;/stdio&gt;&lt;/stdarg&gt;&lt;/string&gt;&lt;/windows&gt;&lt;/stdlib&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
  
 &lt;div class=&quot;download_code&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;download_code&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;download_code&quot;&gt;&lt;a class=&quot;btn_left&quot; href=&quot;https://drive.google.com/file/d/1tpBPr_jS4OkUIKwYA3dItK5n4UdoZUPG/view?usp=share_link&quot; target=&quot;_blank&quot;&gt;Download source code&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.openglprojects.in/feeds/4601554936931675922/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.openglprojects.in/2025/04/create-opengl-cg-projects-on-networking.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2020194800836807725/posts/default/4601554936931675922'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2020194800836807725/posts/default/4601554936931675922'/><link rel='alternate' type='text/html' href='http://www.openglprojects.in/2025/04/create-opengl-cg-projects-on-networking.html' title='Create OpenGL CG Projects on Networking Data Communication'/><author><name>Rajeev</name><uri>http://www.blogger.com/profile/03147189487850777395</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNYQd6vvD_A2fjXT1IGI8a6ttjyX4Mxp8id6XO0-uFXcFKqTvGIoX6BuAyZzGoozdYMFPFRH6-yWOSHgzJnSj14UhFP4DDD1WH-qX6i9iEsSYA9-BzX7lBhUuXPncWHvVdg_zWX_2pQHnQfeGKlY7GlVIknWQBC2I61TCJb3NLABenToPd8qEVTLxPVHAT/s72-c/CG%20Projects%20on%20Networking%20Data%20Communication1.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2020194800836807725.post-5586055010079604660</id><published>2025-02-26T20:56:00.003+05:30</published><updated>2025-02-26T20:57:48.990+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="IC engine"/><title type='text'>Internal combustion engine - IC engine - OpenGL Computer Graphics Project</title><content type='html'>&lt;p style=&quot;text-align: justify;&quot;&gt;In this post we are going to referring to a project that involves computer graphics related to an internal combustion (IC) engine in particular petrol engine.We are going to focus on the design of engine components, simulations of the engine cycle and will going to show visualizations of how the internal combustion (IC) engine&amp;nbsp;works.&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;An &lt;strong data-end=&quot;39&quot; data-start=&quot;3&quot;&gt;internal combustion engine (IC Engine)&lt;/strong&gt; is a type of heat engine that generates power by burning (using oxidizer usually air) fuel (typically gasoline(petrol), diesel, or natural gas etc) inside a combustion chamber. IC&amp;nbsp;&lt;strong data-end=&quot;39&quot; data-start=&quot;3&quot;&gt;engines&lt;/strong&gt;&amp;nbsp;are used in many vehicles, including cars, motorcycles, trucks, and airplanes. Below is Figure of an Typical&amp;nbsp;&amp;nbsp;IC engine.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;a href=&quot;https://upload.wikimedia.org/wikipedia/commons/thumb/4/47/Four_stroke_engine_diagram.jpg/220px-Four_stroke_engine_diagram.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;248&quot; data-original-width=&quot;220&quot; height=&quot;320&quot; src=&quot;https://upload.wikimedia.org/wikipedia/commons/thumb/4/47/Four_stroke_engine_diagram.jpg/220px-Four_stroke_engine_diagram.jpg&quot; width=&quot;284&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;p data-end=&quot;372&quot; data-start=&quot;0&quot; style=&quot;text-align: justify;&quot;&gt;Before going to &lt;a href=&quot;https://github.com/prasannakusugal/Computer-Graphics-Project&quot; target=&quot;_blank&quot;&gt;OpenGL Computer Graphics Project for IC engine&lt;/a&gt; let us know some more information about&amp;nbsp;Internal combustion engine.&lt;/p&gt;&lt;p data-end=&quot;436&quot; data-start=&quot;374&quot; style=&quot;text-align: justify;&quot;&gt;Here’s a breakdown of how an internal combustion engine works:&lt;/p&gt;&lt;ol data-end=&quot;1033&quot; data-start=&quot;438&quot;&gt;&lt;li data-end=&quot;527&quot; data-start=&quot;438&quot;&gt;&lt;p data-end=&quot;527&quot; data-start=&quot;441&quot; style=&quot;text-align: justify;&quot;&gt;&lt;strong data-end=&quot;452&quot; data-start=&quot;441&quot;&gt;Intake:&lt;/strong&gt; The engine draws in a mixture of fuel and air into the combustion chamber.&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;697&quot; data-start=&quot;529&quot;&gt;&lt;p data-end=&quot;697&quot; data-start=&quot;532&quot; style=&quot;text-align: justify;&quot;&gt;&lt;strong data-end=&quot;548&quot; data-start=&quot;532&quot;&gt;Compression:&lt;/strong&gt; The intake valve closes, and the piston moves upwards, compressing the fuel-air mixture. This increases the pressure and temperature of the mixture.&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;905&quot; data-start=&quot;699&quot;&gt;&lt;p data-end=&quot;905&quot; data-start=&quot;702&quot; style=&quot;text-align: justify;&quot;&gt;&lt;strong data-end=&quot;723&quot; data-start=&quot;702&quot;&gt;Power/Combustion:&lt;/strong&gt; A spark plug ignites the compressed fuel-air mixture, causing a controlled explosion. This explosion pushes the piston down, which creates the mechanical energy to power the engine.&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;1033&quot; data-start=&quot;907&quot;&gt;&lt;p data-end=&quot;1033&quot; data-start=&quot;910&quot; style=&quot;text-align: justify;&quot;&gt;&lt;strong data-end=&quot;922&quot; data-start=&quot;910&quot;&gt;Exhaust:&lt;/strong&gt; The exhaust valve opens, and the piston moves upwards again to expel the combustion gases out of the cylinder.&lt;/p&gt;&lt;/li&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;a href=&quot;https://upload.wikimedia.org/wikipedia/commons/thumb/d/dc/4StrokeEngine_Ortho_3D_Small.gif/220px-4StrokeEngine_Ortho_3D_Small.gif&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;293&quot; data-original-width=&quot;220&quot; height=&quot;293&quot; src=&quot;https://upload.wikimedia.org/wikipedia/commons/thumb/d/dc/4StrokeEngine_Ortho_3D_Small.gif/220px-4StrokeEngine_Ortho_3D_Small.gif&quot; width=&quot;220&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/ol&gt;&lt;p data-end=&quot;1220&quot; data-start=&quot;1035&quot; style=&quot;text-align: justify;&quot;&gt;The cycle repeats continuously, with pistons moving up and down, creating the power needed to drive a vehicle or perform work. There are two common types of internal combustion engines:&lt;/p&gt;&lt;ul data-end=&quot;1432&quot; data-start=&quot;1221&quot;&gt;&lt;li data-end=&quot;1323&quot; data-start=&quot;1221&quot; style=&quot;text-align: justify;&quot;&gt;&lt;strong data-end=&quot;1246&quot; data-start=&quot;1223&quot;&gt;Two-stroke engines:&lt;/strong&gt; Complete a power cycle with two strokes of the piston (one up and one down).&lt;/li&gt;&lt;li data-end=&quot;1432&quot; data-start=&quot;1324&quot; style=&quot;text-align: justify;&quot;&gt;&lt;strong data-end=&quot;1350&quot; data-start=&quot;1326&quot;&gt;Four-stroke engines:&lt;/strong&gt; Complete a power cycle in four strokes (intake, compression, power, and exhaust).&lt;/li&gt;&lt;/ul&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Usages :&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span face=&quot;-apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;&quot; style=&quot;background-color: white; color: #1f2328; font-size: 16px;&quot;&gt;Keyboard:&amp;nbsp;&lt;/span&gt;&lt;span face=&quot;-apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;&quot; style=&quot;background-color: white; color: #1f2328; font-size: 16px;&quot;&gt;&#39;Space&#39; :&amp;nbsp;&lt;/span&gt;&lt;span face=&quot;-apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;&quot; style=&quot;background-color: white; color: #1f2328; font-size: 16px;&quot;&gt;stop/start Engine&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span face=&quot;-apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;&quot; style=&quot;background-color: white; color: #1f2328; font-size: 16px;&quot;&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&#39;+&#39; :&amp;nbsp; Speed up Engine&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span face=&quot;-apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;&quot; style=&quot;background-color: white; color: #1f2328; font-size: 16px;&quot;&gt;&amp;nbsp;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&#39;-&#39; :&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span face=&quot;-apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;&quot; style=&quot;background-color: white; color: #1f2328; font-size: 16px;&quot;&gt;Speed&lt;/span&gt;&lt;span face=&quot;-apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;&quot; style=&quot;background-color: white; color: #1f2328; font-size: 16px;&quot;&gt;&amp;nbsp;down Engine&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span face=&quot;-apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;&quot; style=&quot;background-color: white; color: #1f2328; font-size: 16px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span face=&quot;-apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;&quot; style=&quot;background-color: white; color: #1f2328; font-size: 16px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;a href=&quot;https://raw.githubusercontent.com/prasannakusugal/Computer-Graphics-Project/refs/heads/master/ic_engine_screenshot.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;965&quot; data-original-width=&quot;1920&quot; height=&quot;322&quot; src=&quot;https://raw.githubusercontent.com/prasannakusugal/Computer-Graphics-Project/refs/heads/master/ic_engine_screenshot.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;span face=&quot;-apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;&quot; style=&quot;background-color: white; color: #1f2328;&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span face=&quot;-apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;&quot; style=&quot;background-color: white; color: #1f2328; font-size: 16px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span face=&quot;-apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;&quot; style=&quot;background-color: white; color: #1f2328; font-size: 16px;&quot;&gt;Code :&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span face=&quot;-apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;&quot; style=&quot;background-color: white; color: #1f2328; font-size: 16px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;pre style=&quot;overflow-wrap: break-word;&quot;&gt;&lt;div style=&quot;text-align: justify; text-wrap-mode: wrap;&quot;&gt;//Simple Program:&lt;/div&gt;&lt;div style=&quot;text-align: justify; text-wrap-mode: wrap;&quot;&gt;#include&amp;lt;stdlib.h&amp;gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify; text-wrap-mode: wrap;&quot;&gt;#include&amp;lt;GL/glut.h&amp;gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify; text-wrap-mode: wrap;&quot;&gt;#include &amp;lt;math.h&amp;gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;text-wrap-mode: wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;text-wrap-mode: wrap;&quot;&gt;void *font = GLUT_BITMAP_TIMES_ROMAN_24;
char buff[10];
void *fonts[] =
{
  GLUT_BITMAP_9_BY_15,
  GLUT_BITMAP_TIMES_ROMAN_10,
  GLUT_BITMAP_TIMES_ROMAN_24
};
int cc=25,cb=65,s=0,speed=30,status=1;
float pointer=25;
typedef struct
{ GLfloat x,y;} Pt;
Pt  q1, q2,q3,q4;
GLfloat colors[][3] = {{0.5,0.5,0.5},{0.5,0.5,0.5},{0.8,0.8,0.8},{0.8,0.8,0.8},{0.8,0.8,0.8},{0.4,0.4,0.4}};
void init()
{
	glClearColor(0.0,0,0,0.0);
	glMatrixMode(GL_PROJECTION);
	glLoadIdentity();
	gluOrtho2D(0.0,499.0,0.0,499.0);
    glutPostRedisplay();
}

void DrawLine(Pt n1, Pt n2)
     {

        glBegin(GL_LINES);
 for (int i=0;i&amp;lt;3;i++){
       glVertex2f(n1.x+i, n1.y+i);
       glVertex2f(n2.x+i, n2.y+i);
 }
       glEnd();
  //     glFlush();

     }
void point (float x,float y){
   glPointSize(10.0f);
	glBegin(GL_POINTS);
	glVertex2f(x,y);
glEnd();
//glFlush();

}
void rect(Pt n1, Pt n2,Pt n3, Pt n4){
    glBegin(GL_QUADS);        // Draw The Cube Using quads
//    glColor3f(0.0f,1.0f,0.0f);    // Color Blue
    glVertex2f(n1.x, n1.y);
    glVertex2f(n2.x, n2.y);
    glVertex2f(n3.x, n3.y);
    glVertex2f(n4.x, n4.y);
    glEnd();            // End Drawing The Cube
//glFlush();
}

void Circle(float cx, float cy, float r, int num_segments,int h) {
    //glColor3f(0.0,0.0,1.0);
    float xx,yy,n;
    if(h==1)
    glBegin(GL_LINE_LOOP);//  for not filled circle
    else
    glBegin(GL_TRIANGLE_FAN);

    for (int ii = 0; ii &amp;lt; num_segments; ii++)   {
        float theta = 2.0f * 3.1415926f * float(ii) / float(num_segments);//get the current angle
        float x = r * cosf(theta);//calculate the x component
        float y = r * sinf(theta);//calculate the y component
        glVertex2f(x + cx, y + cy);//output vertex

      }
    glEnd();

}
void quad(Pt n1, Pt n2,int i){
    glBegin(GL_QUADS);        // Draw The Cube Using quads
 //   glColor3f(0.0f,1.0f,0.0f);    // Color Blue
    glVertex2f(n1.x-i, n1.y);
    glVertex2f(n1.x+i, n1.y);
    glVertex2f(n2.x+i, n2.y);
    glVertex2f(n2.x-i, n2.y);
    glEnd();            // End Drawing The Cube
//glFlush();
}

void quadd(Pt n1, Pt n2){
    glBegin(GL_QUADS);        // Draw The Cube Using quads
    //glColor3f(0.0f,1.0f,0.0f);    // Color Blue
    glVertex2f(n1.x, n1.y-5);
    glVertex2f(n1.x, n1.y+5);
    glVertex2f(n2.x, n2.y+5);
    glVertex2f(n2.x, n2.y-5);
    glEnd();            // End Drawing The Cube
//glFlush();
}

void rectangle(Pt n1, Pt n2,int i){
	glBegin(GL_QUADS);        // Draw The Cube Using quads
    //glColor3f(0.0f,1.0f,0.0f);    // Color Blue
    glVertex2f(n1.x-i, n1.y);
    glVertex2f(n2.x+i, n1.y);
    glVertex2f(n2.x+i, n2.y);
    glVertex2f(n1.x-i, n2.y);
    glEnd();            // End Drawing The Cube
//glFlush();
}
void outlet(float x,float y){
    glColor3fv(colors[3]);
glBegin(GL_TRIANGLE_FAN);
if(s==1 )
{   if(cc&amp;gt;=75 &amp;amp;&amp;amp; cc&amp;lt;100 || cc&amp;gt;=0 &amp;amp;&amp;amp; cc&amp;lt;=25)
    glColor3f(0.9,0.96,0.96);

}
if(s==0){
   if(cc&amp;gt;25 &amp;amp;&amp;amp; cc&amp;lt;=50){
        float r=(cc-25)*0.006;
        glColor3f(0.9-(r),0.95-(r),0.95-(r));
    }}

        float cx=x+50,cy=y+225,r=32;
    for (int ii = 0; ii &amp;lt; 100; ii++)   {
        float theta = 2.0f * 3.1415926f * float(ii) / float(100);//get the current angle
        float x = r * cosf(theta);//calculate the x component
        float y = r * sinf(theta);//calculate the y component
        if(ii&amp;gt;=25 &amp;amp;&amp;amp; ii&amp;lt;=50)
        glVertex2f(x + cx, y + cy);//output vertex

      } r=10;
    for (int ii = 100; ii &amp;gt;=0; ii--)   {
        float theta = 2.0f * 3.1415926f * float(ii) / float(100);//get the current angle
        float x = r * cosf(theta);//calculate the x component
        float y = r * sinf(theta);//calculate the y component
        if(ii&amp;gt;=25 &amp;amp;&amp;amp; ii&amp;lt;=50)
        glVertex2f(x + cx, y + cy);//output vertex

      }
        glEnd();
        glBegin(GL_TRIANGLE_FAN);
        glVertex2f(x+100, y+234);
        glVertex2f(x+100, y+256);
        glVertex2d(x+41, y+256);
        glVertex2f(x+41, y+234);
        glEnd();

}

void outletcover(float x,float y){
glColor3fv(colors[1]);
//glColor3f(0,0,0);
glBegin(GL_TRIANGLE_FAN);

        float cx=x+50,cy=y+225,r=34;
    for (int ii = 0; ii &amp;lt; 100; ii++)   {
        float theta = 2.0f * 3.1415926f * float(ii) / float(100);//get the current angle
        float x = r * cosf(theta);//calculate the x component
        float y = r * sinf(theta);//calculate the y component
        if(ii&amp;gt;=25 &amp;amp;&amp;amp; ii&amp;lt;=50)
        glVertex2f(x + cx, y + cy);//output vertex

      } r=8;
    for (int ii = 100; ii &amp;gt;=0; ii--)   {
        float theta = 2.0f * 3.1415926f * float(ii) / float(100);//get the current angle
        float x = r * cosf(theta);//calculate the x component
        float y = r * sinf(theta);//calculate the y component
        if(ii&amp;gt;=25 &amp;amp;&amp;amp; ii&amp;lt;=50)
        glVertex2f(x + cx, y + cy);//output vertex

      }
        glEnd();
        glBegin(GL_TRIANGLE_FAN);
        glVertex2f(x+100, y+232);
        glVertex2f(x+100, y+259);
        glVertex2d(x+42, y+259);
        glVertex2f(x+42, y+232);
        glEnd();

}
void Crank(float cx, float cy, float r, int num_segments) {
    glColor3f(0.0,0.0,1.0);
    float xx,yy,n;
    glBegin(GL_LINE_LOOP);//  for not filled circle
    //glBegin(GL_TRIANGLE_FAN);
    for (int ii = 0; ii &amp;lt; num_segments; ii++)   {
        float theta = 2.0f * 3.1415926f * float(ii) / float(num_segments);//get the current angle
        float x = r * cosf(theta);//calculate the x component
        float y = r * sinf(theta);//calculate the y component
      if(ii==cc){
       xx=x+ cx;
                yy=y+ cy;    }
      }
    glEnd();
    if(cc&amp;gt;=0 &amp;amp;&amp;amp; cc&amp;lt;25)
    {n=cy+125+(cc*1.4);}
    else if(cc&amp;gt;=25 &amp;amp;&amp;amp; cc&amp;lt;=75)
        {n=cy+160-((cc-25)*1.4);}
     else if(cc&amp;gt;75 &amp;amp;&amp;amp; cc&amp;lt;100)
    {n=cy+90+((cc-75)*1.4);}


    glColor3f(0.0f,1.0f,0.0f);
    q1.x=xx;
    q1.y=yy;
                    /*glColor3f(0.0f,0.0f,1.0f);
                    q2.x=cx;
                    q2.y=cy;
                    quad(q1,q2,5);
                    q2.x=cx;
                    q2.y=cy;
                    quadd(q1,q2);*/
    glColor3f(0.4f,0.4f,0.4f);
    q2.x=cx;
    q2.y=n;
    quad(q1,q2,5);
    q1.x=cx;
    q1.y=n;
    q2.x=cx;
    q2.y=n+40;
    //glColor3f(0.0f,0.0f,1.0f);
    glColor3fv(colors[0]);
    quad(q1,q2,45);
    glColor3f(0.4f,0.4f,0.4f);


    glColor3f(0.4f,0.4f,0.4f);
    q1.x=cx;
    q1.y=n+18;
    q2.x=cx;
    q2.y=n+28;
    //quad(q1,q2,45);
    q1.x=cx;
    q1.y=n+30;
    q2.x=cx;
    q2.y=n+39;
    //quad(q1,q2,45);
    Circle(xx,yy,10,100,0);//crank connector
    Circle(cx,n+10,10,100,0);//piston connecting rod


}

void Crankrod(float cx, float cy, float r, int num_segments) {
    float xx,yy,n,xxx,yyy,flg=0;
    glBegin(GL_TRIANGLE_FAN);
    for (int ii = 0; ii &amp;lt; num_segments; ii++)   {
        float theta = 2.0f * 3.1415926f * float(ii) / float(num_segments);//get the current angle
        float x = r * cosf(theta);//calculate the x component
        float y = r * sinf(theta);//calculate the y component

      if(ii&amp;gt;=cb &amp;amp;&amp;amp; ii&amp;lt;=(cb+20)){
                glVertex2f(x + cx, y + cy);//output vertex
                if(flg!=1)
                {xxx=x+cx;
                yyy=y+cy;}
    }
     if(cb&amp;gt;=80 &amp;amp;&amp;amp; ii&amp;lt;=(20-(100-cb))){
                glVertex2f(x + cx, y + cy);//output vertex
                xxx=x+cx;
                yyy=y+cy;
                flg=1;
    }
    if(ii==cb){
                xx=x+ cx;
                yy=y+ cy;
    }
    }
    glEnd();

    q1.x=xx;
    q1.y=yy;
    q2.x=xxx;
    q2.y=yyy;
    q3.x=cx;
    q3.y=cy;
    q4.x=cx;
    q4.y=cy;

    rect(q1,q2,q3,q4);


    //glColor3f(0.0,0.0,0.0);

    //Circle(xx,yy,3,100,0);

}void valve(float x,float y){

   float p=0;
    if(s==0){
     if(cc&amp;gt;=25 &amp;amp;&amp;amp; cc&amp;lt;=50)
        p=-(cc-25)*0.6;
     else if(cc&amp;gt;50 &amp;amp;&amp;amp; cc&amp;lt;75)
        p=-15+(cc-50)*0.6;
    }
                    //glColor3f(1.0f,0.0f,0.0f);
                    glColor3fv(colors[5]);
                    q1.x=x-30;
                    q1.y=y+225+p;
                    q2.x=x-30;
                    q2.y=y+220+p;
                    quad(q1,q2,10);
                    q1.x=x-30;
                    q1.y=y+225+p;
                    q2.x=x-30;
                    q2.y=y+276+p;
                    quad(q1,q2,2);


     p=0;
     if(s==1){
  if(cc&amp;gt;=0 &amp;amp;&amp;amp; cc&amp;lt;25)
        p=-15+(cc)*0.6;
    if(cc&amp;gt;=75 &amp;amp;&amp;amp; cc&amp;lt;100)
    p=-(cc-75)*0.6;

    }               q1.x=x+30;
                    q1.y=y+225+p;
                    q2.x=x+30;
                    q2.y=y+220+p;
                    quad(q1,q2,10);
                    q1.x=x+30;
                    q1.y=y+225+p;
                    q2.x=x+30;
                    q2.y=y+276+p;
                    quad(q1,q2,2);


}
void cover(float x,float y){// x=900;y=500;
//glColor3f(1.0,1.0,0.0);
glBegin(GL_TRIANGLE_FAN);
glVertex2d(x-120,y+60);
glVertex2d(x-55,y+125);
glVertex2d(x+55,y+125);
glVertex2d(x+120,y+60);
glVertex2d(x+120,y-120);
glVertex2d(x-120,y-120);
glEnd();

glBegin(GL_TRIANGLE_FAN);
//glVertex2d(780,560);
glVertex2d(x-55,y+125);
glVertex2d(x-55,y+225);
glVertex2d(x-20,y+250);
glVertex2d(x+20,y+250);
glVertex2d(x+55,y+225);
glVertex2d(x+55,y+125);
glEnd();

}
void innlet(float x,float y){
    glColor3fv(colors[3]);

glBegin(GL_TRIANGLE_FAN);
if(s==0 )
{   if(cc&amp;gt;=27 &amp;amp;&amp;amp; cc&amp;lt;75)
    glColor3f(0.0,0.5,1.0);
    if(cc&amp;gt;=75 &amp;amp;&amp;amp; cc&amp;lt;100){
        float r=(cc-75)*0.032;
        glColor3f(0.0+r,0.5+(r/2.66),1.0-(r/4));
    }
}
        float cx=x-50,cy=y+225,r=32;
    for (int ii = 0; ii &amp;lt; 100; ii++)   {
        float theta = 2.0f * 3.1415926f * float(ii) / float(100);//get the current angle
        float x = r * cosf(theta);//calculate the x component
        float y = r * sinf(theta);//calculate the y component
        if(ii&amp;gt;=0 &amp;amp;&amp;amp; ii&amp;lt;=25)
        glVertex2f(x + cx, y + cy);//output vertex

      }r=10;
    for (int ii = 100; ii &amp;gt;=0; ii--)   {
        float theta = 2.0f * 3.1415926f * float(ii) / float(100);//get the current angle
        float x = r * cosf(theta);//calculate the x component
        float y = r * sinf(theta);//calculate the y component
        if(ii&amp;gt;=0 &amp;amp;&amp;amp; ii&amp;lt;=25)
        glVertex2f(x + cx, y + cy);//output vertex

      }
    glEnd();
        glBegin(GL_TRIANGLE_FAN);
        glVertex2f(x-100, y+256);
        glVertex2f(x-100, y+235);
        glVertex2d(x-49,y+235);
        glVertex2f(x-49, y+256);
        glEnd();

}
void innletcover(float x,float y){
    glColor3fv(colors[1]);

glBegin(GL_TRIANGLE_FAN);
        float cx=x-50,cy=y+225,r=34;
    for (int ii = 0; ii &amp;lt; 100; ii++)   {
        float theta = 2.0f * 3.1415926f * float(ii) / float(100);//get the current angle
        float x = r * cosf(theta);//calculate the x component
        float y = r * sinf(theta);//calculate the y component
        if(ii&amp;gt;=0 &amp;amp;&amp;amp; ii&amp;lt;=25)
        glVertex2f(x + cx, y + cy);//output vertex

      }r=8;
    for (int ii = 100; ii &amp;gt;=0; ii--)   {
        float theta = 2.0f * 3.1415926f * float(ii) / float(100);//get the current angle
        float x = r * cosf(theta);//calculate the x component
        float y = r * sinf(theta);//calculate the y component
        if(ii&amp;gt;=0 &amp;amp;&amp;amp; ii&amp;lt;=25)
        glVertex2f(x + cx, y + cy);//output vertex

      }
    glEnd();

        glBegin(GL_TRIANGLE_FAN);
        glVertex2f(x-100, y+259);
        glVertex2f(x-100, y+232);
        glVertex2d(x-47,y+232);
        glVertex2f(x-47, y+259);
        glEnd();

}
void spark(float x,float y){
glColor3f(1,1,0.1);
glBegin(GL_TRIANGLE_FAN);
//glBegin(GL_LINE_LOOP);
//glVertex2f(x-5,y+220);
glVertex2f(x+3,y+220);
glVertex2f(x+16,y+225);
glVertex2f(x+10,y+220);
glVertex2f(x+17,y+215);
glVertex2f(x-3,y+220);
glVertex2f(x-16,y+225);
glVertex2f(x-11,y+220);
glVertex2f(x-17,y+215);
glVertex2f(x+3,y+220);
glVertex2f(x+5,y+220);
glVertex2f(x,y+210);
glVertex2f(x-5,y+220);
glEnd();
}
void plug(float x,float y){ //float x=217,y=301;
   glColor3f(0.3,0.3,0.3);
 glBegin(GL_TRIANGLE_FAN);
        glVertex2f(x-2, y+19);
        glVertex2f(x+3, y+19);
        glVertex2f(x+3, y+24);
        glVertex2f(x-2, y+24);
    glEnd();
    glBegin(GL_TRIANGLE_FAN);
        glVertex2f(x-7, y+19);
        glVertex2f(x+8, y+19);
        glVertex2f(x+8, y+1);
        glVertex2f(x-7, y+1);
    glEnd();
glColor3f(0.0,0.0,0.0);

    glBegin(GL_QUADS);
        glVertex2f(x-17, y-1);
        glVertex2f(x+19, y-1);
        glVertex2f(x+19, y+1);
        glVertex2f(x-17, y+1);
    glEnd();
    glColor3f(1.8,1.8,1.0);
glBegin(GL_TRIANGLE_FAN);
        glVertex2f(x-9, y-1);
        glVertex2f(x+10, y-1);
        glVertex2f(x+10, y-31);
        glVertex2f(x-9, y-31);
    glEnd();
     glColor3f(0.0,0.0,0.0);
    glBegin(GL_LINES);
        for(int i=0;i&amp;lt;5;i++)
   {
            glVertex2f(x+10, (y-1)-(5*i));
            glVertex2f(x-9, (y-6)-(5*i));
   }
    glEnd();
     glColor3f(1.8,1.8,1.0);

    glPointSize(7.0f);
    glBegin(GL_POINTS);
    glVertex2d(x+1,y-31);
    glEnd();
    glBegin(GL_LINES);
    glVertex2d(x+6,y-32);
    glVertex2d(x+6,y-41);
    glEnd();
    glBegin(GL_LINES);

    glVertex2d(x-2,y-41);
    glVertex2d(x+6,y-41);

    glEnd();
 glColor3f(0.3,0.3,0.3);
  glBegin(GL_LINES);
        float cx=x+25,cy=y+24,r=25;
        for (int ii = 0; ii &amp;lt; 100; ii++)   {
        float theta = 2.0f * 3.1415926f * float(ii) / float(100);//get the current angle
        float x = r * cosf(theta);//calculate the x component
        float y = r * sinf(theta);//calculate the y component
        if(ii&amp;gt;=25 &amp;amp;&amp;amp; ii&amp;lt;=50)
        glVertex2f(x + cx, y + cy);//output vertex

         }
    glEnd();
}


void fuel(float x,float y){
    float j,i=x,k=y+227,l,flag=0;
    if(s==0){k=y+224;
            if( cc&amp;gt;25 &amp;amp;&amp;amp; cc&amp;lt;=75){
    l=y+170-((cc-25)*1.4);
    flag=1;

    glColor3f(0.0,0.5,1.0);//fuel color
            }
            if( cc&amp;gt;75 &amp;amp;&amp;amp; cc&amp;lt;100){
    l=y+100+((cc-75)*1.4);
    flag=1;
    float rr=(cc-75)*0.02;
    glColor3f(rr,0.5-(rr/2),1-rr);//fuel color
            }
            if( cc&amp;gt;=0 &amp;amp;&amp;amp; cc&amp;lt;25){
    l=y+135+(cc*1.4);
    flag=1;

    float rr=(cc)*0.02;

    glColor3f(rr+0.5,0.25-(rr/2),0.5-rr);//fuel color
            }
    }


     if(s==1){
            k=(y+225);
        if(cc&amp;gt;=25 &amp;amp;&amp;amp; cc&amp;lt;=75){
    l=y+170-((cc-25)*1.4);
    flag=1;
    float rr=(cc-25)*0.02;
    if(rr&amp;gt;=0.95)
        rr=0.95;
    glColor3f(1-(rr*0.1),0+rr,0+rr);

        }
            if( cc&amp;gt;75 &amp;amp;&amp;amp; cc&amp;lt;100){ l=y+100+((cc-75)*1.4);
            flag=1;
 glColor3f(0.9,0.95,0.95);

            }
            if( cc&amp;gt;=0 &amp;amp;&amp;amp; cc&amp;lt;=25){ l=y+135+(cc*1.4);
            flag=1;

 glColor3f(0.9,0.95,0.95);//gas color
 }

    }

    if(flag==1){
    glBegin(GL_LINES);
    for(j=k;j&amp;gt;l;j--)
    {
        glVertex2f(i-43,j);
        glVertex2f(i+44,j);
    }
    glEnd();
    }

}

void board(float x,float y){
//glColor3f(0.0,1.0,1.0);
glColor3f(0.95,1,1);

glBegin(GL_QUADS);
glVertex2f(x-450,y-250);
glVertex2f(x+450,y-250);
glVertex2f(x+450,y+450);
glVertex2f(x-450,y+450);
glEnd();
//glColor3f(0.85,1,1);
glColor3f(0.2,.8,.5);

glBegin(GL_QUADS);
glVertex2f(x-400,y-200);
glVertex2f(x+400,y-200);
glVertex2f(x+400,y+400);
glVertex2f(x-400,y+400);
glEnd();

}

void smallboard(float x,float y){
//glColor3f(0.0,1.0,1.0);
glColor3f(0.95,1,1);

glBegin(GL_QUADS);
glVertex2f(x-200,y-200);
glVertex2f(x+200,y-200);
glVertex2f(x+200,y+200);
glVertex2f(x-200,y+200);
glEnd();
//glColor3f(0.85,1,1);
glColor3f(0.2,.8,.5);

glBegin(GL_QUADS);
glVertex2f(x-160,y-160);
glVertex2f(x+160,y-160);
glVertex2f(x+160,y+160);
glVertex2f(x-160,y+160);
glEnd();

}
/*void board(float x,float y){
glColor3f(0.3,0.3,0.3);
//glColor3f(0.95,1,1);

glBegin(GL_QUADS);
glVertex2f(x-550,y-250);
glVertex2f(x+550,y-250);
glVertex2f(x+550,y+450);
glVertex2f(x-550,y+450);
glEnd();
glColor3f(1.0,1.0,1.0);
//glColor3f(0.2,.8,.5);

glBegin(GL_QUADS);
glVertex2f(x-500,y-200);
glVertex2f(x+500,y-200);
glVertex2f(x+500,y+400);
glVertex2f(x-500,y+400);
glEnd();

}*/

void text(int x, int y, char *string,int j)
{
  int len, i;

  glRasterPos2f(x, y);
  len = (int) strlen(string);
  for (i = 0; i &amp;lt; len; i++) {
    glutBitmapCharacter(fonts[j], string[i]);
  }
}
void indicator(float cx, float cy, float r, int num_segments,int h) {
    //glColor3f(0.0,0.0,1.0);
    float xx,yy,n;
    glBegin(GL_TRIANGLE_FAN);
        glVertex2f(cx, cy);//output vertex

    for (int ii = 0; ii &amp;lt;= num_segments; ii++)   {
        float theta = 2.0f * 3.1415926f * float(ii) / float(num_segments);//get the current angle
        float x = r * cosf(theta);//calculate the x component
        float y = r * sinf(theta);//calculate the y component
        if(ii&amp;gt;=h &amp;amp;&amp;amp; ii&amp;lt;=(h+25))
        glVertex2f(x + cx, y + cy);//output vertex

      }
    glEnd();


}
void kk(float cx, float cy, float r, int num_segments){
    for (int ii = 0; ii &amp;lt;= num_segments; ii++)   {
        float theta = 2.0f * 3.1415926f * float(ii) / float(num_segments);//get the current angle
        float x = r * cosf(theta);//calculate the x component
        float y = r * sinf(theta);//calculate the y component
        if(ii==pointer || ii==(pointer-0.5))
        glVertex2f(x + cx, y + cy);//output vertex

      }

}
void tip(float cx, float cy, float r, int num_segments){
    float xx,yy,n;
    glBegin(GL_TRIANGLE_FAN);
        glVertex2f(cx-5, cy-5);//output vertex
        kk(cx,cy,r,num_segments);
      glVertex2f(cx+5, cy-5);//output vertex


    glEnd();

    glBegin(GL_TRIANGLE_FAN);
        glVertex2f(cx-5, cy-5);//output vertex
kk(cx,cy,r,num_segments);
      glVertex2f(cx-5, cy+5);//output vertex


    glEnd();

    glBegin(GL_TRIANGLE_FAN);
        glVertex2f(cx-5, cy+5);//output vertex
kk(cx,cy,r,num_segments);
      glVertex2f(cx+5, cy+5);//output vertex


    glEnd();

    glBegin(GL_TRIANGLE_FAN);
        glVertex2f(cx+5, cy-5);//output vertex
kk(cx,cy,r,num_segments);
      glVertex2f(cx+5, cy+5);//output vertex


    glEnd();




}
void display()
{
    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

	//glClear(GL_COLOR_BUFFER_BIT);

int x=800,y=500;

    //Circle(x, y, 100, 100,0);
 glColor3f(0.0,1.0,1.0);
    board(x,y);
    glColor3fv(colors[1]);
    cover(x,y);
    glColor3f(0.8,0.8,0.8);
    innletcover(x,y);
    innlet(x,y);
    outletcover(x,y);
    outlet(x,y);
   // glColor3f(1.0,1.0,1.0);
    glColor3fv(colors[4]);
    Circle(x, y, 110, 100,0);


    q1.x=x-44;
    q1.y=y+100;
    q2.x=x-44;
    q2.y=y+225;
    q3.x=x+44;
    q3.y=y+225;
    q4.x=x+44;
    q4.y=y+100;

    rect(q1,q2,q3,q4); //inner cylinder
     fuel(x,y);
    glColor3f(0.0,0.0,1.0);

    //reectangle();
    //point(x,y+325);

 glColor3fv(colors[0]);
	//Crankrod(x, y, 65, 100);
    Circle(x, y, 50, 100,0);
  glColor3fv(colors[2]);
    Crank(x, y, 35, 100);
    glColor3f(0.0,0.0,1.0);
    valve(x,y);
    plug(x,y+253);
    if(s==0 &amp;amp;&amp;amp; cc&amp;gt;=22 &amp;amp;&amp;amp; cc&amp;lt;=25  )
        spark(x+1,y-2);
    if(s==1 &amp;amp;&amp;amp; cc&amp;lt;=28 &amp;amp;&amp;amp; cc&amp;gt;=25  )
        spark(x+1,y-2);
// title
    glColor3f(0.0,0.0,1.0);
    text(x-115,y+415,&quot;IC Petrol Engine&quot;,2);
 y+=150;
    smallboard(x+700,y);
    glColor3f(0.3,0.3,0.3);
    Circle(x+700, y, 145, 100,0);
        glColor3f(0.9,0.95,0.95);
        indicator(x+700, y, 140, 100,0); //exhaust
    glColor3f(0.0,0.5,1.0);
     indicator(x+700, y, 140, 100,25); //suction
    glColor3f(0.8,0.5,0.5);
        indicator(x+700, y, 140, 100,50);//compression
    glColor3f(0.9,1.0,0.5);
        indicator(x+700, y, 140, 100,75);// working
    glColor3f(0.3,0.3,0.3);
    Circle(x+700, y, 15, 100,0);
    //glColor3f(0.0,0.0,0.0);

    tip(x+700, y, 100, 100);

    glColor3f(0.0,0.0,1.0);
    text(x+600,y+170,&quot;Stroke Indicator&quot;,2);

    //lables
    glColor3f(0.0,0.5,1.0);
     point(x+520,y-240);

    glColor3f(0.5,0.9,1.0);
    text(x+540,y-245,&quot;Suction Stroke&quot;,0);

    glColor3f(0.8,0.5,0.5);
     point(x+520,y-260);

    glColor3f(0.5,0.9,1.0);
    text(x+540,y-265,&quot;Compression Stroke&quot;,0);

    glColor3f(0.9,1.0,0.5);
     point(x+520,y-280);

    glColor3f(0.5,0.9,1.0);
    text(x+540,y-285,&quot;Working Stroke&quot;,0);

    glColor3f(0.9,0.95,0.95);
     point(x+520,y-300);

    glColor3f(0.5,0.9,1.0);
    text(x+540,y-305,&quot;Exhaust Stroke&quot;,0);
    text(x-510,y-450,&quot;Press &#39;space&#39; to start/stop    Press &#39;+&#39; to speedup engine    Press &#39;-&#39; to slowdown engine&quot;,0);


    glFlush();

    //quad();



}
void start(){
    if(status==1)
{   cb++;
    cc++;
    pointer+=0.5;
    }
    if(cc==100)
    {
        cc=0;

    }
    if(pointer==100)
    {
        pointer=0;

    }
    if(cb==100) cb=0;
    display();

      //Game title

    if(cc==25){
        if(s==0)
            s=1;
        else
            s=0;
    }

    Sleep(speed);

}

void keypress(unsigned char key, int x,int y){
       if (key==&#39;+&#39;) {speed--;
                                if(speed&amp;lt;=0) speed=0;}
       if (key==&#39;-&#39;) {speed++;if(speed&amp;gt;=500) speed=500;}
       if(key==&#39; &#39;) {if(status==0) status=1; else status=0; }}
void myReshape(int w,int h)
{

	glViewport(0,0,w,h);
	glMatrixMode(GL_PROJECTION);
    glOrtho(-2.0,2.0,-2.0*(GLfloat)h/(GLfloat)w,2.0*(GLfloat)h/(GLfloat)w,-10.0,10.0);
	glMatrixMode(GL_PROJECTION);
}


int main(int argc,char **argv)
{
	glutInit(&amp;amp;argc,argv);
	glutInitDisplayMode(GLUT_SINGLE|GLUT_RGB);
	glutInitWindowSize (600, 600);
	glutCreateWindow(&quot;Introduction to Open GL&quot;);
	glutReshapeFunc(myReshape);
	glutKeyboardFunc(keypress);
	glutDisplayFunc(display);
	glutIdleFunc(start);
	init();
    glutMainLoop();
&lt;div style=&quot;text-align: justify;&quot;&gt;}&lt;/div&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;p data-end=&quot;417&quot; data-start=&quot;347&quot; style=&quot;text-align: justify;&quot;&gt;Here are a few common components that could be part of such the OpenGL Computer Graphics Project:&lt;/p&gt;&lt;ol data-end=&quot;1114&quot; data-start=&quot;419&quot;&gt;&lt;li data-end=&quot;562&quot; data-start=&quot;419&quot;&gt;&lt;p data-end=&quot;562&quot; data-start=&quot;422&quot; style=&quot;text-align: justify;&quot;&gt;&lt;strong data-end=&quot;442&quot; data-start=&quot;422&quot;&gt;3D Visualization&lt;/strong&gt;: Creating a detailed 3D model of a petrol engine, showing key parts like the pistons, crankshaft, valves, and camshaft.&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;708&quot; data-start=&quot;564&quot;&gt;&lt;p data-end=&quot;708&quot; data-start=&quot;567&quot; style=&quot;text-align: justify;&quot;&gt;&lt;strong data-end=&quot;596&quot; data-start=&quot;567&quot;&gt;Animation of Engine Cycle&lt;/strong&gt;: Simulating and animating the stages of the engine cycle, like intake, compression, power, and exhaust strokes.&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;909&quot; data-start=&quot;710&quot;&gt;&lt;p data-end=&quot;909&quot; data-start=&quot;713&quot; style=&quot;text-align: justify;&quot;&gt;&lt;strong data-end=&quot;762&quot; data-start=&quot;713&quot;&gt;Computational Fluid Dynamics (CFD) Simulation&lt;/strong&gt;: Visualizing airflow and combustion processes inside the engine, potentially showing how fuel and air mix, ignite, and exhaust gases are expelled.&lt;/p&gt;&lt;/li&gt;&lt;li data-end=&quot;1114&quot; data-start=&quot;911&quot;&gt;&lt;p data-end=&quot;1114&quot; data-start=&quot;914&quot; style=&quot;text-align: justify;&quot;&gt;&lt;strong data-end=&quot;940&quot; data-start=&quot;914&quot;&gt;Performance Simulation&lt;/strong&gt;: Using computer graphics to illustrate how engine performance (such as horsepower, torque, fuel consumption) changes with different variables (e.g., RPM, throttle position).&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.openglprojects.in/feeds/5586055010079604660/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.openglprojects.in/2025/02/internal-combustion-engine-ic-engine.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2020194800836807725/posts/default/5586055010079604660'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2020194800836807725/posts/default/5586055010079604660'/><link rel='alternate' type='text/html' href='http://www.openglprojects.in/2025/02/internal-combustion-engine-ic-engine.html' title='Internal combustion engine - IC engine - OpenGL Computer Graphics Project'/><author><name>Rajeev</name><uri>http://www.blogger.com/profile/03147189487850777395</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2020194800836807725.post-5570385793269253585</id><published>2025-01-29T16:37:00.004+05:30</published><updated>2025-01-29T16:37:51.878+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Astronomer"/><category scheme="http://www.blogger.com/atom/ns#" term="Solar system"/><category scheme="http://www.blogger.com/atom/ns#" term="Sun"/><title type='text'>OpenGL Solar System Simulator </title><content type='html'>&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;In OpenGL projects blog we are going to demonstrate&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #1f2328;&quot;&gt;solar system simulator with Verlet. Here we are using OpenGL for displaying coded and compiled in Visual Studio. We have used&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #1f2328;&quot;&gt;glm and glew in this project with&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #1f2328;&quot;&gt;MS XML Parser.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;a href=&quot;https://img.youtube.com/vi/nO0xolnW4Jg/0.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;360&quot; data-original-width=&quot;480&quot; height=&quot;360&quot; src=&quot;https://img.youtube.com/vi/nO0xolnW4Jg/0.jpg&quot; width=&quot;480&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #1f2328;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span face=&quot;-apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Noto Sans&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;&quot; style=&quot;background-color: white; color: #1f2328; font-size: 16px;&quot;&gt;We are going to see the important concepts used in this project -&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Object oriented programming use the Concept of Class hence here we are going to demonstrate the same. First we are using classes which are getting generated in this application and get done by compiler.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;#SolarSystem&lt;/p&gt;&lt;p&gt;Others programs -&lt;/p&gt;&lt;p&gt;1.&amp;nbsp;&lt;span face=&quot;&amp;quot;Trebuchet MS&amp;quot;, Trebuchet, Verdana, sans-serif&quot; style=&quot;background-color: white; color: #666666; font-size: 24.48px;&quot;&gt;&lt;a href=&quot;https://www.openglprojects.in/2015/04/mini-solar-system-computer-graphics-programs.html&quot; target=&quot;_blank&quot;&gt;Mini Solar System Computer Graphics Programs&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;2. &lt;a href=&quot;https://www.openglprojects.in/2011/05/solar-system.html?&quot; target=&quot;_blank&quot;&gt;sol&lt;span face=&quot;&amp;quot;Trebuchet MS&amp;quot;, Trebuchet, Verdana, sans-serif&quot; style=&quot;background-color: white; color: #666666; font-size: 24.48px;&quot;&gt;ar System Mini-Project in OpenGL&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;3.&lt;a href=&quot;https://www.openglprojects.in/2015/05/3d-solar-system-opengl-graphics-program.html?m=1&quot; style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;, Trebuchet, Verdana, sans-serif; font-size: 24.48px;&quot; target=&quot;_blank&quot;&gt;3D Solar System OpenGL graphics progra&lt;/a&gt;m&lt;/p&gt;&lt;div _ngcontent-ng-c459698851=&quot;&quot; class=&quot;main-content ng-trigger ng-trigger-routeChangeAnimation&quot;&gt;&lt;div _ngcontent-ng-c459698851=&quot;&quot; class=&quot;content-container&quot;&gt;&lt;chat-window _nghost-ng-c2879136452=&quot;&quot; class=&quot;ng-tns-c2879136452-1 mobile-device ng-star-inserted&quot;&gt;&lt;div _ngcontent-ng-c2879136452=&quot;&quot; class=&quot;chat-container ng-tns-c2879136452-1 ng-trigger ng-trigger-chatHistoryImmersiveTransitions&quot; jslog=&quot;173898;track:impression&quot;&gt;&lt;chat-window-content _ngcontent-ng-c2879136452=&quot;&quot; _nghost-ng-c2479520514=&quot;&quot; class=&quot;ng-tns-c2879136452-1 ui-improvements-phase-1&quot;&gt;&lt;div _ngcontent-ng-c2479520514=&quot;&quot; class=&quot;chat-history-scroll-container&quot; id=&quot;chat-history&quot;&gt;&lt;infinite-scroller _ngcontent-ng-c2479520514=&quot;&quot; _nghost-ng-c3325606809=&quot;&quot; class=&quot;chat-history response-optimization&quot; data-test-id=&quot;chat-history-container&quot;&gt;&lt;div _ngcontent-ng-c2479520514=&quot;&quot; class=&quot;conversation-container message-actions-hover-boundary response-optimization tts-removed ng-star-inserted&quot; id=&quot;bc4011a80e60cc2f&quot; style=&quot;min-height: 618px;&quot;&gt;&lt;model-response _ngcontent-ng-c2479520514=&quot;&quot; _nghost-ng-c1790302082=&quot;&quot; class=&quot;ng-star-inserted&quot;&gt;&lt;div _ngcontent-ng-c1790302082=&quot;&quot;&gt;&lt;response-container _ngcontent-ng-c1790302082=&quot;&quot; _nghost-ng-c2299864928=&quot;&quot; class=&quot;ng-tns-c2299864928-8 reduced-bottom-padding ng-star-inserted&quot; jslog=&quot;188576;track:impression;BardVeMetadataKey:[[&amp;quot;r_bc4011a80e60cc2f&amp;quot;,&amp;quot;c_891aa419e8f19618&amp;quot;,null,null,null,null,null,null,1,null,null,null,0]];mutable:true&quot;&gt;&lt;div _ngcontent-ng-c2299864928=&quot;&quot; class=&quot;response-container ng-tns-c2299864928-8 response-optimization response-container-with-gpi is-mobile tts-removed ng-star-inserted response-container-has-multiple-responses&quot; jslog=&quot;173900;track:impression&quot;&gt;&lt;div _ngcontent-ng-c2299864928=&quot;&quot; class=&quot;response-container-header ng-tns-c2299864928-8 ng-star-inserted&quot;&gt;&lt;div _ngcontent-ng-c2299864928=&quot;&quot; class=&quot;response-container-header-controls ng-tns-c2299864928-8&quot;&gt;&lt;tts-control _ngcontent-ng-c2299864928=&quot;&quot; _nghost-ng-c2878255793=&quot;&quot; class=&quot;ng-tns-c2299864928-8 ng-trigger ng-trigger-singleResponseEnter ng-animate-disabled ng-star-inserted&quot;&gt;&lt;div _ngcontent-ng-c2878255793=&quot;&quot; class=&quot;response-tts-container hidden-tts ng-star-inserted&quot; data-test-draft-id=&quot;rc_926d48ba83561117&quot; style=&quot;height: 1294px;&quot;&gt;&lt;div _ngcontent-ng-c2878255793=&quot;&quot; class=&quot;mat-mdc-tooltip-trigger tts-button-container mat-mdc-tooltip-disabled&quot; data-test-id=&quot;disabled-tooltip&quot;&gt;&lt;div _ngcontent-ng-c2878255793=&quot;&quot; class=&quot;mat-mdc-tooltip-trigger tts-button--disabled&quot; data-test-id=&quot;disabled-tooltip&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div _ngcontent-ng-c2878255793=&quot;&quot; class=&quot;mat-mdc-tooltip-trigger tts-button-container mat-mdc-tooltip-disabled&quot; data-test-id=&quot;disabled-tooltip&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div _ngcontent-ng-c2878255793=&quot;&quot; class=&quot;mat-mdc-tooltip-trigger tts-button-container mat-mdc-tooltip-disabled&quot; data-test-id=&quot;disabled-tooltip&quot; style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;font-size: 13.3333px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div _ngcontent-ng-c2878255793=&quot;&quot; class=&quot;mat-mdc-tooltip-trigger tts-button-container mat-mdc-tooltip-disabled&quot; data-test-id=&quot;disabled-tooltip&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;font-size: 13.3333px;&quot;&gt;For this Opengl programming project we need to have the supporting liabrary ie&amp;nbsp; glm and glew. We can download the mentioned liablrary and have to installed them LIBs folder of PC. According to the directory/destination of the glu/gl/ other supporting filles we need to adjust our project settings accordingly.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div _ngcontent-ng-c2878255793=&quot;&quot; class=&quot;mat-mdc-tooltip-trigger tts-button-container mat-mdc-tooltip-disabled&quot; data-test-id=&quot;disabled-tooltip&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;font-size: 13.3333px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div _ngcontent-ng-c2878255793=&quot;&quot; class=&quot;mat-mdc-tooltip-trigger tts-button-container mat-mdc-tooltip-disabled&quot; data-test-id=&quot;disabled-tooltip&quot; style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;font-size: 13.3333px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div _ngcontent-ng-c2878255793=&quot;&quot; class=&quot;mat-mdc-tooltip-trigger tts-button-container mat-mdc-tooltip-disabled&quot; data-test-id=&quot;disabled-tooltip&quot; style=&quot;text-align: center;&quot;&gt;Download the above libraries from the link provided below -&amp;nbsp;&lt;/div&gt;&lt;div _ngcontent-ng-c2878255793=&quot;&quot; class=&quot;mat-mdc-tooltip-trigger tts-button-container mat-mdc-tooltip-disabled&quot; data-test-id=&quot;disabled-tooltip&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div _ngcontent-ng-c2878255793=&quot;&quot; class=&quot;mat-mdc-tooltip-trigger tts-button-container mat-mdc-tooltip-disabled&quot; data-test-id=&quot;disabled-tooltip&quot; style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;font-size: 13.3333px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div _ngcontent-ng-c2878255793=&quot;&quot; class=&quot;mat-mdc-tooltip-trigger tts-button-container mat-mdc-tooltip-disabled&quot; data-test-id=&quot;disabled-tooltip&quot; style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;font-size: 13.3333px;&quot;&gt;&lt;div _ngcontent-ng-c2878255793=&quot;&quot; class=&quot;mat-mdc-tooltip-trigger tts-button-container mat-mdc-tooltip-disabled&quot; data-test-id=&quot;disabled-tooltip&quot; style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;font-size: 13.3333px;&quot;&gt;glm : &lt;a href=&quot;http://glm.g-truc.net/0.9.7/index.html&quot;&gt;http://glm.g-truc.net/0.9.7/index.html&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div _ngcontent-ng-c2878255793=&quot;&quot; class=&quot;mat-mdc-tooltip-trigger tts-button-container mat-mdc-tooltip-disabled&quot; data-test-id=&quot;disabled-tooltip&quot; style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div _ngcontent-ng-c2878255793=&quot;&quot; class=&quot;mat-mdc-tooltip-trigger tts-button-container mat-mdc-tooltip-disabled&quot; data-test-id=&quot;disabled-tooltip&quot; style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;font-size: 13.3333px;&quot;&gt;glew: &lt;a href=&quot;http://glew.sourceforge.net/&quot;&gt;http://glew.sourceforge.net/&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;font-size: 13.3333px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div _ngcontent-ng-c2878255793=&quot;&quot; class=&quot;mat-mdc-tooltip-trigger tts-button-container mat-mdc-tooltip-disabled&quot; data-test-id=&quot;disabled-tooltip&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div _ngcontent-ng-c2878255793=&quot;&quot; class=&quot;mat-mdc-tooltip-trigger tts-button-container mat-mdc-tooltip-disabled&quot; data-test-id=&quot;disabled-tooltip&quot; style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;font-size: 13.3333px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div _ngcontent-ng-c2878255793=&quot;&quot; class=&quot;mat-mdc-tooltip-trigger tts-button-container mat-mdc-tooltip-disabled&quot; data-test-id=&quot;disabled-tooltip&quot; style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;font-size: 13.3333px;&quot;&gt;mfc: This will be already included in the Visual Studio package, if not there kindly check Visual Studio installation guide.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div _ngcontent-ng-c2878255793=&quot;&quot; class=&quot;mat-mdc-tooltip-trigger tts-button-container mat-mdc-tooltip-disabled&quot; data-test-id=&quot;disabled-tooltip&quot; style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;font-size: 13.3333px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div _ngcontent-ng-c2878255793=&quot;&quot; class=&quot;mat-mdc-tooltip-trigger tts-button-container mat-mdc-tooltip-disabled&quot; data-test-id=&quot;disabled-tooltip&quot; style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;span style=&quot;font-size: 13.3333px;&quot;&gt;Download Source code&amp;nbsp; -&amp;nbsp;&amp;nbsp;&lt;a href=&quot;https://github.com/aromanro/SolarSystem&quot;&gt;https://github.com/aromanro/SolarSystem&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div _ngcontent-ng-c2878255793=&quot;&quot; class=&quot;mat-mdc-tooltip-trigger tts-button-container mat-mdc-tooltip-disabled&quot; data-test-id=&quot;disabled-tooltip&quot; style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div _ngcontent-ng-c2878255793=&quot;&quot; class=&quot;mat-mdc-tooltip-trigger tts-button-container mat-mdc-tooltip-disabled&quot; data-test-id=&quot;disabled-tooltip&quot; style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;Video&amp;nbsp; -&amp;nbsp;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;iframe allowfullscreen=&quot;&quot; class=&quot;BLOG_video_class&quot; height=&quot;327&quot; src=&quot;https://www.youtube.com/embed/nO0xolnW4Jg&quot; width=&quot;531&quot; youtube-src-id=&quot;nO0xolnW4Jg&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/tts-control&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/response-container&gt;&lt;/div&gt;&lt;/model-response&gt;&lt;/div&gt;&lt;/infinite-scroller&gt;&lt;/div&gt;&lt;/chat-window-content&gt;&lt;/div&gt;&lt;/chat-window&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.openglprojects.in/feeds/5570385793269253585/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.openglprojects.in/2025/01/Opengl-solar-system-simulator.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2020194800836807725/posts/default/5570385793269253585'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2020194800836807725/posts/default/5570385793269253585'/><link rel='alternate' type='text/html' href='http://www.openglprojects.in/2025/01/Opengl-solar-system-simulator.html' title='OpenGL Solar System Simulator '/><author><name>Rajeev</name><uri>http://www.blogger.com/profile/03147189487850777395</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/nO0xolnW4Jg/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2020194800836807725.post-8879630995709130382</id><published>2024-01-16T01:33:00.004+05:30</published><updated>2024-01-16T01:46:09.677+05:30</updated><title type='text'>New Village Scenery Computer Graphics Project in OpenGL Source Code</title><content type='html'>&lt;p style=&quot;text-align: justify;&quot;&gt;Many of the University including VTU have &#39;The Department of Computer Science and Engineering&#39; which have Lab projects for students to show thier learning skill which got during thier course study.&amp;nbsp;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;&lt;a href=&quot;https://www.msec.ac.in/files/vlab/CG%20Lab%20Manual.pdf&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;VTU Computer Graphics and Visualization Laboratory [15CSL68]&lt;/a&gt;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;Above mentioned link have the lab programs prescribed by VTU under it course id mentioned have computer graphics project in OpenGL. Under this program students use thier learning ability to show of thier excellence, what they learnt in the course. Many students keeping in focus special efforts to impart&amp;nbsp; thier knowledge to give best projects.&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;We in this article we are going to show one of the best project in&amp;nbsp;Computer Graphics Project in OpenGL with free source code. The name of the Project is&amp;nbsp;New Village Scenery.&amp;nbsp;&lt;/p&gt;&lt;div&gt;&lt;h3 class=&quot;wp-block-heading&quot; style=&quot;background-color: white; border: 0px; box-sizing: inherit; clear: both; color: #3a3a3a; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Roboto, Oxygen-Sans, Ubuntu, Cantarell, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 1.5625rem; font-weight: inherit; line-height: 1.3em; margin: 30px 0px 20px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Project Description:&lt;/h3&gt;&lt;/div&gt;&lt;div&gt;In this&amp;nbsp;Computer Graphics Project in OpenGL with free Source Code are going to draw sun, clouds, sky, river, boats, fence, trees, huts. In this projects we demonstrate the moving clouds in the sky and moving boats in the river,&amp;nbsp; Above is achived by using circle, lines traingle and spheres.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifdnhF3j3Okak7ka6D7a98DYAfurujMIERqvkc4BD6b4MEnO4I1ry3D3DZAacaKFiDM9ACES1Ucl-2UP7cH5I8HtxDWExTOuA_tBy_h5wEwFHDsohupfKfptcUJ5U-auQg6oxDXX9XChOud5TvtgJf-ylAL94_PA-ahqlkIQSzdiiYOa8iszV-4S6if8u2/s1016/New%20Village%20Scenery%20Computer%20Graphics%20Project%20in%20OpenGL%20Source%20Code.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;718&quot; data-original-width=&quot;1016&quot; height=&quot;226&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifdnhF3j3Okak7ka6D7a98DYAfurujMIERqvkc4BD6b4MEnO4I1ry3D3DZAacaKFiDM9ACES1Ucl-2UP7cH5I8HtxDWExTOuA_tBy_h5wEwFHDsohupfKfptcUJ5U-auQg6oxDXX9XChOud5TvtgJf-ylAL94_PA-ahqlkIQSzdiiYOa8iszV-4S6if8u2/s320/New%20Village%20Scenery%20Computer%20Graphics%20Project%20in%20OpenGL%20Source%20Code.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Draw Sky&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&amp;nbsp;///sky///&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; glBegin(GL_POLYGON);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; glColor3ub(112,160,228);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; glVertex2f(38.0,3.0);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; glVertex2f(38.0,14.0);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; glVertex2f(-12.0,14.0);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; glVertex2f(-12.0,3.0);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; glEnd();&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Draw the Sun&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; /// Sun&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; glPushMatrix();&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; glColor3d(255,0,0);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; glTranslatef(1.0, 7.0, 0);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; glutSolidSphere(1.0, 750, 300);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; glPopMatrix();&lt;/div&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/h3&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;See Also&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;1.&amp;nbsp;&lt;a href=&quot;https://www.openglprojects.in/2022/07/simple-city-scenery-opengl-computer.html#gsc.tab=0&quot; target=&quot;_blank&quot;&gt;Simple City Scenery Opengl Computer Graphics Project&lt;/a&gt;&lt;/div&gt;&lt;p&gt;2. &lt;a href=&quot;https://www.openglprojects.in/2021/05/transformers-opengl-computer-graphics-projects.html#gsc.tab=0&quot; target=&quot;_blank&quot;&gt;Transformers - Free OpenGL Source code&lt;/a&gt;&lt;/p&gt;&lt;p&gt;3. &lt;a href=&quot;https://www.openglprojects.in/2016/03/day-night-color.html#gsc.tab=0&quot; target=&quot;_blank&quot;&gt;Day and Night OpenGL Computer graphics Project&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Implementation&amp;nbsp;&lt;/h2&gt;&lt;div&gt;We use GL_QUADS with tranlation in opengl to draw most of the scenery in this new village scenery opengl projects program. As name suggested quads means fourt vertices. We use the glvertex in opengl to join the vertices and make the objects. Below is how vertices are used in opengl.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://www.dgp.toronto.edu/~ah/csc418/fall_2001/tut/Image22.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;192&quot; data-original-width=&quot;348&quot; height=&quot;192&quot; src=&quot;https://www.dgp.toronto.edu/~ah/csc418/fall_2001/tut/Image22.gif&quot; width=&quot;348&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Draw Components&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;In this project we are going to use the different functions to implement the different object like sun in the program.&amp;nbsp;void DrawAllComponents() functions is used to draw all the mentioned objects required in this program. After we draw all the objects and then we call them in the display function -&amp;nbsp;void display(void)&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;After above functions are implemented we call the keyboard and mouse functions to implement the user interactions and call all of them in main functions.&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;User Interaction&lt;/h3&gt;&lt;p&gt;In this opengl project below is user interactions&lt;/p&gt;&lt;p&gt;&lt;b&gt;Mouse interactions&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Left Mouse button - Increase the Movement of clouds and boats&lt;/p&gt;&lt;p&gt;Right Mouse button - Decrease the Movement of clouds and boats&lt;/p&gt;&lt;p&gt;&lt;b&gt;Key Interactions&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;s - &lt;/b&gt;to stop the boat&lt;/p&gt;&lt;p&gt;r -&amp;nbsp; to run the boat again&lt;/p&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Source code and Reports Computer Graphics Project in OpenGL&amp;nbsp;&lt;/h2&gt;&lt;p&gt;Here you can download computer graphics projects with source code and reports.&lt;/p&gt;&lt;p&gt;Below is soure code -&lt;/p&gt;&lt;p&gt;#include&amp;lt;windows.h&amp;gt;&lt;/p&gt;&lt;p&gt;#include &amp;lt;iostream&amp;gt;&lt;/p&gt;&lt;p&gt;#include&amp;lt;GL/gl.h&amp;gt;&lt;/p&gt;&lt;p&gt;#include &amp;lt;GL/glut.h&amp;gt;&lt;/p&gt;&lt;p&gt;#include &amp;lt;math.h&amp;gt;&lt;/p&gt;&lt;p&gt;#include&amp;lt;windows.h&amp;gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;float moveC = 0.0f;&lt;/p&gt;&lt;p&gt;float moveB1 = 0.0f;&lt;/p&gt;&lt;p&gt;float moveB2 = 0.0f;&lt;/p&gt;&lt;p&gt;float speed = 0.02f;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;void DrawAllComponents()&lt;/p&gt;&lt;p&gt;{&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glClearColor(1.0f,1.0f,1.0f,1.0f);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glClear(GL_COLOR_BUFFER_BIT);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glColor3d(1,0,0);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glLoadIdentity();&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; gluOrtho2D(-12,38,-19,14);//range&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glMatrixMode(GL_MODELVIEW);&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; ///sky///&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glBegin(GL_POLYGON);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glColor3ub(112,160,228);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(38.0,3.0);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(38.0,14.0);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(-12.0,14.0);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(-12.0,3.0);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glEnd();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; /// Sun&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glPushMatrix();&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glColor3d(255,0,0);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glTranslatef(1.0, 7.0, 0);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glutSolidSphere(1.0, 750, 300);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glPopMatrix();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; ///Cloud-01&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glPushMatrix();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glTranslatef(moveC,0.0f,0.0f);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glPushMatrix();&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glColor3d(255,255,255);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glTranslatef(1.0, 6.0, 0);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glutSolidSphere(0.7, 250, 250);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glPopMatrix();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glPushMatrix();&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glColor3d(255,255,255);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glTranslatef(1.0, 7.0, 0);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glutSolidSphere(0.7, 250, 250);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glPopMatrix();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glPushMatrix();&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glColor3d(255,255,255);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glTranslatef(2.0, 7.0, 0);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glutSolidSphere(0.7, 250, 250);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glPopMatrix();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glPushMatrix();&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glColor3d(255,255,255);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glTranslatef(2.0, 6.0, 0);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glutSolidSphere(0.7, 250, 250);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glPopMatrix();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glPushMatrix();&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glColor3d(255,255,255);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glTranslatef(0.0, 6.5, 0);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glutSolidSphere(0.7, 250, 250);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glPopMatrix();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glPushMatrix();&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glColor3d(255,255,255);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glTranslatef(3.0, 6.5, 0);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glutSolidSphere(0.7, 250, 250);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glPopMatrix();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glPopMatrix();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; ///cloud-02&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glPushMatrix();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glTranslatef(moveC,0.0f,0.0f);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glPushMatrix();&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glColor3d(255,255,255);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glTranslatef(15.0, 9.0, 0);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glutSolidSphere(0.8, 250, 250);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glPopMatrix();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glPushMatrix();&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glColor3d(255,255,255);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glTranslatef(15.0, 8.0, 0);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glutSolidSphere(0.8, 250, 250);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glPopMatrix();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glPushMatrix();&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glColor3d(255,255,255);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glTranslatef(16.0, 8.0, 0);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glutSolidSphere(0.8, 250, 250);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glPopMatrix();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glPushMatrix();&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glColor3d(255,255,255);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glTranslatef(16.0, 9.0, 0);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glutSolidSphere(0.8, 250, 250);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glPopMatrix();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glPushMatrix();&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glColor3d(255,255,255);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glTranslatef(14.0, 8.5, 0);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glutSolidSphere(0.8, 250, 250);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glPopMatrix();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glPushMatrix();&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glColor3d(255,255,255);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glTranslatef(17.0, 8.5, 0);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glutSolidSphere(0.8, 250, 250);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glPopMatrix();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glPopMatrix();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; ///cloud-03&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glPushMatrix();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glTranslatef(moveC,0.0f,0.0f);&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glPushMatrix();&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glColor3d(255,255,255);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glTranslatef(22.0, 8.0, 0);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glutSolidSphere(0.75, 250, 250);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glPopMatrix();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glPushMatrix();&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glColor3d(255,255,255);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glTranslatef(22.0, 7.0, 0);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glutSolidSphere(0.75, 250, 250);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glPopMatrix();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glPushMatrix();&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glColor3d(255,255,255);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glTranslatef(23.0, 8.0, 0);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glutSolidSphere(0.75, 250, 250);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glPopMatrix();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glPushMatrix();&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glColor3d(255,255,255);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glTranslatef(23.0, 7.0, 0);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glutSolidSphere(0.75, 250, 250);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glPopMatrix();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glPushMatrix();&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glColor3d(255,255,255);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glTranslatef(24.0, 7.5, 0);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glutSolidSphere(0.75, 250, 250);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glPopMatrix();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glPushMatrix();&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glColor3d(255,255,255);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glTranslatef(21.0, 7.5, 0);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glutSolidSphere(0.75, 250, 250);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glPopMatrix();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glPopMatrix();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; ///See portion&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glPushMatrix();&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glBegin(GL_POLYGON);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glColor3ub(65,105,225);&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(40.0,-19.0);&amp;nbsp; /// right-down&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(38.0,-11.0); /// right-top&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(-12.0,-11.0); /// left-top&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(-12.0,-19.0);&amp;nbsp; /// left-down&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glEnd();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; ///Ground portion&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glBegin(GL_POLYGON);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glColor3ub(25,128,0);&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(90.0f, -12.5f); /// angle&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(38.0f,-12.0f);&amp;nbsp; /// right-down&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(38.0f,3.0f); /// right-top&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(-12.0f,3.0f); /// left-top&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(-12.0f,-11.0f);&amp;nbsp; /// left-down&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glEnd();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; /// House Drawing&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; ///1st House&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; /// FEG&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glColor3ub(162, 116, 36);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glBegin(GL_TRIANGLES);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(-8, -2);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(-6, 0);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(-4, -2);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glEnd();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; /// FGIH&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glColor3ub(214, 42, 50);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glBegin(GL_QUADS);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(-8.023, -5.184);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(-8, -2);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(-4, -2);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(-3.999, -7.219);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glEnd();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; ///ROPQ&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glColor3ub(19, 105, 51);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glBegin(GL_QUADS);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(-6.73, -5.67);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(-6.76, -3.58);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(-5.19, -3.58);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(-5.19, -6.62);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glEnd();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; ///EGKJ&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glColor3ub(124, 85, 17);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glBegin(GL_QUADS);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(-6, 0);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(4, 0);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(6, -2);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(-4, -2);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glEnd();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; ///GLMI&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glColor3ub(156, 9, 16);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glBegin(GL_QUADS);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(-4, -2);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(5.22, -2);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(5.26, -5.11);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(-3.99, -7.22);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glEnd();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; ///VSTU&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glColor3ub(216, 215, 111);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glBegin(GL_QUADS);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(-0.39, -6.40);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(-0.42, -3.62);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(1.95, -3.58);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(1.97, -5.86);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glEnd();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; ///SZA1V&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glColor3ub(19, 105, 51);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glBegin(GL_QUADS);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(-0.42, -3.62);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(0.38, -4.38);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(0.38, -5.53);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(-0.39, -6.40);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glEnd();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; ///TB1C1U&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glColor3ub(19, 105, 51);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glBegin(GL_QUADS);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(1.95, -3.58);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(1.21, -4.38);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(1.21, -5.46);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(1.97, -5.86);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glEnd();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; ///2nd House&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; ///S1R1W1&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glColor3ub(0,0,0);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glBegin(GL_TRIANGLES);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(8.09,-5.01);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(10.96,-2.02);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(14.10, -5.01);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glEnd();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; ///U1V1Z1W1&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glColor3ub(145, 0, 12);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glBegin(GL_QUADS);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(9.15, -5.01);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(9.14, -9.02);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(12.85, -9.04);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(12.84, -5.01);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glEnd();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; ///A2B2C2D2&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glColor3ub(245, 10, 49);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glBegin(GL_QUADS);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(10.36, -6.79);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(10.35, -8.91);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(11.59, -8.99);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(11.58, -6.79);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glEnd();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; ///1st Tree&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glColor3ub(22, 208, 70);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glBegin(GL_QUADS);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(14.88, -6.00);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(20, 0);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(24.98, -6.16);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(21.05, -4.96);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(19.09, -4.95);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glEnd();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; ///NWJ1H1&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glColor3ub(191, 158, 24);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glBegin(GL_QUADS);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(19.02, -6.06);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(20.96, -6.09);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(21, -10.08);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(19.01, -10.08);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glEnd();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; /// 2nd Tree&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; ///L1K1M1&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glColor3ub(17, 218, 45);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glBegin(GL_TRIANGLES);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(27.02, -6.16);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(30, 0);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(32.93, -6);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glEnd();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; ///E1F1P1Q1&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glColor3ub(191, 158, 24);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glBegin(GL_QUADS);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(29.09, -6.10);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(31.03, -6.05);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(31.05, -10.03);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(29.06, -9.97);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glEnd();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; ///Rail Line&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; ///N1B&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glColor3ub(155, 29, 29);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glBegin(GL_QUADS);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(-12, 2);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(38, 3);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(37.98, 2.69);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(-11.98, 1.71);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glEnd();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glColor3ub(155, 29, 29);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glBegin(GL_QUADS);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(-12.07, 0.72);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(-12.07, 0.48);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(38.02, 1.52);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(38, 1.70);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glEnd();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glColor3ub(0, 0, 0);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glBegin(GL_QUADS);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(-8, 2.08);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(-7.64, 2.08);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(-7.63, 0.63);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(-8, 0.62);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glEnd();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glColor3ub(0, 0, 0);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glBegin(GL_QUADS);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(0.97, 2.31);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(1.28, 2.27);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(1.34, 0.76);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(0.97, 0.75);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glEnd();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glColor3ub(0, 0, 0);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glBegin(GL_QUADS);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(11.98, 2.48);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(12.48, 2.49);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(12.5, 1);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(11.98, 0.98);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glEnd();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glColor3ub(0, 0, 0);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glBegin(GL_QUADS);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(25.45, 2.75);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(26.09, 2.76);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(26.09, 1.27);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(25.45, 1.26);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glEnd();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glColor3ub(0, 0, 0);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glBegin(GL_QUADS);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(33.99, 2.92);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(34.48, 2.93);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(34.58, 1.45);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(34.03, 1.44);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glEnd();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glColor3ub(0, 0, 0);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glBegin(GL_QUADS);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(18.39, 2.69);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(19.16, 2.62);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(19.18, 1.13);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(18.42, 1.11);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glEnd();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; ///boat-1 speed left to right&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glPushMatrix();&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glTranslatef(moveB1, 0.0f, 0.0f);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glBegin(GL_QUADS);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glColor3ub(139,69,19);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(1.0f, -14.0f);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(1.50f, -13.0f);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(-2.0f, -13.0f);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(-3.0f, -14.0f);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glEnd();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glBegin(GL_QUADS);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glColor3ub(0,0,0);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(2.0f, -14.5f);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(2.0f, -14.0f);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(-3.0f, -14.0f);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(-3.0f, -14.5f);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glEnd();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glBegin(GL_TRIANGLES);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glColor3ub(0,0,0);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(-3.0f, -14.5f);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(-3.0f, -14.0f);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(-4.5f, -13.7f);&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glEnd();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glBegin(GL_TRIANGLES);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glColor3ub(0,0,0);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(2.0f, -14.5f);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(3.5f, -13.7f);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(2.0f, -14.0f);&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glEnd();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glBegin(GL_TRIANGLES);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glColor3ub(0,0,0);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(2.0f, -14.0f);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(1.5f, -13.0f);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(1.0f, -14.0f);&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glEnd();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glPopMatrix();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; ///boat-2 motion right to left&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glPushMatrix();&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glTranslatef(moveB2, 0.0f, 0.0f);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glBegin(GL_QUADS);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glColor3ub(139,69,19);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(22.0f, -17.5f);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(21.0f, -16.5f);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(17.50f, -16.5f);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(18.0f, -17.5f);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glEnd();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glBegin(GL_QUADS);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glColor3ub(0,0,0);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(22.0f, -18.0f);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(22.0f, -17.5f);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(17.0f, -17.5f);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(17.0f, -18.0f);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glEnd();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glBegin(GL_QUADS);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glColor3ub(255,99,71);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(20.5f, -16.5f);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(21.0f, -14.5f);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(18.5f, -14.5f);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(18.0f, -16.5f);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glEnd();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glBegin(GL_QUADS);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glColor3ub(139,69,19);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(19.8f, -14.5f);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(19.8f, -14.0f);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(19.7f, -14.0f);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(19.7f, -14.5f);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glEnd();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glBegin(GL_TRIANGLES);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glColor3ub(0,0,0);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(17.0f, -18.0f);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(17.0f, -17.5f);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(15.5f, -17.2f);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glEnd();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glBegin(GL_TRIANGLES);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glColor3ub(0,0,0);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(22.0f, -17.5f);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(22.0f, -18.0f);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(23.5f, -17.2f);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glEnd();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glBegin(GL_TRIANGLES);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glColor3ub(0,0,0);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(17.0f, -17.5f);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(18.0f, -17.5f);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glVertex2f(17.5f, -16.5f);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glEnd();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glPopMatrix();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; //end&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glPopMatrix();&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glutSwapBuffers();&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;void updateC(int value)&lt;/p&gt;&lt;p&gt;{&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; if(moveC &amp;gt; +36)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; moveC = -38;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; moveC += 0.15;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glutTimerFunc(20, updateC, 0);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glutPostRedisplay();&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;void updateB1(int value)&lt;/p&gt;&lt;p&gt;{&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; moveB1 += speed;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; if(moveB1 &amp;gt; 38)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; moveB1 = -38;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;//&amp;nbsp; &amp;nbsp;moveB1 += 0.17;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glutTimerFunc(20, updateB1, 0); //Notify GLUT to call update again in 25 milliseconds&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glutPostRedisplay();&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;void updateB2(int value)&lt;/p&gt;&lt;p&gt;{&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; if(moveB2 &amp;lt; -36)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; moveB2 = +38;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; //Notify GLUT that the display has changed&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; moveB2 -= 0.13;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glutTimerFunc(20, updateB2, 0); //Notify GLUT to call update again in 25 milliseconds&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glutPostRedisplay();&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;void handleKeypress(unsigned char key, int x, int y)&lt;/p&gt;&lt;p&gt;{&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; switch (key)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; case &#39;s&#39;://stops&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; speed = 0.0f;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; case &#39;r&#39;://runs&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; speed = 0.02f;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; glutPostRedisplay();&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;void handleMouse(int button, int state, int x, int y)&lt;/p&gt;&lt;p&gt;{&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; if (button == GLUT_LEFT_BUTTON)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; speed += 0.05f;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; else if (button == GLUT_RIGHT_BUTTON)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; {&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; speed -= 0.05f;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; }&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glutPostRedisplay();&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;void display(void)&lt;/p&gt;&lt;p&gt;{&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; DrawAllComponents();&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glFlush ();&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;void init()&lt;/p&gt;&lt;p&gt;{&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glClearColor(0.0f, 0.0f, 0.0f, 0.0f);&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;int main(int argc, char** argv)&lt;/p&gt;&lt;p&gt;{&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glutInit(&amp;amp;argc, argv);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB);&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glutInitWindowSize(1300, 700);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glutInitWindowPosition(100,100);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glutCreateWindow(&quot; Village Scenery &quot;);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; init();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glutTimerFunc(100, updateC, 1);&amp;nbsp; &amp;nbsp; // cloud speed&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glutTimerFunc(100, updateB1, 0); //Boat 1&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glutTimerFunc(100, updateB2, 0); //boat 2&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glutKeyboardFunc(handleKeypress);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glutMouseFunc(handleMouse);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glutDisplayFunc(display);&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; glutMainLoop();&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; return 0;&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.openglprojects.in/feeds/8879630995709130382/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.openglprojects.in/2024/01/New-Village-Scenery-Computer-Graphics-Project-in-OpenGL-Source-Code.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2020194800836807725/posts/default/8879630995709130382'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2020194800836807725/posts/default/8879630995709130382'/><link rel='alternate' type='text/html' href='http://www.openglprojects.in/2024/01/New-Village-Scenery-Computer-Graphics-Project-in-OpenGL-Source-Code.html' title='New Village Scenery Computer Graphics Project in OpenGL Source Code'/><author><name>Rajeev</name><uri>http://www.blogger.com/profile/03147189487850777395</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifdnhF3j3Okak7ka6D7a98DYAfurujMIERqvkc4BD6b4MEnO4I1ry3D3DZAacaKFiDM9ACES1Ucl-2UP7cH5I8HtxDWExTOuA_tBy_h5wEwFHDsohupfKfptcUJ5U-auQg6oxDXX9XChOud5TvtgJf-ylAL94_PA-ahqlkIQSzdiiYOa8iszV-4S6if8u2/s72-c/New%20Village%20Scenery%20Computer%20Graphics%20Project%20in%20OpenGL%20Source%20Code.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2020194800836807725.post-6605537871085338711</id><published>2023-03-12T02:58:00.001+05:30</published><updated>2023-03-12T03:11:42.133+05:30</updated><title type='text'>Satellites Launch Mini Projects OpenGL Computer graphics</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;ISRO has made our county proud. They have lauched so many sattelites into the sapce for tele communication,&amp;nbsp; sciencetific discovery, defence, remote sensing, meteorolog etc. In this article we are going to code satellite launch mini projects using opengl computer graphcis in c/c++.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;We launch satellites into space by putting them on rockets. The rockets carrying satellites launch via a luching station through tons of propellants (fules of rocket). The propellants provide energy to the rocket to get out of Earth gravity &#39;s pull (Speed is called escape velocity). Rocket with even thrust get into space at mutliple stages. The final stage of the rocket is to place the satellite into it orbit.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzApOTQUQUDaGGRW3bSl9DWL9NsIIvG2x3FzIdo9k95OpvCTjoYNWENk3sI3W4S9bHdz0Dzjg0EWLPoYR1GaJeC3OcoQYvJ7RhKtd1l7uLZPmZzGhGxVE73vORNrQbEB4MkHLG2PUju5E5TJvyr5c2nIsAtIlUnphaaQ6LorDbVYBfCPFl4h3oC2tWig/s1279/Satellites%20Launch%20Mini%20Projects%20OpenGL%20Computer%20graphics.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;Satellites Launch Mini Projects OpenGL Computer graphics&quot; border=&quot;0&quot; data-original-height=&quot;725&quot; data-original-width=&quot;1279&quot; height=&quot;226&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzApOTQUQUDaGGRW3bSl9DWL9NsIIvG2x3FzIdo9k95OpvCTjoYNWENk3sI3W4S9bHdz0Dzjg0EWLPoYR1GaJeC3OcoQYvJ7RhKtd1l7uLZPmZzGhGxVE73vORNrQbEB4MkHLG2PUju5E5TJvyr5c2nIsAtIlUnphaaQ6LorDbVYBfCPFl4h3oC2tWig/w400-h226/Satellites%20Launch%20Mini%20Projects%20OpenGL%20Computer%20graphics.jpg&quot; title=&quot;Satellites Launch Mini Projects OpenGL Computer graphics&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;h1 style=&quot;text-align: justify;&quot;&gt;Aim of the&amp;nbsp;Mini Projects&lt;/h1&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;The aim of this&amp;nbsp;Satellites Launch Mini Projects&amp;nbsp; with OpenGL Computer graphics is to simulate the lauch if satellites using the opengl functions and codes. We are going to create the Earth, rocket, satellites using opengl and simulate the actual lauching of satellites.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;h1 style=&quot;text-align: justify;&quot;&gt;Design and Implementation&amp;nbsp;&lt;/h1&gt;&lt;div&gt;1. Drawing of Earth -&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;2. Drawing of Rocket-&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;3. Drawing of Satellite -&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;&lt;b&gt;Do You Know?&amp;nbsp;&lt;/b&gt;&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;ISRO have &lt;a href=&quot;https://www.isro.gov.in/Student_Program_Satellite.html&quot; target=&quot;_blank&quot;&gt;student satellite program&lt;/a&gt;. 
Students who want to working in space technology may develope the payload for satellites with the help of ISRO through thier university.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h1 style=&quot;text-align: left;&quot;&gt;User Interaction in the program&lt;/h1&gt;&lt;div&gt;The&amp;nbsp;Satellites Launch Mini Projects OpenGL Computer graphics program includes interaction through keyboard as mentioned below -&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;P - Launch the rocket&lt;/div&gt;&lt;div&gt;Q- Quit&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h1 style=&quot;text-align: left;&quot;&gt;Download the source of&amp;nbsp;Mini Projects OpenGL&lt;/h1&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.openglprojects.in/feeds/6605537871085338711/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.openglprojects.in/2023/03/satellites-launch-mini-projects-opengl.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2020194800836807725/posts/default/6605537871085338711'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2020194800836807725/posts/default/6605537871085338711'/><link rel='alternate' type='text/html' href='http://www.openglprojects.in/2023/03/satellites-launch-mini-projects-opengl.html' title='Satellites Launch Mini Projects OpenGL Computer graphics'/><author><name>Rajeev</name><uri>http://www.blogger.com/profile/03147189487850777395</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzApOTQUQUDaGGRW3bSl9DWL9NsIIvG2x3FzIdo9k95OpvCTjoYNWENk3sI3W4S9bHdz0Dzjg0EWLPoYR1GaJeC3OcoQYvJ7RhKtd1l7uLZPmZzGhGxVE73vORNrQbEB4MkHLG2PUju5E5TJvyr5c2nIsAtIlUnphaaQ6LorDbVYBfCPFl4h3oC2tWig/s72-w400-h226-c/Satellites%20Launch%20Mini%20Projects%20OpenGL%20Computer%20graphics.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2020194800836807725.post-3984400188557615570</id><published>2023-02-18T23:15:00.005+05:30</published><updated>2023-02-18T23:15:52.718+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Pendulum"/><title type='text'>Create Pendulum in OpenGL Computer Graphics Program</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;We have created many simple programs using OpenGL C/C++ in this blog. In this post we are going to create another simple opengl program. We are creating a simple pendulum. You can use these code as base to create a project particlualry based on the use of pendulum.&lt;/div&gt;&lt;h1 style=&quot;text-align: left;&quot;&gt;Introduction&amp;nbsp;&lt;/h1&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;A pendulum can be define as a certain mass of object tied from a pivot that can swings back and forth due to force of gravity. The Pendulum swing at the same distance in both the directions. The angle made by pendulum from the centre on bothe side are equal and called amplitude of pendulum.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;h1 style=&quot;text-align: justify;&quot;&gt;Design and Code&lt;/h1&gt;&lt;div&gt;This simple pendulum opengl graphics program we are going to code will have two things - circle and lines. We are going to create a simple circle as clock and attache thread to it with a small circle to it. We will swing the circle right and left from the center point of it attachement with thread.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://www.openglprojects.in/2014/03/draw-circle-opengl.html#gsc.tab=0&quot; target=&quot;_blank&quot;&gt;Learn how to draw a circle in opengl&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;First in this computer graphics program we are going to write a function for coding circles. We are goint to name this functions as drawcircle. The function will have four arguments segments, radius, x, y. As name suggest these are angle (segments), radius of thread, x and y coordinates.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;div&gt;float drawCircle(float segments,float radius,float sx,float sy)&lt;/div&gt;&lt;div&gt;{&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; glBegin(GL_LINE_LOOP);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; for(int i=0;i&amp;lt;segments;i++)&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; float theta=2.0*3.142*float(i)/float(segments); //get the current angle&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; float x=radius*cos(theta);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; float y=radius*sin(theta);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; glVertex2f(x+sx,y+sy);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; glEnd();&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now we are going to draw the pendulum with the help of draw functions which looks like -&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;void draw(float x1,float y1,float angle)&lt;/div&gt;&lt;div&gt;{&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; float segments=100;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; float radius=6.0;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; //Drawing Clock main Circle&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; glLineWidth(4);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; glColor3f(1,0,0);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; drawCircle(segments,radius,x1,y1);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; //Drawing Minute Line&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; glColor3f(1,1,0);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; glLineWidth(2);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; glBegin(GL_LINES);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; glVertex2f(x1,y1);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; glVertex2f(x1,(radius/3.0)*2.0);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; glEnd();&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; //Drawing Hour Line&lt;/div&gt;&lt;div&gt;&amp;nbsp; glColor3f(1,0,0);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; glLineWidth(2);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; glBegin(GL_LINES);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; glVertex2f(x1,y1);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; glVertex2f(radius/3.0,radius/3.0);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; glEnd();&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; //Drawing Pendulum Circle&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; double radians=angle*3.142/180;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; float x2=(radius*3.4)*cos(radians);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; float y2=(radius*3.4)*sin(radians);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; float radius2=radius/3.0;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; glColor3f(0,0,1);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; //glLineWidth(2);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; drawCircle(segments,radius2,x2,y2);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; glBegin(GL_LINES);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; glVertex2f(x1,-1*(radius)+0.2);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; glVertex2f(x2,y2);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; glEnd();&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In above opengl computer graphics program code we have drawn a &lt;a href=&quot;https://www.openglprojects.in/2012/04/mini-project-on-clock-using-opengl.html#gsc.tab=0&quot;&gt;simple clock&lt;/a&gt; with hour and minute hands.You may skip therse as they are just to make this program look realstic and more sensible. In last few line we were able to draw the pendulum circle and the thread with the help of circle functions above and GL_LINES.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;As we have the draw function we applying the below logic to make the right and left movment of pendulum and thread.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;if(angle&amp;gt;315)&lt;/div&gt;&lt;div&gt;{&lt;/div&gt;&lt;div&gt;angle=315;&lt;/div&gt;&lt;div&gt;inc=-inc;&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;if(angle&amp;lt;225)&lt;/div&gt;&lt;div&gt;{&lt;/div&gt;&lt;div&gt;angle=225;&lt;/div&gt;&lt;div&gt;inc=-inc;&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;We are going to place all the code in display function and then create the main functions. You can see the output below.&lt;/div&gt;&lt;h1&gt;Outpu Pendulum OpenGL Program&lt;/h1&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgI8QBF7CEgFlFluirFYSUtSf_7jLbKVxevEMKRVqcd07WzIUvegvGN-yfhd_8zOh85D397UoOvRr4qmApDieVWUsl098c82ZaCnQuvLhOWqxTwXXuafymciCQWbGBOiIwTwraO6GHiFg-voPxDeN6YAii6lx2-Qj9z6O5TaxlPPsPEH3YwEoDXBEzLqA/s561/Pendulum%20in%20OpenGL%20Computer%20Graphics%20Program.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;521&quot; data-original-width=&quot;561&quot; height=&quot;297&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgI8QBF7CEgFlFluirFYSUtSf_7jLbKVxevEMKRVqcd07WzIUvegvGN-yfhd_8zOh85D397UoOvRr4qmApDieVWUsl098c82ZaCnQuvLhOWqxTwXXuafymciCQWbGBOiIwTwraO6GHiFg-voPxDeN6YAii6lx2-Qj9z6O5TaxlPPsPEH3YwEoDXBEzLqA/s320/Pendulum%20in%20OpenGL%20Computer%20Graphics%20Program.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h1 style=&quot;text-align: left;&quot;&gt;Projects Suggestion&lt;/h1&gt;&lt;div&gt;1. Simple Old Mechanical &lt;a href=&quot;https://www.openglprojects.in/2015/03/time-zone-opengl-c-graphics-projects.html#gsc.tab=0&quot;&gt;Clock&lt;/a&gt;&lt;/div&gt;&lt;div&gt;2. Clock tower with long pendulam Clock&lt;/div&gt;&lt;div&gt;3. Different kinds of swings&lt;/div&gt;&lt;div&gt;4. Circus swings with jokers&lt;/div&gt;&lt;div&gt;5. Amusment park with swings&amp;nbsp;&lt;/div&gt;&lt;h1 style=&quot;text-align: left;&quot;&gt;Download&amp;nbsp;&lt;/h1&gt;&lt;div&gt;Get the full code of the&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;
&lt;div class=&quot;download_code&quot;&gt;&lt;a class=&quot;btn_left&quot; href=&quot;https://drive.google.com/file/d/1tpBPr_jS4OkUIKwYA3dItK5n4UdoZUPG/view?usp=share_link&quot; target=&quot;_blank&quot;&gt;Download source code&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.openglprojects.in/feeds/3984400188557615570/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.openglprojects.in/2023/02/create-pendulum-in-opengl-computer.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2020194800836807725/posts/default/3984400188557615570'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2020194800836807725/posts/default/3984400188557615570'/><link rel='alternate' type='text/html' href='http://www.openglprojects.in/2023/02/create-pendulum-in-opengl-computer.html' title='Create Pendulum in OpenGL Computer Graphics Program'/><author><name>Rajeev</name><uri>http://www.blogger.com/profile/03147189487850777395</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgI8QBF7CEgFlFluirFYSUtSf_7jLbKVxevEMKRVqcd07WzIUvegvGN-yfhd_8zOh85D397UoOvRr4qmApDieVWUsl098c82ZaCnQuvLhOWqxTwXXuafymciCQWbGBOiIwTwraO6GHiFg-voPxDeN6YAii6lx2-Qj9z6O5TaxlPPsPEH3YwEoDXBEzLqA/s72-c/Pendulum%20in%20OpenGL%20Computer%20Graphics%20Program.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2020194800836807725.post-4085618032389521495</id><published>2023-02-05T23:53:00.002+05:30</published><updated>2023-02-05T23:53:23.616+05:30</updated><title type='text'>Atom Simulation - computer graphics projects with source code</title><content type='html'>&lt;p&gt;Download the project&amp;nbsp;Atom Simulation - computer graphics projects with source code file. The Atom simulation is OpenGL computer graphics projects uses a single window.&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;background-color: white; color: #202020; font-family: &amp;quot;Nunito Sans&amp;quot;, sans-serif; font-size: 14px;&quot;&gt;OpenGL (Open Graphics Library) is a cross-platform, industry-standard graphics API used for creating 3D applications and games. It provides a set of commands for drawing 2D and 3D objects, as well as managing the rendering pipeline, lighting, shading, and texturing.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;background-color: white; color: #202020; font-family: &amp;quot;Nunito Sans&amp;quot;, sans-serif; font-size: 14px;&quot;&gt;One of the advantages of using OpenGL is that it provides a low-level interface to the graphics hardware, which means that it can be used on a variety of platforms, including Windows, macOS, Linux, and mobile devices. It also allows developers to take advantage of the latest hardware advancements and performance optimizations.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;This is the Atom simulation: This window contains all content that is the menu bar and display of the simulation.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://user-images.githubusercontent.com/70787887/128596742-17ab830e-ea83-4afc-acfd-183c370d7486.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;723&quot; data-original-width=&quot;800&quot; height=&quot;723&quot; src=&quot;https://user-images.githubusercontent.com/70787887/128596742-17ab830e-ea83-4afc-acfd-183c370d7486.png&quot; width=&quot;800&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;This window is used for all events and for this project.&lt;/p&gt;&lt;p&gt;In this window, we display the simulation of the 10 atoms of the periodic table.&lt;/p&gt;&lt;p&gt;And all mouse and keyboard events triggered in window.&lt;/p&gt;&lt;p&gt;All labels and information about the model displayed on this window.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.openglprojects.in/feeds/4085618032389521495/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.openglprojects.in/2023/02/atom-simulation-computer-graphics.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2020194800836807725/posts/default/4085618032389521495'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2020194800836807725/posts/default/4085618032389521495'/><link rel='alternate' type='text/html' href='http://www.openglprojects.in/2023/02/atom-simulation-computer-graphics.html' title='Atom Simulation - computer graphics projects with source code'/><author><name>Rajeev</name><uri>http://www.blogger.com/profile/03147189487850777395</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2020194800836807725.post-3919394623878468784</id><published>2022-07-11T01:16:00.005+05:30</published><updated>2022-07-11T01:16:55.165+05:30</updated><title type='text'>Simple City Scenery Opengl Computer Graphics Project</title><content type='html'>&lt;p&gt;&lt;span face=&quot;Arial, Helvetica, sans-serif&quot; style=&quot;color: #4b4949; font-size: 13.8px;&quot;&gt;In this blogpost we are going to show you simple scenery opengl computer graphics project with source code. We are going to code a simple scenery use the opengl graphics library using c/c++.&lt;/span&gt;&lt;/p&gt;&lt;h2 class=&quot;subtitle&quot; style=&quot;color: #6ea6af; font-family: arial, helvetica, sans-serif; font-size: 1.7em; line-height: 1.3em; margin: 0px 0px 0.7em;&quot;&gt;Aim of the Project&lt;/h2&gt;&lt;div&gt;&lt;p style=&quot;color: #4b4949; font-family: Arial, Helvetica, sans-serif; font-size: 13.8px; margin: 0px 0px 0.75em;&quot;&gt;As said above we aim to create a scenery but big question is which type of scenery and what will be shown.&lt;/p&gt;&lt;p style=&quot;color: #4b4949; font-family: Arial, Helvetica, sans-serif; font-size: 13.8px; margin: 0px 0px 0.75em;&quot;&gt;We are going to create mountains with Sun/Moon in sky. There is one road crossing the mountain. We also going to draw tall buildings, traffic light signals and tower. There will be two mode in the scenery - day and night. In day light scene in sky sun will be display along with some birds fluying around. In the night scene we have moon and airplane flying in the sky along star twinkling.&lt;/p&gt;&lt;p style=&quot;color: #4b4949; font-family: Arial, Helvetica, sans-serif; font-size: 13.8px; margin: 0px 0px 0.75em;&quot;&gt;In both day and night scene, there is bus running on the road and clouds roaming in sky. Color of sky will be skyblue in day and black-opaque in night. Cloud will be white color. Road will be in black color along with some white strips.&lt;/p&gt;&lt;p style=&quot;color: #4b4949; font-family: Arial, Helvetica, sans-serif; font-size: 13.8px; margin: 0px 0px 0.75em;&quot;&gt;&lt;span style=&quot;font-size: 13.8px;&quot;&gt;Few Lines from song &quot;City Of Stars&quot; - Movie:&lt;/span&gt;&lt;span style=&quot;font-size: 13.8px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;font-size: 13.8px;&quot;&gt;La La Land&lt;/strong&gt;&lt;/p&gt;&lt;div class=&quot;full module moduleCallout&quot; id=&quot;mod_52512547&quot; style=&quot;clear: left; color: #4b4949; font-family: Arial, Helvetica, sans-serif; font-size: 13.8px; margin-bottom: 1.3em; overflow-wrap: break-word; word-break: break-word;&quot;&gt;&lt;div id=&quot;52512547_callout&quot;&gt;&lt;div class=&quot;callout colorbox&quot; style=&quot;background: rgba(215, 215, 215, 0.77); border-radius: 10px; clear: both; line-height: 2em; margin: auto; padding: 20px 25px; text-align: center; width: 416px;&quot;&gt;&lt;p style=&quot;font-size: 1.2em; margin: 0px;&quot;&gt;City of stars&lt;/p&gt;&lt;p style=&quot;font-size: 1.2em; margin: 0px;&quot;&gt;Are you shining just for me?&lt;/p&gt;&lt;p style=&quot;font-size: 1.2em; margin: 0px;&quot;&gt;City of stars&lt;/p&gt;&lt;p style=&quot;font-size: 1.2em; margin: 0px;&quot;&gt;There&#39;s so much that I can&#39;t see&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;full module moduleText&quot; id=&quot;mod_52535942&quot; style=&quot;clear: left; color: #4b4949; font-family: Arial, Helvetica, sans-serif; font-size: 13.8px; margin-bottom: 1.3em; overflow-wrap: break-word; word-break: break-word;&quot;&gt;&lt;div class=&quot;txtd&quot; id=&quot;txtd_52535942&quot;&gt;&lt;h2 class=&quot;subtitle&quot; style=&quot;color: #6ea6af; font-family: arial, helvetica, sans-serif; font-size: 1.7em; line-height: 1.3em; margin: 0px 0px 0.7em;&quot;&gt;Implementation of computer graphics project&lt;/h2&gt;&lt;div&gt;&lt;div class=&quot;full module moduleText&quot; id=&quot;mod_52512548&quot; style=&quot;clear: left; font-size: 13.8px; margin-bottom: 1.3em; overflow-wrap: break-word; word-break: break-word;&quot;&gt;&lt;div class=&quot;txtd&quot; id=&quot;txtd_52512548&quot;&gt;&lt;p style=&quot;margin: 0px 0px 0.75em;&quot;&gt;This project uses different OpenGL functions to create different objects.&lt;/p&gt;&lt;p style=&quot;margin: 0px 0px 0.75em;&quot;&gt;&lt;strong&gt;Coding for Sun&lt;/strong&gt;&lt;/p&gt;&lt;p style=&quot;margin: 0px 0px 0.75em;&quot;&gt;glLoadIdentity();&lt;br /&gt;glBegin(GL_POLYGON);&lt;br /&gt;glColor3ub(255.0f, 255.0f, 128.0f);&lt;br /&gt;float angle10;&lt;br /&gt;for (int i=0;i&amp;lt;360;i++)&lt;br /&gt;{&lt;br /&gt;angle10=i*3.1416/180;&lt;br /&gt;glVertex2f(0.0+0.12*cos(angle10),0.9+0.12*sin(angle10));&lt;/p&gt;&lt;p style=&quot;margin: 0px 0px 0.75em;&quot;&gt;}&lt;br /&gt;glEnd();&lt;/p&gt;&lt;p style=&quot;margin: 0px 0px 0.75em;&quot;&gt;&lt;strong&gt;Coding for Moon&lt;/strong&gt;&lt;/p&gt;&lt;p style=&quot;margin: 0px 0px 0.75em;&quot;&gt;&lt;br /&gt;glLoadIdentity();&lt;br /&gt;glBegin(GL_POLYGON);&lt;br /&gt;glColor3ub(255, 255, 255);&lt;br /&gt;GLfloat x5=.7f;&lt;br /&gt;GLfloat y5=.7f;&lt;br /&gt;GLfloat radius5 =.07f;&lt;br /&gt;GLfloat twicePi5 = 2.0f * PI;&lt;br /&gt;GLfloat triangleAmount5=100;&lt;br /&gt;glBegin(GL_TRIANGLE_FAN);&lt;br /&gt;glVertex2f(x5, y5); // center of circle&lt;br /&gt;for(int i = 0; i &amp;lt;= triangleAmount5; i++)&lt;br /&gt;{&lt;br /&gt;glVertex2f(&lt;br /&gt;x5 + (radius5 * cos(i * twicePi5 / triangleAmount5)),&lt;br /&gt;y5 + (radius5 * sin(i * twicePi5 / triangleAmount5))&lt;br /&gt;);&lt;br /&gt;}&lt;br /&gt;glEnd();&lt;/p&gt;&lt;p style=&quot;margin: 0px 0px 0.75em;&quot;&gt;Code for Airplane&lt;/p&gt;&lt;p style=&quot;margin: 0px 0px 0.75em;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;margin: 0px 0px 0.75em;&quot;&gt;glLoadIdentity();&lt;/p&gt;&lt;p style=&quot;margin: 0px 0px 0.75em;&quot;&gt;&lt;br /&gt;glPushMatrix();&lt;br /&gt;glScalef(0.4,0.4,0);&lt;br /&gt;glTranslatef(0.0f,1.5f, 0.0f);&lt;br /&gt;glTranslatef(position6, 0.0f, 0.0f);&lt;/p&gt;&lt;p style=&quot;margin: 0px 0px 0.75em;&quot;&gt;glBegin(GL_POLYGON); // airplane outer body&lt;br /&gt;glColor3ub(234, 229, 229); // white&lt;br /&gt;glVertex2f(-0.3f, 0.2f);&lt;br /&gt;glVertex2f(0.3f, 0.2f);&lt;br /&gt;glVertex2f(0.4f, 0.3f);&lt;br /&gt;glVertex2f(0.45f, 0.4f);&lt;br /&gt;glVertex2f(0.45f, 0.5f);&lt;br /&gt;glVertex2f(0.3f, 0.4f);&lt;br /&gt;glVertex2f(0.0f, 0.4f);&lt;br /&gt;glVertex2f(-0.2f, 0.4f);&lt;br /&gt;glVertex2f(-0.3f, 0.4f);&lt;br /&gt;glVertex2f(-0.35f, 0.38f);&lt;br /&gt;glVertex2f(-0.4f, 0.3f);&lt;br /&gt;glVertex2f(-0.35f, 0.23f);&lt;br /&gt;glVertex2f(-0.3f, 0.2f);&lt;br /&gt;glEnd();&lt;br /&gt;glBegin(GL_POLYGON); // airplane front window&lt;br /&gt;glColor3ub(117, 69, 160); // purple one&lt;br /&gt;glVertex2f(-0.37f, 0.35f);&lt;br /&gt;glVertex2f(-0.32f, 0.35f);&lt;br /&gt;glVertex2f(-0.3f, 0.36f);&lt;br /&gt;glVertex2f(-0.3f, 0.38f);&lt;br /&gt;glVertex2f(-0.35f, 0.38f);&lt;br /&gt;glEnd();&lt;br /&gt;glBegin(GL_LINES); // airplane front window&lt;br /&gt;glColor3ub(255, 255, 255); // white&lt;br /&gt;glVertex2f(-0.35f, 0.35f);&lt;br /&gt;glVertex2f(-0.33f, 0.38f);&lt;br /&gt;glVertex2f(-0.33f, 0.35f);&lt;br /&gt;glVertex2f(-0.31f, 0.38f);&lt;br /&gt;glEnd();&lt;br /&gt;glBegin(GL_LINES); // airplane front door&lt;br /&gt;glColor3ub(144, 126, 181); // purple one&lt;br /&gt;glVertex2f(-0.25f, 0.26f);&lt;br /&gt;glVertex2f(-0.23f, 0.24f);&lt;br /&gt;glVertex2f(-0.23f, 0.24f);&lt;br /&gt;glVertex2f(-0.18f, 0.24f);&lt;br /&gt;glVertex2f(-0.18f, 0.24f);&lt;br /&gt;glVertex2f(-0.16f, 0.26f);&lt;br /&gt;glVertex2f(-0.16f, 0.26f);&lt;br /&gt;glVertex2f(-0.16f, 0.36f);&lt;br /&gt;glVertex2f(-0.16f, 0.36f);&lt;br /&gt;glVertex2f(-0.18f, 0.38f);&lt;br /&gt;glVertex2f(-0.18f, 0.38f);&lt;br /&gt;glVertex2f(-0.23f, 0.38f);&lt;br /&gt;glVertex2f(-0.23f, 0.38f);&lt;br /&gt;glVertex2f(-0.25f, 0.36f);&lt;br /&gt;glVertex2f(-0.25f, 0.36f);&lt;br /&gt;glVertex2f(-0.25f, 0.26f);&lt;br /&gt;glEnd();&lt;br /&gt;glBegin(GL_QUADS); // Airplane front wind&lt;br /&gt;glColor3ub(117, 69, 160); // purple one&lt;br /&gt;glVertex2f(0.02f, 0.15f);&lt;br /&gt;glVertex2f(0.05f, 0.15f);&lt;br /&gt;glVertex2f(-0.03f, 0.26f);&lt;br /&gt;glVertex2f(-0.1f, 0.26f);&lt;br /&gt;glEnd();&lt;br /&gt;glBegin(GL_QUADS); // Airplane back wind&lt;br /&gt;glColor3ub(117, 69, 160); // purple one&lt;br /&gt;glVertex2f(-0.08f, 0.4f);&lt;br /&gt;glVertex2f(0.0f, 0.4f);&lt;br /&gt;glVertex2f(0.07f, 0.49f);&lt;br /&gt;glVertex2f(0.04f, 0.49f);&lt;br /&gt;glEnd();&lt;br /&gt;// Airplane window&lt;br /&gt;glColor3ub(117, 69, 160); // purple one&lt;br /&gt;GLfloat x2=-0.09f;&lt;br /&gt;GLfloat y2=0.35f;&lt;br /&gt;GLfloat radius1 =.02f;&lt;br /&gt;int triangleAmount1 = 100;&lt;br /&gt;GLfloat twicePi1 = 2.0f * PI;&lt;br /&gt;glBegin(GL_TRIANGLE_FAN);&lt;br /&gt;glVertex2f(x2, y2); // center of circle&lt;br /&gt;for(int i = 0; i &amp;lt;= triangleAmount1; i++)&lt;br /&gt;{&lt;br /&gt;glVertex2f(&lt;br /&gt;x2 + (radius1 * cos(i * twicePi1 / triangleAmount1)),&lt;br /&gt;y2 + (radius1 * sin(i * twicePi1 / triangleAmount1))&lt;br /&gt;);&lt;br /&gt;}&lt;br /&gt;glEnd();&lt;br /&gt;// Airplane window&lt;br /&gt;glColor3ub(117, 69, 160); // purple one&lt;br /&gt;GLfloat x3=-0.02f;&lt;br /&gt;GLfloat y3=0.35f;&lt;br /&gt;radius1 =.02f;&lt;br /&gt;twicePi1 = 2.0f * PI;&lt;br /&gt;glBegin(GL_TRIANGLE_FAN);&lt;br /&gt;glVertex2f(x3, y3); // center of circle&lt;br /&gt;for(int i = 0; i &amp;lt;= triangleAmount1; i++)&lt;br /&gt;{&lt;br /&gt;glVertex2f(&lt;br /&gt;x3 + (radius1 * cos(i * twicePi1 / triangleAmount1)),&lt;br /&gt;y3 + (radius1 * sin(i * twicePi1 / triangleAmount1))&lt;br /&gt;);&lt;br /&gt;}&lt;br /&gt;glEnd();&lt;br /&gt;// Airplane window&lt;br /&gt;glColor3ub(117, 69, 160); // purple one&lt;br /&gt;GLfloat x4=0.06f;&lt;br /&gt;GLfloat y4=0.35f;&lt;br /&gt;radius1 =.02f;&lt;br /&gt;twicePi1 = 2.0f * PI;&lt;br /&gt;glBegin(GL_TRIANGLE_FAN);&lt;br /&gt;glVertex2f(x4, y4); // center of circle&lt;br /&gt;for(int i = 0; i &amp;lt;= triangleAmount1; i++)&lt;br /&gt;{&lt;br /&gt;glVertex2f(&lt;br /&gt;x4 + (radius1 * cos(i * twicePi1 / triangleAmount1)),&lt;br /&gt;y4 + (radius1 * sin(i * twicePi1 / triangleAmount1))&lt;br /&gt;);&lt;br /&gt;}&lt;br /&gt;glEnd();&lt;/p&gt;&lt;p style=&quot;margin: 0px 0px 0.75em;&quot;&gt;glPopMatrix();&lt;/p&gt;&lt;p style=&quot;margin: 0px 0px 0.75em;&quot;&gt;Code for Birds&lt;/p&gt;&lt;p style=&quot;margin: 0px 0px 0.75em;&quot;&gt;glLoadIdentity();&lt;br /&gt;glPushMatrix();&lt;br /&gt;glTranslatef(position5,0.0f, 0.0f);&lt;br /&gt;glBegin(GL_POLYGON);&lt;br /&gt;glColor3ub(0.0, 0.0, 0.0);&lt;br /&gt;float angle41;&lt;br /&gt;for (int i=0;i&amp;lt;360;i++)&lt;br /&gt;{&lt;br /&gt;angle41=i*3.1416/180;&lt;br /&gt;glVertex2f(0.8+0.04*cos(angle41),0.7+0.02*sin(angle41));&lt;/p&gt;&lt;p style=&quot;margin: 0px 0px 0.75em;&quot;&gt;}&lt;br /&gt;glEnd();&lt;/p&gt;&lt;p style=&quot;margin: 0px 0px 0.75em;&quot;&gt;glBegin(GL_POLYGON);&lt;br /&gt;glColor3ub(0.0, 0.0, 0.0);&lt;br /&gt;float angle42;&lt;br /&gt;for (int i=0;i&amp;lt;360;i++)&lt;br /&gt;{&lt;br /&gt;angle42=i*3.1416/180;&lt;br /&gt;glVertex2f(0.75+0.02*cos(angle42),0.71+0.02*sin(angle42));&lt;/p&gt;&lt;p style=&quot;margin: 0px 0px 0.75em;&quot;&gt;}&lt;br /&gt;glEnd();&lt;/p&gt;&lt;p style=&quot;margin: 0px 0px 0.75em;&quot;&gt;glBegin(GL_POLYGON);&lt;br /&gt;glColor3ub(255.0, 255.0, 255.0);&lt;br /&gt;float angle43;&lt;br /&gt;for (int i=0;i&amp;lt;360;i++)&lt;br /&gt;{&lt;br /&gt;angle43=i*3.1416/180;&lt;br /&gt;glVertex2f(0.74+0.005*cos(angle43),0.71+0.005*sin(angle43));&lt;/p&gt;&lt;p style=&quot;margin: 0px 0px 0.75em;&quot;&gt;}&lt;br /&gt;glEnd();&lt;br /&gt;//wing&lt;/p&gt;&lt;p style=&quot;margin: 0px 0px 0.75em;&quot;&gt;glBegin(GL_TRIANGLES);&lt;br /&gt;glColor3ub(255.0, 255.0, 255.0);&lt;br /&gt;glVertex2f(0.8f,0.75f);&lt;br /&gt;glVertex2f(0.79,0.71f);&lt;br /&gt;glVertex2f(0.785f,0.8f);&lt;br /&gt;glEnd();&lt;/p&gt;&lt;p style=&quot;margin: 0px 0px 0.75em;&quot;&gt;//lip&lt;br /&gt;glBegin(GL_TRIANGLES);&lt;br /&gt;glColor3ub(255.0, 0.0, 0.0);&lt;br /&gt;glVertex2f(0.73f,0.72f);&lt;br /&gt;glVertex2f(0.69f,0.71f);&lt;br /&gt;glVertex2f(0.73f,0.70f);&lt;br /&gt;glEnd();&lt;/p&gt;&lt;p style=&quot;margin: 0px 0px 0.75em;&quot;&gt;In our Simple City Scenery opengl computer graphics program we have used three birds. You can use many birds you like, just adjust the coordinate of thier body so they fit in the scene. Code for the bird will be common for all just need some tweak in the coordinates.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;full module moduleDistributionVideo&quot; id=&quot;mod_new33&quot; style=&quot;clear: left; font-size: 13.8px; margin-bottom: 1.3em; overflow-wrap: break-word; word-break: break-word;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;full module moduleText&quot; id=&quot;mod_52512552&quot; style=&quot;clear: left; font-size: 13.8px; margin-bottom: 1.3em; overflow-wrap: break-word; word-break: break-word;&quot;&gt;&lt;div class=&quot;txtd&quot; id=&quot;txtd_52512552&quot;&gt;&lt;p style=&quot;margin: 0px 0px 0.75em;&quot;&gt;You can find full source code in the download link.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;full module moduleText&quot; id=&quot;mod_52512554&quot; style=&quot;clear: left; font-size: 13.8px; margin-bottom: 1.3em; overflow-wrap: break-word; word-break: break-word;&quot;&gt;&lt;h2 class=&quot;subtitle&quot; style=&quot;color: #6ea6af; font-family: arial, helvetica, sans-serif; font-size: 1.7em; line-height: 1.3em; margin: 0px 0px 0.7em;&quot;&gt;User Interaction&lt;/h2&gt;&lt;div class=&quot;txtd&quot; id=&quot;txtd_52512554&quot;&gt;&lt;p style=&quot;margin: 0px 0px 0.75em;&quot;&gt;In this opengl computer graphics project we have used both keyboard and mouse interaction. Separate opengl functions has been use for calling mouse events and keyboard events. There only few intractions that user and do with this program.&lt;/p&gt;&lt;p style=&quot;margin: 0px 0px 0.75em;&quot;&gt;&lt;strong&gt;&lt;u&gt;Keyboard Interaction&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p style=&quot;margin: 0px 0px 0.75em;&quot;&gt;Following are keyboard functions used for user in this opengl program.&lt;/p&gt;&lt;p style=&quot;margin: 0px 0px 0.75em;&quot;&gt;&#39;s&#39;: With this key Bus/Vechile in the program stop moving and halt at the postion where this key has been place.&lt;br /&gt;&#39;r&#39;: With this key Bus/Vechile in the program start running/movin. It will start from postion where it halting.&lt;br /&gt;&#39;d&#39;: With this key user can switch to day mode when in the night mode.&lt;br /&gt;&#39;n&#39;: This key will allow user to change from day mode to night mode.&lt;/p&gt;&lt;p style=&quot;margin: 0px 0px 0.75em;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;h2 class=&quot;subtitle&quot; style=&quot;color: #6ea6af; font-family: arial, helvetica, sans-serif; font-size: 1.7em; line-height: 1.3em; margin: 0px 0px 0.7em;&quot;&gt;Learn about Functions used&lt;/h2&gt;&lt;div class=&quot;moduleTable&quot; id=&quot;div_table_view_52536032&quot; style=&quot;font-size: 13.8px; margin: 0px 0px 0.5em; overflow: auto; padding: 0px;&quot;&gt;&lt;table class=&quot;style0&quot; id=&quot;table_view_52536032&quot; style=&quot;border-collapse: collapse; border-spacing: 0px; border: 0px; font-size: 1em; margin: 0px; padding: 0px; width: 520px;&quot;&gt;&lt;thead id=&quot;thead_view_52536032&quot; style=&quot;vertical-align: bottom;&quot;&gt;&lt;tr&gt;&lt;th style=&quot;background: padding-box padding-box rgb(255, 255, 255); border: 1px solid rgb(215, 215, 215); color: #4b4949; margin: 0px; overflow: visible; padding: 0.4em; text-align: center; width: 200px;&quot;&gt;&lt;div style=&quot;max-width: 200px; min-width: 120px;&quot;&gt;Funcrions&lt;/div&gt;&lt;/th&gt;&lt;th style=&quot;background: padding-box padding-box rgb(255, 255, 255); border: 1px solid rgb(215, 215, 215); color: #4b4949; margin: 0px; overflow: visible; padding: 0.4em; text-align: center; width: 200px;&quot;&gt;&lt;div style=&quot;max-width: 200px; min-width: 120px;&quot;&gt;Descritpions&lt;/div&gt;&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody id=&quot;tbody_view_52536032&quot;&gt;&lt;tr&gt;&lt;td style=&quot;background-clip: padding-box; background-color: white; border: 1px solid rgb(215, 215, 215); color: #4b4949; margin: 0px; overflow: visible; padding: 0.4em; width: 200px;&quot;&gt;&lt;div style=&quot;max-width: 200px; min-width: 120px;&quot;&gt;GL_TRIANGLE_FAN&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-clip: padding-box; background-color: white; border: 1px solid rgb(215, 215, 215); color: #4b4949; margin: 0px; overflow: visible; padding: 0.4em; width: 200px;&quot;&gt;&lt;div style=&quot;max-width: 200px; min-width: 120px;&quot;&gt;The first vertex is always held fixed. From there on, every group of 2 adjacent vertices form a triangle with the first.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;background-clip: padding-box; background-color: white; border: 1px solid rgb(215, 215, 215); color: #4b4949; margin: 0px; overflow: visible; padding: 0.4em; width: 200px;&quot;&gt;&lt;div style=&quot;max-width: 200px; min-width: 120px;&quot;&gt;glLoadIdentity()&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-clip: padding-box; background-color: white; border: 1px solid rgb(215, 215, 215); color: #4b4949; margin: 0px; overflow: visible; padding: 0.4em; width: 200px;&quot;&gt;&lt;div style=&quot;max-width: 200px; min-width: 120px;&quot;&gt;id&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;background-clip: padding-box; background-color: white; border: 1px solid rgb(215, 215, 215); color: #4b4949; margin: 0px; overflow: visible; padding: 0.4em; width: 200px;&quot;&gt;&lt;div style=&quot;max-width: 200px; min-width: 120px;&quot;&gt;glutTimerFunc()&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-clip: padding-box; background-color: white; border: 1px solid rgb(215, 215, 215); color: #4b4949; margin: 0px; overflow: visible; padding: 0.4em; width: 200px;&quot;&gt;&lt;div style=&quot;max-width: 200px; min-width: 120px;&quot;&gt;d&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;background-clip: padding-box; background-color: white; border: 1px solid rgb(215, 215, 215); color: #4b4949; margin: 0px; overflow: visible; padding: 0.4em; width: 200px;&quot;&gt;&lt;div style=&quot;max-width: 200px; min-width: 120px;&quot;&gt;glutPostRedisplay()&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-clip: padding-box; background-color: white; border: 1px solid rgb(215, 215, 215); color: #4b4949; margin: 0px; overflow: visible; padding: 0.4em; width: 200px;&quot;&gt;&lt;div style=&quot;max-width: 200px; min-width: 120px;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;background-clip: padding-box; background-color: white; border: 1px solid rgb(215, 215, 215); color: #4b4949; margin: 0px; overflow: visible; padding: 0.4em; width: 200px;&quot;&gt;&lt;div style=&quot;max-width: 200px; min-width: 120px;&quot;&gt;GL_QUADS&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-clip: padding-box; background-color: white; border: 1px solid rgb(215, 215, 215); color: #4b4949; margin: 0px; overflow: visible; padding: 0.4em; width: 200px;&quot;&gt;&lt;div style=&quot;max-width: 200px; min-width: 120px;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot;background-clip: padding-box; background-color: white; border: 1px solid rgb(215, 215, 215); color: #4b4949; margin: 0px; overflow: visible; padding: 0.4em; width: 200px;&quot;&gt;&lt;div style=&quot;max-width: 200px; min-width: 120px;&quot;&gt;glPushMatrix&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-clip: padding-box; background-color: white; border: 1px solid rgb(215, 215, 215); color: #4b4949; margin: 0px; overflow: visible; padding: 0.4em; width: 200px;&quot;&gt;&lt;div style=&quot;max-width: 200px; min-width: 120px;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;moduleTable&quot; id=&quot;div_table_view_52536032&quot; style=&quot;font-size: 13.8px; margin: 0px 0px 0.5em; overflow: auto; padding: 0px;&quot;&gt;&lt;div class=&quot;full module moduleText&quot; id=&quot;mod_52536024&quot; style=&quot;clear: left; font-size: 13.8px; margin-bottom: 1.3em; overflow-wrap: break-word; word-break: break-word;&quot;&gt;&lt;h2 class=&quot;subtitle&quot; style=&quot;color: #6ea6af; font-family: arial, helvetica, sans-serif; font-size: 1.7em; line-height: 1.3em; margin: 0px 0px 0.7em;&quot;&gt;Future Encashment&lt;/h2&gt;&lt;div class=&quot;txtd&quot; id=&quot;txtd_52536024&quot;&gt;&lt;p style=&quot;margin: 0px 0px 0.75em;&quot;&gt;We would love to hear from you with below feature you can add in this Computer Graphics Mini Project to make it more interesting.&lt;/p&gt;&lt;ol style=&quot;margin: 0px 0px 0.75em 2em; padding: 0px;&quot;&gt;&lt;li style=&quot;margin: 0px 0px 0.5em;&quot;&gt;Add more building/houses in the project.&lt;/li&gt;&lt;li style=&quot;margin: 0px 0px 0.5em;&quot;&gt;Draw river around which flow from the mountain in the program and it contain bridge if possible.&lt;/li&gt;&lt;li style=&quot;margin: 0px 0px 0.5em;&quot;&gt;Add more vechiles on the road with sound effects of horns.&lt;/li&gt;&lt;li style=&quot;margin: 0px 0px 0.5em;&quot;&gt;Add footpath for people and let some human walki in.&lt;/li&gt;&lt;/ol&gt;&lt;p style=&quot;margin: 0px 0px 0.75em;&quot;&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;full module moduleVideo&quot; id=&quot;mod_52512581&quot; style=&quot;clear: both; font-size: 13.8px; margin-bottom: 1.3em; overflow-wrap: break-word; word-break: break-word;&quot;&gt;&lt;h2 class=&quot;subtitle&quot; style=&quot;color: #6ea6af; font-family: arial, helvetica, sans-serif; font-size: 1.7em; line-height: 1.3em; margin: 0px 0px 0.7em;&quot;&gt;Video Demo&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;
&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/Ffjrluh0Y0M&quot; title=&quot;YouTube video player&quot; frameborder=&quot;0&quot; allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen&gt;&lt;/iframe&gt;  
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h2 class=&quot;subtitle&quot; style=&quot;color: #6ea6af; font-family: arial, helvetica, sans-serif; font-size: 1.7em; line-height: 1.3em; margin: 0px 0px 0.7em;&quot;&gt;Source Code Download&lt;/h2&gt;&lt;div class=&quot;txtd&quot; id=&quot;txtd_52536027&quot; style=&quot;font-size: 13.8px;&quot;&gt;&lt;p style=&quot;margin: 0px 0px 0.75em;&quot;&gt;Download source code of this Computer Graphics Mini Project from the link provide in the post below. You are free to ask anything about this projects to us in comments section. You may also write an email to us.&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;div class=&quot;download_code&quot;&gt;&lt;a class=&quot;btn_left&quot; href=&quot;&quot; target=&quot;_blank&quot;&gt;DOWNLOAD CODE&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.openglprojects.in/feeds/3919394623878468784/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.openglprojects.in/2022/07/simple-city-scenery-opengl-computer.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2020194800836807725/posts/default/3919394623878468784'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2020194800836807725/posts/default/3919394623878468784'/><link rel='alternate' type='text/html' href='http://www.openglprojects.in/2022/07/simple-city-scenery-opengl-computer.html' title='Simple City Scenery Opengl Computer Graphics Project'/><author><name>Rajeev</name><uri>http://www.blogger.com/profile/03147189487850777395</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/Ffjrluh0Y0M/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2020194800836807725.post-21914621787139546</id><published>2022-05-30T01:03:00.003+05:30</published><updated>2022-05-30T01:03:14.356+05:30</updated><title type='text'>Top Computer Graphics Projects Ideas for 2022</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;One idea can change the world. Here in this blog post we are giving you some computer graphics projects ideas, that will help you build new innovative project. These ideas will help you in completing you VTU CS computer graphics . Many of thes Computer Graphics (CG) Project Topics&amp;nbsp; may be complex to desgin and code. You can be showman among your peers, when you will able to execute these complex Computer Graphics (CG) Project ideas by coding them into a fantastic opengl computer graphics projects.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIwzxu9ZW-hSxv9llCge7gvqDDsIwaUeUPB8GZRBJGIVnp8Ye9yT5yjfuUtpdur8nkn3uqBLTYiXfcMUh_sd1a0J4ti4bkosFzorFrR9KCc273I5sEMlDdns0Fl5Mub7Wg1Kx_YK6CxbzIU3wT5NwZm0MRXPAS4s_osDzqI_PhJzc55N4m6SW2s45Dvg/s312/top%20computer%20graphics%20projects%20ideas%20for%202022.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;Top Computer Graphics Projects Ideas for 2022&quot; border=&quot;0&quot; data-original-height=&quot;230&quot; data-original-width=&quot;312&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIwzxu9ZW-hSxv9llCge7gvqDDsIwaUeUPB8GZRBJGIVnp8Ye9yT5yjfuUtpdur8nkn3uqBLTYiXfcMUh_sd1a0J4ti4bkosFzorFrR9KCc273I5sEMlDdns0Fl5Mub7Wg1Kx_YK6CxbzIU3wT5NwZm0MRXPAS4s_osDzqI_PhJzc55N4m6SW2s45Dvg/s16000/top%20computer%20graphics%20projects%20ideas%20for%202022.png&quot; title=&quot;Top Computer Graphics Projects Ideas for 2022&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Social Messaging Apps&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Social media is very powerful tool for this generation. One of the best thing as current generation student you can design a&amp;nbsp;computer graphics mini projects that shows how these social media works.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Tesla EV Cars&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;EV or Electrical vechiles are getting it popularity due to it&#39;s impact in making world green again. &lt;a href=&quot;https://www.tesla.com/&quot;&gt;Tesla&lt;/a&gt;&amp;nbsp;is one the leading company, hot in news for it world class electrical cars. A CG mini projects over the Tesla EV Cars would surely be innovative ideas.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Medical drones&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Drones are future and it will have impact on human kind. It would be great&amp;nbsp;Computer Graphics Projects Idea for desing and code for working of a medical drones.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Internet of Things (IoT)&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Interenet or world wide web as we says has evolved alot, it is giving new and innovatiove solution to many problem of mankind. We can creat an Opengl graphics projects that will show how different things can be connected via intenet and can be opeated from anywhere.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Covid 19&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;We can save million live if we spread the informative news about Covid 19. It&#39;s symptoms, socail distancing, testing, precaution to be taken etc with computer graphics can be shown. It would be great to show as well the impotance of getting vacinated.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Missile&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;You might have hear about ongoing war. Now is the time to show graphically what a missile is and how it function along with different types of missiles.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Hydrogen vehicle&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;As said above electric vechiles are future but Hydrogen fuled vechiles may give tough competion to them. We can use our&amp;nbsp;Computer Graphics Projects Ideas for developing of Hydrogen vehicle, how H2 is use to run a vechiles.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.openglprojects.in/feeds/21914621787139546/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.openglprojects.in/2022/05/ Top Computer Graphics Projects Ideas for 2022 .html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2020194800836807725/posts/default/21914621787139546'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2020194800836807725/posts/default/21914621787139546'/><link rel='alternate' type='text/html' href='http://www.openglprojects.in/2022/05/ Top Computer Graphics Projects Ideas for 2022 .html' title='Top Computer Graphics Projects Ideas for 2022'/><author><name>Rajeev</name><uri>http://www.blogger.com/profile/03147189487850777395</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIwzxu9ZW-hSxv9llCge7gvqDDsIwaUeUPB8GZRBJGIVnp8Ye9yT5yjfuUtpdur8nkn3uqBLTYiXfcMUh_sd1a0J4ti4bkosFzorFrR9KCc273I5sEMlDdns0Fl5Mub7Wg1Kx_YK6CxbzIU3wT5NwZm0MRXPAS4s_osDzqI_PhJzc55N4m6SW2s45Dvg/s72-c/top%20computer%20graphics%20projects%20ideas%20for%202022.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2020194800836807725.post-5131280737561304601</id><published>2022-01-18T00:38:00.001+05:30</published><updated>2022-01-18T00:38:33.917+05:30</updated><title type='text'>3D Bedroom OpenGL Computer graphics projects </title><content type='html'>&lt;p&gt;&amp;nbsp;computer graphics project using opengl&lt;/p&gt;&lt;h1 class=&quot;style-scope ytd-watch-metadata&quot; style=&quot;-webkit-box-orient: vertical; -webkit-line-clamp: 2; background: rgb(249, 249, 249); border: 0px; color: #030303; display: -webkit-box; font-family: &amp;quot;YouTube Sans&amp;quot;, Roboto, sans-serif; font-size: 2rem; line-height: 2.8rem; margin: 0px; max-height: 5.6rem; overflow: hidden; padding: 0px; text-overflow: ellipsis; word-break: break-word;&quot;&gt;&lt;yt-formatted-string class=&quot;style-scope ytd-watch-metadata&quot; force-default-style=&quot;&quot;&gt;Computer graphics projects&lt;/yt-formatted-string&gt;&lt;/h1&gt;&lt;p&gt;&lt;span style=&quot;background-color: white; color: #24292f; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div class=&quot;download_code&quot;&gt;&lt;a class=&quot;btn_left&quot; href=&quot;https://github.com/Mahibabu1993/OpenGL-Project/blob/master/transformers.cpp&quot; target=&quot;_blank&quot;&gt;DOWNLOAD CODE&lt;/a&gt;&lt;a class=&quot;btn_left&quot; href=&quot;https://github.com/n-gauhar/bedroom-design&quot; target=&quot;_blank&quot;&gt;GITHUB&lt;/a&gt;&lt;/div&gt;
&lt;h1&gt;Contents&lt;/h1&gt;&lt;p&gt;&lt;a href=&quot;#abs&quot;&gt;Abstract&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;#imp&quot;&gt;Implementation&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;#int&quot;&gt;Interaction&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;#fut&quot;&gt;Future Encashment&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;#vid&quot;&gt;Video Demo&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;#imp&quot;&gt;Source Code Download&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;background-color: white; color: #24292f; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px;&quot;&gt;This is an assignment done for my Computer Graphics lab using C++ and OpenGL. The GL, GLU and GLUT libraries were used. The bedroom was designed using cubes, pyramids and one 2D polygon.&lt;/span&gt;&lt;/p&gt;&lt;p dir=&quot;auto&quot; style=&quot;background-color: white; box-sizing: border-box; color: #24292f; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px; margin-top: 0px;&quot;&gt;The features of the bedroom -&lt;/p&gt;&lt;ul dir=&quot;auto&quot; style=&quot;background-color: white; box-sizing: border-box; color: #24292f; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px; margin-top: 0px; padding-left: 2em;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;No lighting, no textures, no curve&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; margin-top: 0.25em;&quot;&gt;A pendulum clock with a moving pendulum&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; margin-top: 0.25em;&quot;&gt;A rotating fan (can be turned on/off)&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; margin-top: 0.25em;&quot;&gt;Change eyepoint and lookat point using keys&lt;/li&gt;&lt;/ul&gt;&lt;h4 dir=&quot;auto&quot; style=&quot;background-color: white; box-sizing: border-box; color: #24292f; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; line-height: 1.25; margin-bottom: 16px; margin-top: 24px;&quot;&gt;&lt;a aria-hidden=&quot;true&quot; class=&quot;anchor&quot; href=&quot;https://github.com/n-gauhar/bedroom-design/blob/main/README.md#the-keys-used-are--&quot; id=&quot;user-content-the-keys-used-are--&quot; style=&quot;background-color: transparent; box-sizing: border-box; float: left; line-height: 1; margin-left: -20px; padding-right: 4px; text-decoration-line: none;&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; class=&quot;octicon octicon-link&quot; height=&quot;16&quot; version=&quot;1.1&quot; viewbox=&quot;0 0 16 16&quot; width=&quot;16&quot;&gt;&lt;path d=&quot;M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z&quot; fill-rule=&quot;evenodd&quot;&gt;&lt;/path&gt;&lt;/svg&gt;&lt;/a&gt;The keys used are -&lt;/h4&gt;&lt;p dir=&quot;auto&quot; style=&quot;background-color: white; box-sizing: border-box; color: #24292f; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px; margin-top: 0px;&quot;&gt;To move Eye point:&lt;/p&gt;&lt;ol dir=&quot;auto&quot; style=&quot;background-color: white; box-sizing: border-box; color: #24292f; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px; margin-top: 0px; padding-left: 2em;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;w: up&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; margin-top: 0.25em;&quot;&gt;s: down&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; margin-top: 0.25em;&quot;&gt;a: left&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; margin-top: 0.25em;&quot;&gt;d: right&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; margin-top: 0.25em;&quot;&gt;i: zoom in&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; margin-top: 0.25em;&quot;&gt;o: zoom out&lt;/li&gt;&lt;/ol&gt;&lt;p dir=&quot;auto&quot; style=&quot;background-color: white; box-sizing: border-box; color: #24292f; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 16px; margin-top: 0px;&quot;&gt;To move Camera point:&lt;/p&gt;&lt;ol dir=&quot;auto&quot; style=&quot;background-color: white; box-sizing: border-box; color: #24292f; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI&amp;quot;, Helvetica, Arial, sans-serif, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;; font-size: 16px; margin-bottom: 0px; margin-top: 0px; padding-left: 2em;&quot;&gt;&lt;li style=&quot;box-sizing: border-box;&quot;&gt;&lt;p dir=&quot;auto&quot; style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;j: up&lt;/p&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; margin-top: 0.25em;&quot;&gt;&lt;p dir=&quot;auto&quot; style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;n: down&lt;/p&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; margin-top: 0.25em;&quot;&gt;&lt;p dir=&quot;auto&quot; style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;b: left&lt;/p&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; margin-top: 0.25em;&quot;&gt;&lt;p dir=&quot;auto&quot; style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;m: right&lt;/p&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; margin-top: 0.25em;&quot;&gt;&lt;p dir=&quot;auto&quot; style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;l: move nearer&lt;/p&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; margin-top: 0.25em;&quot;&gt;&lt;p dir=&quot;auto&quot; style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;k: move far&lt;/p&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; margin-top: 0.25em;&quot;&gt;&lt;p dir=&quot;auto&quot; style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;q to move to default position (both eyepoint &amp;amp; lookat point)&lt;/p&gt;&lt;/li&gt;&lt;li style=&quot;box-sizing: border-box; margin-top: 0.25em;&quot;&gt;&lt;p dir=&quot;auto&quot; style=&quot;box-sizing: border-box; margin-bottom: 16px; margin-top: 16px;&quot;&gt;f: to turn on/off fan&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.openglprojects.in/feeds/5131280737561304601/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.openglprojects.in/2022/01/3d-bedroom-opengl-computer-graphics.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2020194800836807725/posts/default/5131280737561304601'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2020194800836807725/posts/default/5131280737561304601'/><link rel='alternate' type='text/html' href='http://www.openglprojects.in/2022/01/3d-bedroom-opengl-computer-graphics.html' title='3D Bedroom OpenGL Computer graphics projects '/><author><name>Rajeev</name><uri>http://www.blogger.com/profile/03147189487850777395</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2020194800836807725.post-7837297600580907109</id><published>2021-06-13T02:42:00.006+05:30</published><updated>2021-07-22T01:15:52.850+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="3D Car"/><category scheme="http://www.blogger.com/atom/ns#" term="Animation"/><title type='text'>Computer Graphics Mini Project - 3D Car Animation</title><content type='html'>&lt;p style=&quot;text-align: justify;&quot;&gt;There are many car related and racing related&amp;nbsp;Computer Graphics Mini Project Projects. 
Some are simple, some little complex but all are good for student to choose for their Mini Project. 
All our computer graphics projects are in 2d. In this post we are going to give your a new&amp;nbsp;
3D Car Animation project.&amp;nbsp;&lt;/p&gt;&lt;p style=&quot;text-align: justify;&quot;&gt;This projects blog post are written in such a 
way that you can use it for you report. We have tried our best in writing the post that well help students in 
creating report of&amp;nbsp;Computer Graphics Mini Project Projects themselves without any hassle.&amp;nbsp;&lt;/p&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhj8vxVSX23JqjBzPloPdx1nUi25LUHEouY61IejYc3ONqN5ZgYp751HL_3vsO_HvKD2Q-48NAyToHZd1iCFH_E_wRtf_hC54q_IDYdpGqrYlzp6C9BHSEW_5bJxKadKOD_EWCYUy6ZrUtc/s941/Computer+Graphics+Mini+Project+Projects+-+3D+Car+Animation.JPG&quot;&gt;&lt;img alt=&quot;Computer Graphics Mini Project Projects - 3D Car Animation&quot; border=&quot;0&quot; data-original-height=&quot;586&quot; data-original-width=&quot;941&quot; height=&quot;249&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhj8vxVSX23JqjBzPloPdx1nUi25LUHEouY61IejYc3ONqN5ZgYp751HL_3vsO_HvKD2Q-48NAyToHZd1iCFH_E_wRtf_hC54q_IDYdpGqrYlzp6C9BHSEW_5bJxKadKOD_EWCYUy6ZrUtc/w400-h249/Computer+Graphics+Mini+Project+Projects+-+3D+Car+Animation.JPG&quot; title=&quot;Computer Graphics Mini Project Projects - 3D Car Animation&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;h1 style=&quot;text-align: left;&quot;&gt;Contents&lt;/h1&gt;
&lt;p&gt;&lt;a href=&quot;#abs&quot;&gt;Abstract&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;#imp&quot;&gt;Implementation&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;#int&quot;&gt;Interaction&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;#fut&quot;&gt;Future Encashment&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;#vid&quot;&gt;Video Demo&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;#imp&quot;&gt;Source Code Download&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&quot;abs&quot; style=&quot;text-align: left;&quot;&gt;Abstract&lt;/h2&gt;&lt;div&gt;&lt;div&gt;Main aim of this Mini Project is to illustrate&amp;nbsp;3D Car Animation using OpenGL Computer graphics. The concepts of OpenGL glut library and C++ has been used to create&amp;nbsp; 3D Car Animation. We demonstrates all the animation of 3D car including standalone car, driving in day/night, wheel effect, fog effect, animate in different directions,&amp;nbsp; change of colors.&lt;/div&gt;&lt;div&gt;There is user interaction in this CG program. We have used input devices like mouse and key board to interact with program.&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;/div&gt;
&lt;h2 id=&quot;imp&quot; style=&quot;text-align: left;&quot;&gt;Implementation&lt;/h2&gt;&lt;div&gt;This program is implemented using various OpenGL functions and user defined functions which are given upcoming paragraphs.&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;To code this basic OpenGL&amp;nbsp;Computer Graphics Mini Project Projects we need to understand the concept of car design and it&#39;s movement. First we need to code a car.&amp;nbsp; There are different module for car coding - front module, body, window, wheel and silencer. We are not going to full code a glimpse of it below -&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;Code for drawing front window -&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;glBegin(GL_TRIANGLES);&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; glColor3f(0.3,0.3,0.3);&lt;/div&gt;&lt;div&gt;&amp;nbsp; glVertex3f( 0.6, 0.5,0.6);&lt;/div&gt;&lt;div&gt;&amp;nbsp; glVertex3f( 0.7,0.65,0.6);&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;//tri front window&lt;/div&gt;&lt;div&gt;&amp;nbsp; glVertex3f(0.7,0.5,0.6);&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;Code for ignition system&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;glPushMatrix();&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp;glColor3f(0.7,0.7,0.7);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp;glTranslatef(1.65,0.2,0.3);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp;glRotatef(90.0,0,1,0);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp;gluCylinder(t,0.02,0.03,.5,10,10);&lt;/div&gt;&lt;div&gt;glPopMatrix();&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;Code for Wheel&amp;nbsp;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;glColor3f(0.7,0.7,0.7);&lt;/div&gt;&lt;div&gt;glPushMatrix();&lt;/div&gt;&lt;div&gt;&amp;nbsp; glBegin(GL_LINE_STRIP);&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; for(theta=0;theta&amp;lt;360;theta=theta+20)&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; glVertex3f(0.6,0.2,0.62);&lt;/div&gt;&lt;div&gt;&amp;nbsp; glVertex3f(0.6+(0.08*(cos(((theta+angle)*3.14)/180))),0.2+(0.08*(sin(((theta+angle)*3.14)/180))),0.62);&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;white-space: pre;&quot;&gt;	&lt;/span&gt;&amp;nbsp; }&lt;/div&gt;&lt;div&gt;glEnd();&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;This&amp;nbsp;Computer Graphics Mini Project Projects not just show the animation of car the aim of project but also have title. In beginning to project there is title screen which allow to show case the name of projects, student name, guide name, college name and instructions for the program.&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;Various OpenGL functions used in this program.&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;glutInit() : interaction between the windowing system and OPENGL is initiated&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;glutInitDisplayMode() : used when double buffering is required and depth information is required&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;glutCreateWindow() : this opens the OPENGL window and displays the title at top of the window&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;glutInitWindowSize() : specifies the size of the window&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;glutInitWindowPosition() : specifies the position of the window in screen co-ordinates&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;glutKeyboardFunc() : handles normal ascii symbols&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;glutSpecialFunc() : handles special keyboard keys&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;glutReshapeFunc() : sets up the callback function for reshaping the window&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;glutIdleFunc() : this handles the processing of the background&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;glutDisplayFunc() : this handles redrawing of the window&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;glutMainLoop() : this starts the main loop, it never returns&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;glViewport() : used to set up the viewport&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;glVertex3fv() : used to set up the points or vertices in three dimensions&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;glColor3fv() : used to render color to faces&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;glFlush() : used to flush the pipeline&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;glutPostRedisplay() : used to trigger an automatic redrawer of the object&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;glMatrixMode() : used to set up the required mode of the matrix&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;glLoadIdentity() : used to load or initialize to the identity matrix&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;glTranslatef() : used to translate or move the rotation center from one point to another in three dimensions&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;glRotatef() : used to rotate an object through a specified rotation angle&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;Other similar projects -&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://www.openglprojects.in/2015/03/2d-car-racing-game-opengl-projects-with-source-code.html#gsc.tab=0&quot;&gt;2D car racing game&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://www.openglprojects.in/2017/05/a-movable-car.html#gsc.tab=0&quot;&gt;A Movable Car&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://www.openglprojects.in/2017/05/a-movable-car.html#gsc.tab=0&quot;&gt;Car Race OpenGL Program&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;&lt;h2 id=&quot;int&quot; style=&quot;text-align: left;&quot;&gt;Interaction&lt;/h2&gt;&lt;div&gt;In this graphics program we have user interaction with mouse and keyboard.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;Mouse Interaction&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;-&amp;gt; Press Right mouse button for menu and select&amp;nbsp;submenu there.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;car model mode&lt;/li&gt;&lt;li&gt;car driving mode&lt;/li&gt;&lt;li&gt;fog effect&lt;/li&gt;&lt;li&gt;wheel effect&lt;/li&gt;&lt;li&gt;toggle light&lt;/li&gt;&lt;li&gt;car colors&lt;ul&gt;&lt;li&gt;&lt;/li&gt;&lt;li&gt;blue&lt;/li&gt;&lt;li&gt;red&lt;/li&gt;&lt;li&gt;green&lt;/li&gt;&lt;li&gt;black&lt;/li&gt;&lt;li&gt;yellow&lt;/li&gt;&lt;li&gt;grey&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;Day mode&lt;/li&gt;&lt;li&gt;Night mode&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;u&gt;Keyboard Interaction&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;esc - Exit from the program&lt;/li&gt;&lt;li&gt;spacebar - Enter the main screen from start screen.&lt;/li&gt;&lt;li&gt;x- Rotate the car in &#39;x&#39; direction&lt;/li&gt;&lt;li&gt;y- Rotate the car in &#39;y&#39; direction&lt;/li&gt;&lt;li&gt;z- Rotate the car in &#39;z&#39; direction&lt;/li&gt;&lt;li&gt;a- Increase the size of car in&#39;x&#39; direction&lt;/li&gt;&lt;li&gt;s- Increase the size of car in &#39;y&#39; direction&lt;/li&gt;&lt;li&gt;q- Increase the size of car in &#39;z&#39; direction&lt;/li&gt;&lt;li&gt;u- Camera top view&lt;/li&gt;&lt;li&gt;f- Camera side view&lt;/li&gt;&lt;li&gt;left arrow key - Move car in forward direction&lt;/li&gt;&lt;li&gt;right arrow key-&amp;nbsp; Move car in backward direction&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;h2 id=&quot;fut&quot;&gt;Future Enhancement&lt;/h2&gt;
You can implement many enhancement in future like adding sound to it etc. Below are some future addition that can be added to projects for improvement.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Addition of sound&lt;/li&gt;&lt;li&gt;More cars can be added into it.&lt;/li&gt;&lt;li&gt;Surroundings can be created in much better way by adding tree etc.&lt;/li&gt;&lt;li&gt;Multiple roads can be added with street light&lt;/li&gt;&lt;li&gt;Traffic signal can be added&lt;/li&gt;&lt;li&gt;Advance camera view&lt;/li&gt;&lt;li&gt;More colors can be added&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;h2 id=&quot;vid&quot; style=&quot;text-align: left;&quot;&gt;Video Demo&lt;/h2&gt;

&lt;iframe allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/HFGhItVXWog&quot; title=&quot;YouTube video player&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;
&lt;h2 id=&quot;code&quot; style=&quot;text-align: left;&quot;&gt;Source Code Download&lt;/h2&gt;
&lt;div&gt;Download source code of this&amp;nbsp;Computer Graphics Mini Project from the link given below. Feel free to ask anything about this projects to us via comments or email to us.&amp;nbsp;&lt;/div&gt;

&lt;div class=&quot;download_code&quot;&gt;&lt;a class=&quot;btn_left&quot; href=&quot;https://drive.google.com/open?id=0B4cYLdYzy4oqZElHVnJFSHhYOUE&quot; target=&quot;_blank&quot;&gt;DOWNLOAD SOURCE CODE&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.openglprojects.in/feeds/7837297600580907109/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.openglprojects.in/2021/06/computer-graphics-mini-project-3d-car.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2020194800836807725/posts/default/7837297600580907109'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2020194800836807725/posts/default/7837297600580907109'/><link rel='alternate' type='text/html' href='http://www.openglprojects.in/2021/06/computer-graphics-mini-project-3d-car.html' title='Computer Graphics Mini Project - 3D Car Animation'/><author><name>Rajeev</name><uri>http://www.blogger.com/profile/03147189487850777395</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhj8vxVSX23JqjBzPloPdx1nUi25LUHEouY61IejYc3ONqN5ZgYp751HL_3vsO_HvKD2Q-48NAyToHZd1iCFH_E_wRtf_hC54q_IDYdpGqrYlzp6C9BHSEW_5bJxKadKOD_EWCYUy6ZrUtc/s72-w400-h249-c/Computer+Graphics+Mini+Project+Projects+-+3D+Car+Animation.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2020194800836807725.post-8566286234333889494</id><published>2021-05-26T20:51:00.004+05:30</published><updated>2021-05-27T00:05:55.184+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Movie Based Projects"/><category scheme="http://www.blogger.com/atom/ns#" term="Simple Project"/><category scheme="http://www.blogger.com/atom/ns#" term="Transformers"/><title type='text'>TRANSFORMERS - The OpenGL Computer Graphics Projects</title><content type='html'>&lt;p&gt;OpenGL Projects Committed to provide student new and best&amp;nbsp;Computer Graphics Projects. In view of that we have posted so many innovative projects using OpenGL C++ on this blog.&amp;nbsp; Students can download the source codes from OpenGL Projects, use them in their own innovative projects. We know coding is fun! so what&#39;s in here? In this post we bring you one simple still classic projects that will demonstrate the &quot;TRANSFORMERS&quot;, inspired from the movie &lt;a href=&quot;https://en.wikipedia.org/wiki/Transformers_(film_series)&quot; target=&quot;_blank&quot;&gt;Transformers&lt;/a&gt;. We will give insight about projects as well as source code for same.&amp;nbsp;This projects is developed by Mahesh Bhandari of New Horizon College of Engineering, Bengaluru.&lt;/p&gt;
&lt;div class=&quot;download_code&quot;&gt;&lt;a class=&quot;btn_left&quot; href=&quot;https://github.com/Mahibabu1993/OpenGL-Project/blob/master/transformers.cpp&quot; target=&quot;_blank&quot;&gt;DOWNLOAD CODE&lt;/a&gt;&lt;a class=&quot;btn_left&quot; href=&quot;https://github.com/Mahibabu1993/OpenGL-Project&quot; target=&quot;_blank&quot;&gt;GITHUB&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;About&amp;nbsp;Transformers&lt;/h2&gt;&lt;/div&gt;&lt;div&gt;Transformers are actually objects that transform. But with reference to our film we can define the transformers are alien robots that can transform themselves into various other mechanical objects. The idea was inspired from the toy lines from japan. These transformers have been created on earth but lives on alien plane called cybertron. They can talk like human and have emotion like human, hence both negative as well as positive behavior.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;What are we building&lt;/h2&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiI3BB3z2imVej1rzzyngdLYrgSunQSqqODhgUzIlhN-S7DCif25IHcExvVyOhyHBLRsbm_dwU5q0abVHWfSs9HX_eGkT2czIlegdr-e3VBL7BIjAeGKhcWHzJ_bV3DMpDNyF4zX77Y3KhB/s1178/transformer+opengl+projects.JPG&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;TRANSFORMERS - The OpenGL Computer Graphics Projects&quot; border=&quot;0&quot; data-original-height=&quot;686&quot; data-original-width=&quot;1178&quot; height=&quot;233&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiI3BB3z2imVej1rzzyngdLYrgSunQSqqODhgUzIlhN-S7DCif25IHcExvVyOhyHBLRsbm_dwU5q0abVHWfSs9HX_eGkT2czIlegdr-e3VBL7BIjAeGKhcWHzJ_bV3DMpDNyF4zX77Y3KhB/w400-h233/transformer+opengl+projects.JPG&quot; title=&quot;TRANSFORMERS - The OpenGL Computer Graphics Projects&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In this&amp;nbsp;OpenGL Computer Graphics Projects, we are building a Transformer not exactly but a smaller robot that will transform. We are going to code a simple robot which will have two arms and legs, a head with small antenna. To show different body we will differentiate the body color and joint color and of course the head color.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;First we are going to design a small place with trees across it to make the &lt;a href=&quot;https://www.openglprojects.in/2015/11/java-opengl-graphics-programming.html#gsc.tab=0&quot; target=&quot;_blank&quot;&gt;scenery in this opengl projects&lt;/a&gt;. As we said we will design a simple robot, this will place in the midway of scenery. Now we will code to animate the robot. The idea is to collapse all the parts of robot and transform in to a car or vehicles as seen in the movie. When you will do this and run the program you will feel watching the movie, isn&#39;t that cool.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;The Transformer OpenGL Projects&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Lets code this&amp;nbsp;Computer Graphics Projects.&lt;/div&gt;&lt;div&gt;We will write code for different objects say tree, clouds etc and then club all them into the main functions. For example you can see the code for tree below -&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;void tree()&lt;/div&gt;&lt;div&gt;{&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; //Trunk&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; glColor3f(0.325,0.208,0.039);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; glScalef(1.5,0.3,0.3);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; glTranslatef(0,-10,0);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; glutSolidSphere(10,18,20);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; glTranslatef(0,10,0);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; glScalef(1/1.5,1/0.3,1/0.3);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; glutSolidCube(12);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; //Tree&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; glColor3f(0,1,0);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; for(int c=-5;c&amp;lt;=10;c+=5)&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; glTranslatef(c,25,0);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; glScalef(1,0.8,1);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; glutSolidSphere(20,20,20);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; glScalef(1,1/0.8,1);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; glTranslatef(-c,-25,0);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now as we have code for all the objects we have to code the animation and bring it to display function.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;void trans()&lt;/div&gt;&lt;div&gt;{&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; if (yll&amp;lt;130)&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; yll+=1;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ylu+=1;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; yln+=1;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; else if(yrh&amp;gt;240)&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; yrh-=1;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; yre-=1;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; yrf-=1;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ye-=1;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; yrnc-=1;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; else if(yll&amp;lt;220)&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; yll+=1;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; else if(rlh&amp;lt;=560)&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; rlh+=1;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; rrh-=1;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; rla+=0.9;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; rra-=0.9;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; else if(rxa&amp;lt;=90)&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; rxa+=1;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tz-=2;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ty+=1.2;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; else&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; {&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; flag=1;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; rxa=0;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sx=1.3;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sy=0.5;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sz=1;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;All the code are easy to understand and make. Just download the code and see yourself.&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;What Can be improve?&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;As we know perfection is myth, hence we can improve this OpenGL projects as well. In future we can improve it with code reusability. With recursion and other techniques we can improve the coding as well reduce the compilation time. The projects can be implement in 3D which will make it more impressive. Addition of sound and lights will also mark improvement. We can add user interaction in the program.&amp;nbsp;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Conclusion&amp;nbsp;&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;After movie came many people think transformers(basically robot with Artificial Intelligence) may replace everything within the future. It&#39;s vital to understand about the transformers. The aim of this project is to point out the demonstration of working of transformers. This project demonstrates one among the simplest cartoon series of transformers, the project completely uses graphics and has been done using OpenGL. The code utilized in the program is extremely simple. we will easily understand the working of transformers by seeing the output of this project.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Minimum code is written to point out the animation in order that the programmers can easily understand and can be distributed with modification in the code as open source. With this OpenGL Computer Graphics Projects, you will learn the techniques that will helps in future endeavors.&amp;nbsp;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Video&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;
&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/1919Le8QOr8&quot; title=&quot;YouTube video player&quot; frameborder=&quot;0&quot; allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen&gt;&lt;/iframe&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;Source Code&lt;/h2&gt;
&lt;div class=&quot;download_code&quot;&gt;&lt;a class=&quot;btn_left&quot; href=&quot;https://github.com/Mahibabu1993/OpenGL-Project/blob/master/transformers.cpp&quot; target=&quot;_blank&quot;&gt;DOWNLOAD CODE&lt;/a&gt;&lt;a class=&quot;btn_left&quot; href=&quot;https://github.com/Mahibabu1993/OpenGL-Project&quot; target=&quot;_blank&quot;&gt;GITHUB&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.openglprojects.in/feeds/8566286234333889494/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.openglprojects.in/2021/05/transformers-opengl-computer-graphics-projects.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2020194800836807725/posts/default/8566286234333889494'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2020194800836807725/posts/default/8566286234333889494'/><link rel='alternate' type='text/html' href='http://www.openglprojects.in/2021/05/transformers-opengl-computer-graphics-projects.html' title='TRANSFORMERS - The OpenGL Computer Graphics Projects'/><author><name>Rajeev</name><uri>http://www.blogger.com/profile/03147189487850777395</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiI3BB3z2imVej1rzzyngdLYrgSunQSqqODhgUzIlhN-S7DCif25IHcExvVyOhyHBLRsbm_dwU5q0abVHWfSs9HX_eGkT2czIlegdr-e3VBL7BIjAeGKhcWHzJ_bV3DMpDNyF4zX77Y3KhB/s72-w400-h233-c/transformer+opengl+projects.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2020194800836807725.post-2549349672556733452</id><published>2021-03-29T00:51:00.045+05:30</published><updated>2021-03-31T23:53:58.609+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Complex Project"/><category scheme="http://www.blogger.com/atom/ns#" term="Rubiks Cube"/><title type='text'>Rubik&#39;s Cube OpenGL Computer Graphics Project</title><content type='html'>Are you looking for Rubik&#39;s Cube CG project with source code, then your search ends here. We are going to show you a great OpenGL Project, Rubik&#39;s Cube OpenGL Computer Graphics Project. Download the free source for mini projects with source code for your academic and the final year projects as well as any other semester projects. Just download the&amp;nbsp;Rubik&#39;s Cube C++ source code in OpenGL computer graphics and play around to make your own changes. Amend, play with the code and add your own source code that will make this project more interesting.&lt;div&gt;&lt;br /&gt;&lt;h2 style=&quot;text-align: left;&quot;&gt;What is Rubik&#39;s Cube?&lt;/h2&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The Rubik&#39;s Cube is a 3D puzzle discovered in the year 1974 by Hungarian sculptor Ernő Rubik. It was named as Magic Cube then. It slowly become one of the best selling toy. You can read more about the this interesting toy on the &lt;a href=&quot;https://en.wikipedia.org/wiki/Rubik&#39;s_Cube&quot;&gt;Wikipedia&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;Abstract&lt;/h4&gt;&lt;div&gt;In this blog post we are going to see, a complex opengl project to show and solve the puzzele of Rubik&#39;s Cube in OpenGL C++.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;The cubies are divided into three different types:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Centre Cubies:&lt;/div&gt;&lt;div&gt;The center cubies refer to the cubie pieces that are located at the center of each face of the Rubik&#39;s cube. There is a total of six cubies, and each has one facelet, they always stick in the same location corresponding to each other.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Corner Cubies:&lt;/div&gt;&lt;div&gt;The corner cubies refer to the cubic pieces that are located at the corner of the Rubik&#39;s cube. There is a total of eight corners, and each has three facelets.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Edge Cubies:&lt;/div&gt;&lt;div&gt;The edge cubies refer to the edge pieces that are located between each pair of the corresponding corners. There are 12 different edges in the Rubik&#39;s cube, and each has two Facelets.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;All cubes do not have the same color arrangements. The colors utilized for these illustrations is known as BOY (Blue, Orange, and Yellow, are faced in the clockwise direction). Here, you need to analyze the locations of the centers corresponding to each other, as this is always your color arrangements.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;White is located opposite to yellow.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Blue is located opposite to green.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Orange is located opposite red.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Orange is also located to the right of blue only if white is facing up.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;User Interaction&amp;nbsp;&lt;/h4&gt;&lt;div&gt;&lt;div&gt;1. The interaction between the windowing system and OPENGL is initiated.&lt;/div&gt;&lt;div&gt;We initialize the window size and window position.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;2. Display function is called where the functions and operations for the&lt;/div&gt;&lt;div&gt;Rubiks cube are defined.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;3. Using the left mouse button the cube can be rotated along the&lt;/div&gt;&lt;div&gt;required axis.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;4. Using the right mouse button menus can be viewed, by selecting the&lt;/div&gt;&lt;div&gt;options from the menu the required face of the cube can be rotated either&lt;/div&gt;&lt;div&gt;clockwise or anti-clockwise.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;5. The rotation of faces of the cube can also be done using keys from the&lt;/div&gt;&lt;div&gt;keyboard.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;6. Press the key ‘a’ to rotate the top face of the cube in the clockwise direction.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;7. Press the key ‘q’ to rotate the top face of the cube in the anti-clockwise&lt;/div&gt;&lt;div&gt;direction.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;8. Press the key ‘s’ to rotate the right face of the cube in the clockwise&lt;/div&gt;&lt;div&gt;direction.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;9. Press the key ‘w’ to rotate the right face of the cube in the anti-clockwise&lt;/div&gt;&lt;div&gt;direction.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;10. Press the key ‘d’ to rotate the front face of the cube in the clockwise&lt;/div&gt;&lt;div&gt;direction.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;11. Press the key ‘e’ to rotate the front face of the cube in the anti-clockwise&lt;/div&gt;&lt;div&gt;direction.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;12. Press the key ‘f’ to rotate the left face of the cube in the clockwise direction.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;13. Press the key ‘r’ to rotate the left face of the cube in the anti-clockwise&lt;/div&gt;&lt;div&gt;direction.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;14. Press the key ‘g’ to rotate the back face of the cube in the clockwise&lt;/div&gt;&lt;div&gt;direction.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;15. Press the key ‘t’ to rotate the back face of the cube in the anti-clockwise&lt;/div&gt;&lt;div&gt;direction.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;16. Press the key ‘h’ to rotate the bottom face of the cube in the clockwise&lt;/div&gt;&lt;div&gt;direction.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;17. Press the key ‘y’ to rotate the bottom face of the cube in the anti-clockwise&lt;/div&gt;&lt;div&gt;direction.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;19. Press the key ‘o’ for the automatic solving.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;20. Press the keys ‘m’ and ‘n’ to control the speed of rotation.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;21. Use the keys ‘1’,’2’,’4’,’5’,’6’,’8’,’9’ to rotate the cube along different axes.&lt;/div&gt;&lt;div&gt;Screen Shots&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;h3 style=&quot;text-align: left;&quot;&gt;Source Code&amp;nbsp;&lt;/h3&gt;&lt;div&gt;Want Source code write a email to us at openglprojects@gmail.com&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.openglprojects.in/feeds/2549349672556733452/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.openglprojects.in/2021/03/rubiks-cube-opengl-computer-graphics-projects.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2020194800836807725/posts/default/2549349672556733452'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2020194800836807725/posts/default/2549349672556733452'/><link rel='alternate' type='text/html' href='http://www.openglprojects.in/2021/03/rubiks-cube-opengl-computer-graphics-projects.html' title='Rubik&#39;s Cube OpenGL Computer Graphics Project'/><author><name>Rajeev</name><uri>http://www.blogger.com/profile/03147189487850777395</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2020194800836807725.post-7502325807771165015</id><published>2021-03-28T02:40:00.003+05:30</published><updated>2021-03-28T02:40:23.295+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><category scheme="http://www.blogger.com/atom/ns#" term="OpenGL ES"/><title type='text'>Getting Started with OpenGL ES for Android</title><content type='html'>&lt;p&gt;All Android devices have graphics processing unit (GPU), which used for handling the graphics processing. OpenGL is one of the API used in Android which support all devices, other is Vulkan which support only Android 7.0 and above. In this post we will getting stated with OpenGL ES for Android. This is simple Android OpenGL ES tutorial for beginners.&lt;/p&gt;&lt;p&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124; font-size: 36px;&quot;&gt;Prerequisite&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124;&quot;&gt;Before we get started with OpenGL ES Tutorial for Android, we should know about the prerequisite like pre-learning, software, tools, plugins required and other information and definition about graphics APIs.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;What is OpenGL ES?&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;span face=&quot;arial, sans-serif&quot; style=&quot;background-color: white; color: #202124;&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;As defined in our many posts, OpenGL is acronym of Open Graphics Library which is cross platform which means, platform-independent graphics API. OpenGL ES means OpenGL for Embedded Systems, API for computer graphics in embedded systems like mobile phones.&lt;/p&gt;&lt;p&gt;As we proceed further in this&amp;nbsp;&lt;span style=&quot;background-color: white; color: #202124;&quot;&gt;OpenGL ES Tutorial for Android, we assume that reader are aware of basics of Java, xml, Opengl and Android ecosystem. If you have some idea about Android you must have Android Studio installed which have Android SDK, AVD and all other tools required for Android App development.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;background-color: white; color: #202124;&quot;&gt;&lt;b&gt;Project Setup&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: #202124;&quot;&gt;Create a new project in android studio, name it OpenGLESTutorial choose basic template. Android&amp;nbsp; studio will create the all required code including&amp;nbsp;the java files and xml files.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: #202124;&quot;&gt;1. OpenGL ES Check&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: #202124;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;As we are working with OpenGL ES we need to &lt;a href=&quot;https://www.openglprojects.in/2015/07/how-to-check-if-android-device-supports-opengl-es-2.0.html&quot;&gt;check if android&amp;nbsp;device the support OpenGL ES 2.0&lt;/a&gt; or not.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class=&quot;line number10 index9 alt1&quot; style=&quot;background: none white; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #1a1a1a; direction: ltr; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px 1em 0px 0em; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;java keyword&quot; style=&quot;background: none; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; font-weight: bold; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;final&lt;/code&gt; &lt;code class=&quot;java plain&quot; style=&quot;background: none; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;ConfigurationInfo configurationInfo = activityManager.getDeviceConfigurationInfo();&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number11 index10 alt2&quot; style=&quot;background: none white; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #1a1a1a; direction: ltr; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px 1em 0px 0em; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;java spaces&quot; style=&quot;background: none; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;java keyword&quot; style=&quot;background: none; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; font-weight: bold; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;final&lt;/code&gt; &lt;code class=&quot;java keyword&quot; style=&quot;background: none; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; font-weight: bold; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;boolean&lt;/code&gt; &lt;code class=&quot;java plain&quot; style=&quot;background: none; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;supportsEs2 = configurationInfo.reqGlEsVersion &amp;gt;= &lt;/code&gt;&lt;code class=&quot;java value&quot; style=&quot;background: none; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #009900; direction: ltr; display: inline; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;0x20000&lt;/code&gt;&lt;code class=&quot;java plain&quot; style=&quot;background: none; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;;&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number12 index11 alt1&quot; style=&quot;background: none white; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #1a1a1a; direction: ltr; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px 1em 0px 0em; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;line number13 index12 alt2&quot; style=&quot;background: none white; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #1a1a1a; direction: ltr; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px 1em 0px 0em; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;java spaces&quot; style=&quot;background: none; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;java keyword&quot; style=&quot;background: none; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; font-weight: bold; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;if&lt;/code&gt; &lt;code class=&quot;java plain&quot; style=&quot;background: none; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;(supportsEs2)&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number14 index13 alt1&quot; style=&quot;background: none white; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #1a1a1a; direction: ltr; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px 1em 0px 0em; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;java spaces&quot; style=&quot;background: none; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;java plain&quot; style=&quot;background: none; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;{&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number15 index14 alt2&quot; style=&quot;background: none white; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #1a1a1a; direction: ltr; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px 1em 0px 0em; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;java spaces&quot; style=&quot;background: none; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;java comments&quot; style=&quot;background: none; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #008200; direction: ltr; display: inline; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;// Request an OpenGL ES 2.0 compatible context.&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number16 index15 alt1&quot; style=&quot;background: none white; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #1a1a1a; direction: ltr; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px 1em 0px 0em; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;java spaces&quot; style=&quot;background: none; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;java plain&quot; style=&quot;background: none; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;mGLSurfaceView.setEGLContextClientVersion(&lt;/code&gt;&lt;code class=&quot;java value&quot; style=&quot;background: none; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #009900; direction: ltr; display: inline; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;2&lt;/code&gt;&lt;code class=&quot;java plain&quot; style=&quot;background: none; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;);&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number17 index16 alt2&quot; style=&quot;background: none white; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #1a1a1a; direction: ltr; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px 1em 0px 0em; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;line number18 index17 alt1&quot; style=&quot;background: none white; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #1a1a1a; direction: ltr; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px 1em 0px 0em; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;java spaces&quot; style=&quot;background: none; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;java comments&quot; style=&quot;background: none; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #008200; direction: ltr; display: inline; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;// Set the renderer to our demo renderer, defined below.&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number19 index18 alt2&quot; style=&quot;background: none white; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #1a1a1a; direction: ltr; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px 1em 0px 0em; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;java spaces&quot; style=&quot;background: none; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;java plain&quot; style=&quot;background: none; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;mGLSurfaceView.setRenderer(&lt;/code&gt;&lt;code class=&quot;java keyword&quot; style=&quot;background: none; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; font-weight: bold; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;new&lt;/code&gt; &lt;code class=&quot;java plain&quot; style=&quot;background: none; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;LessonOneRenderer());&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number20 index19 alt1&quot; style=&quot;background: none white; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #1a1a1a; direction: ltr; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px 1em 0px 0em; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;java spaces&quot; style=&quot;background: none; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;java plain&quot; style=&quot;background: none; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;}&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number21 index20 alt2&quot; style=&quot;background: none white; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #1a1a1a; direction: ltr; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px 1em 0px 0em; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;java spaces&quot; style=&quot;background: none; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;java keyword&quot; style=&quot;background: none; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; font-weight: bold; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;else&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number22 index21 alt1&quot; style=&quot;background: none white; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #1a1a1a; direction: ltr; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px 1em 0px 0em; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;java spaces&quot; style=&quot;background: none; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;java plain&quot; style=&quot;background: none; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;{&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number23 index22 alt2&quot; style=&quot;background: none white; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #1a1a1a; direction: ltr; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px 1em 0px 0em; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;java spaces&quot; style=&quot;background: none; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;java comments&quot; style=&quot;background: none; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #008200; direction: ltr; display: inline; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;// This is where you could create an OpenGL ES 1.x compatible&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number24 index23 alt1&quot; style=&quot;background: none white; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #1a1a1a; direction: ltr; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px 1em 0px 0em; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;java spaces&quot; style=&quot;background: none; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;java comments&quot; style=&quot;background: none; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #008200; direction: ltr; display: inline; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;// renderer if you wanted to support both ES 1 and ES 2.&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number25 index24 alt2&quot; style=&quot;background: none white; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #1a1a1a; direction: ltr; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px 1em 0px 0em; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;java spaces&quot; style=&quot;background: none; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;java keyword&quot; style=&quot;background: none; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #006699; direction: ltr; display: inline; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; font-weight: bold; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;return&lt;/code&gt;&lt;code class=&quot;java plain&quot; style=&quot;background: none; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;;&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number26 index25 alt1&quot; style=&quot;background: none white; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #1a1a1a; direction: ltr; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px 1em 0px 0em; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;java spaces&quot; style=&quot;background: none; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;java plain&quot; style=&quot;background: none; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;}&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number27 index26 alt2&quot; style=&quot;background: none white; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #1a1a1a; direction: ltr; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px 1em 0px 0em; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;line number28 index27 alt1&quot; style=&quot;background: none white; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #1a1a1a; direction: ltr; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px 1em 0px 0em; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;java spaces&quot; style=&quot;background: none; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; display: inline; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class=&quot;java plain&quot; style=&quot;background: none; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;setContentView(mGLSurfaceView);&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number28 index27 alt1&quot; style=&quot;background: none white; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #1a1a1a; direction: ltr; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px 1em 0px 0em; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;java plain&quot; style=&quot;background: none; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;br /&gt;&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number28 index27 alt1&quot; style=&quot;background: none white; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #1a1a1a; direction: ltr; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px 1em 0px 0em; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;java plain&quot; style=&quot;background: none; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;br /&gt;&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number28 index27 alt1&quot; style=&quot;background: none white; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #1a1a1a; direction: ltr; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px 1em 0px 0em; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;java plain&quot; style=&quot;background: none; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;br /&gt;&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number28 index27 alt1&quot; style=&quot;background: none white; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px 1em 0px 0em; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;span style=&quot;background-color: transparent;&quot;&gt;Earlier Android emulator does not support OpenGL ES 2.0, to test real device was required, but now now Android emulator does support&amp;nbsp;&lt;/span&gt;OpenGL ES 2.0. Hence we can test our tutorial on&amp;nbsp;&lt;span style=&quot;background-color: transparent;&quot;&gt;the&amp;nbsp;&lt;/span&gt;Android emulator as well as real Android phones.&lt;span style=&quot;background-color: transparent;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number28 index27 alt1&quot; style=&quot;background: none white; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px 1em 0px 0em; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;span style=&quot;background-color: transparent;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number28 index27 alt1&quot; style=&quot;background: none white; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px 1em 0px 0em; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;span style=&quot;background-color: transparent;&quot;&gt;Moreover, to stop Android user who don&#39;t have phone/device supporting OpenGL ES Version,&amp;nbsp;&lt;/span&gt;&amp;lt;uses-feature&amp;gt; tag need to be added in the project &amp;lt;uses-feature&amp;gt; tag. Add the following code in AndroidManifest.xml file.&lt;/div&gt;&lt;div class=&quot;line number28 index27 alt1&quot; style=&quot;background: none white; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px 1em 0px 0em; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;pre style=&quot;font-family: Consolas, monospace; font-size: 9.8pt;&quot;&gt;&amp;lt;&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;uses-feature &lt;/span&gt;&lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: blue; font-weight: bold;&quot;&gt;:glEsVersion&lt;/span&gt;&lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;=&quot;0x00020000&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: blue; font-weight: bold;&quot;&gt;:required&lt;/span&gt;&lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;=&quot;true&quot; &lt;/span&gt;/&amp;gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;line number28 index27 alt1&quot; style=&quot;background: none white; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px 1em 0px 0em; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;span style=&quot;background-color: transparent;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number28 index27 alt1&quot; style=&quot;background: none white; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px 1em 0px 0em; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;span style=&quot;background-color: transparent;&quot;&gt;2. Create Class&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number28 index27 alt1&quot; style=&quot;background: none white; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px 1em 0px 0em; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;span style=&quot;background-color: transparent;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number28 index27 alt1&quot; style=&quot;background: none white; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px 1em 0px 0em; position: static; vertical-align: baseline; width: auto;&quot;&gt;First create a class name&amp;nbsp;&lt;span style=&quot;font-family: Consolas, monospace; font-size: 9.8pt;&quot;&gt;OpenGLView Overide the class with&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; font-family: Consolas, monospace; font-size: 9.8pt;&quot;&gt;GLSurfaceView&lt;/span&gt;&lt;span style=&quot;font-family: Consolas, monospace; font-size: 9.8pt;&quot;&gt;. Add all the overide methord. Create init methord as shown below.&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number28 index27 alt1&quot; style=&quot;background: none white; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px 1em 0px 0em; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;span style=&quot;font-family: Consolas, monospace; font-size: 9.8pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number28 index27 alt1&quot; style=&quot;background: none white; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px 1em 0px 0em; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;pre style=&quot;font-family: Consolas, monospace; font-size: 9.8pt;&quot;&gt;&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;public class &lt;/span&gt;OpenGLView &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;extends &lt;/span&gt;GLSurfaceView {&lt;br /&gt;&lt;br /&gt;    &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;public &lt;/span&gt;OpenGLView(Context context) {&lt;br /&gt;        &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;super&lt;/span&gt;(context);&lt;br /&gt;        init();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;public &lt;/span&gt;OpenGLView(Context context, AttributeSet attrs) {&lt;br /&gt;        &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;super&lt;/span&gt;(context, attrs);&lt;br /&gt;        init();&lt;br /&gt;    }&lt;br /&gt;    &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;private void &lt;/span&gt;init(){&lt;br /&gt;        setEGLContextClientVersion(&lt;span style=&quot;color: blue;&quot;&gt;2&lt;/span&gt;);&lt;br /&gt;        setPreserveEGLContextOnPause(&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;true&lt;/span&gt;);&lt;br /&gt;        setRenderer(&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;new &lt;/span&gt;OpenGLRenderer());&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;line number28 index27 alt1&quot; style=&quot;background: none white; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #1a1a1a; direction: ltr; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px 1em 0px 0em; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;java plain&quot; style=&quot;background: none; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;pre style=&quot;font-family: Consolas, monospace; font-size: 9.8pt;&quot;&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: Consolas, monospace; font-size: 9.8pt;&quot;&gt;Now create a class OpenGLRenderer and implement interface GLSurfaceView.Renderer and write all methord.&lt;/pre&gt;&lt;pre style=&quot;font-family: Consolas, monospace; font-size: 9.8pt;&quot;&gt;&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;public class &lt;/span&gt;OpenGLRenderer &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;implements &lt;/span&gt;GLSurfaceView.Renderer {&lt;br /&gt;    &lt;span style=&quot;color: olive;&quot;&gt;@Override&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: olive;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;public void &lt;/span&gt;onSurfaceCreated(GL10 gl, EGLConfig config) {&lt;br /&gt;        GLES20.&lt;span style=&quot;font-style: italic;&quot;&gt;glClearColor&lt;/span&gt;(&lt;span style=&quot;color: blue;&quot;&gt;1f&lt;/span&gt;,&lt;span style=&quot;color: blue;&quot;&gt;0&lt;/span&gt;,&lt;span style=&quot;color: blue;&quot;&gt;0&lt;/span&gt;,&lt;span style=&quot;color: blue;&quot;&gt;1f&lt;/span&gt;);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span style=&quot;color: olive;&quot;&gt;@Override&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: olive;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;public void &lt;/span&gt;onSurfaceChanged(GL10 gl, &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;int &lt;/span&gt;width, &lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;int &lt;/span&gt;height) {&lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span style=&quot;color: olive;&quot;&gt;@Override&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: olive;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;public void &lt;/span&gt;onDrawFrame(GL10 gl) {&lt;br /&gt;        GLES20.&lt;span style=&quot;font-style: italic;&quot;&gt;glClear&lt;/span&gt;(GLES20.&lt;span style=&quot;color: #660e7a; font-style: italic; font-weight: bold;&quot;&gt;GL_COLOR_BUFFER_BIT&lt;/span&gt;);&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number28 index27 alt1&quot; style=&quot;background: none white; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #1a1a1a; direction: ltr; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px 1em 0px 0em; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;java plain&quot; style=&quot;background: none; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium; white-space: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;div class=&quot;line number28 index27 alt1&quot; style=&quot;background: none white; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #1a1a1a; direction: ltr; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px 1em 0px 0em; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;code class=&quot;java plain&quot; style=&quot;background: none; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: black; direction: ltr; display: inline; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 1em; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium; white-space: normal;&quot;&gt;3&lt;/span&gt;&lt;/code&gt;&lt;span style=&quot;background-color: initial; color: black; font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium; white-space: normal;&quot;&gt;. Main Activity XML&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number28 index27 alt1&quot; style=&quot;background: none white; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; color: #1a1a1a; direction: ltr; float: none; font-family: Monaco, Consolas, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px 1em 0px 0em; position: static; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;span style=&quot;background-color: initial; color: black; font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium; white-space: normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;line number28 index27 alt1&quot; style=&quot;background: none white; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px 1em 0px 0em; position: static; vertical-align: baseline; width: auto;&quot;&gt;In activity_main layout create an widget for creating canvas. Add the following code-&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;line number28 index27 alt1&quot; style=&quot;background: none white; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px 1em 0px 0em; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;line number28 index27 alt1&quot; style=&quot;background: none white; border-radius: 0px; border: 0px; box-shadow: none; box-sizing: content-box; direction: ltr; float: none; height: auto; inset: auto; line-height: 1.1em; margin: 0px; outline: 0px; overflow: visible; padding: 0px 1em 0px 0em; position: static; vertical-align: baseline; width: auto;&quot;&gt;&lt;pre style=&quot;font-family: Consolas, monospace; font-size: 9.8pt;&quot;&gt;&amp;lt;&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;com.india.myapplication.OpenGLView&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: navy; font-weight: bold;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: blue; font-weight: bold;&quot;&gt;:id&lt;/span&gt;&lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;=&quot;@+id/openglview&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: blue; font-weight: bold;&quot;&gt;:layout_height&lt;/span&gt;&lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;=&quot;match_parent&quot;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;android&lt;/span&gt;&lt;span style=&quot;color: blue; font-weight: bold;&quot;&gt;:layout_width&lt;/span&gt;&lt;span style=&quot;color: green; font-weight: bold;&quot;&gt;=&quot;match_parent&quot;&lt;/span&gt;/&amp;gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: Consolas, monospace; font-size: 9.8pt;&quot;&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: Consolas, monospace; font-size: 9.8pt;&quot;&gt;Now call the widget in Main Activity class&lt;/pre&gt;&lt;pre style=&quot;font-family: Consolas, monospace; font-size: 9.8pt;&quot;&gt;OpenGLView &lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;openGLView&lt;/span&gt;;&lt;/pre&gt;&lt;pre style=&quot;font-family: Consolas, monospace; font-size: 9.8pt;&quot;&gt;Initalize the OpenGL View in main activity class&lt;/pre&gt;&lt;pre style=&quot;font-family: Consolas, monospace; font-size: 9.8pt;&quot;&gt;&lt;span style=&quot;color: #660e7a; font-weight: bold;&quot;&gt;openGLView &lt;/span&gt;=(OpenGLView) findViewById(R.id.&lt;span style=&quot;color: #660e7a; font-style: italic; font-weight: bold;&quot;&gt;openglview&lt;/span&gt;);&lt;/pre&gt;&lt;pre style=&quot;font-family: Consolas, monospace; font-size: 9.8pt;&quot;&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: Consolas, monospace; font-size: 9.8pt;&quot;&gt;Now the app, test it on emulator or on real device. You will see a red color surface which is rendered by OpenGL ES. &lt;/pre&gt;&lt;pre style=&quot;font-family: Consolas, monospace; font-size: 9.8pt;&quot;&gt;You can change the color of surface by changing in the -  GLES20.&lt;span style=&quot;font-size: 9.8pt; font-style: italic;&quot;&gt;glClearColor&lt;/span&gt;&lt;span style=&quot;font-size: 9.8pt;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: 9.8pt;&quot;&gt;1f&lt;/span&gt;&lt;span style=&quot;font-size: 9.8pt;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: 9.8pt;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;font-size: 9.8pt;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: 9.8pt;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;font-size: 9.8pt;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: 9.8pt;&quot;&gt;1f&lt;/span&gt;&lt;span style=&quot;font-size: 9.8pt;&quot;&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;font-family: Consolas, monospace; font-size: 9.8pt;&quot;&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.openglprojects.in/feeds/7502325807771165015/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.openglprojects.in/2021/03/getting-started-with-opengl-es-for-android-opengl-es-android-tutorial.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2020194800836807725/posts/default/7502325807771165015'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2020194800836807725/posts/default/7502325807771165015'/><link rel='alternate' type='text/html' href='http://www.openglprojects.in/2021/03/getting-started-with-opengl-es-for-android-opengl-es-android-tutorial.html' title='Getting Started with OpenGL ES for Android'/><author><name>Rajeev</name><uri>http://www.blogger.com/profile/03147189487850777395</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2020194800836807725.post-184800815388313713</id><published>2020-05-22T23:22:00.002+05:30</published><updated>2020-05-22T23:41:37.558+05:30</updated><title type='text'>वट सावित्री व्रत ओपनजीएल प्रोजेक्ट्स</title><content type='html'>&lt;h1 style=&quot;background-color: white; font-stretch: inherit; line-height: 20px; padding: 0px 0px 10px; text-align: left;&quot;&gt;&lt;font color=&quot;#6b6b6b&quot; face=&quot;mangal, arial, helvetica, sans-serif&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgS4J-Vajq5Pj34gKufiqNumbsMHDz9n5nBEJ2Gn-wiryStF5S4AIysNeWfu2qxD0HL5yZay0GQPmQA7C25wevLC-i5DnJIyB-Ew7S9YtvQPq3oyH9aXubObo_9KWYPgso_F7v3UuDEvJhW/&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;451&quot; data-original-width=&quot;679&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgS4J-Vajq5Pj34gKufiqNumbsMHDz9n5nBEJ2Gn-wiryStF5S4AIysNeWfu2qxD0HL5yZay0GQPmQA7C25wevLC-i5DnJIyB-Ew7S9YtvQPq3oyH9aXubObo_9KWYPgso_F7v3UuDEvJhW/s320/images+%25282%2529.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style=&quot;font-size: 15px; font-weight: 400;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/h1&gt;&lt;h1 style=&quot;background-color: white; font-stretch: inherit; line-height: 20px; padding: 0px 0px 10px; text-align: left;&quot;&gt;&lt;font color=&quot;#6b6b6b&quot; face=&quot;mangal, arial, helvetica, sans-serif&quot;&gt;&lt;span style=&quot;font-size: 15px; font-weight: 400;&quot;&gt;वट&lt;/span&gt;&lt;/font&gt;सावित्री व्रत&lt;/h1&gt;&lt;h2 class=&quot;synopsis&quot; style=&quot;background-color: white; color: #6b6b6b; font-family: mangal, arial, helvetica, sans-serif; font-size: 15px; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; font-weight: 400; line-height: 20px; padding: 0px 0px 10px;&quot;&gt;इस दिन वट यानी बरगद के पेड़ की पूजा की जाती है। कहा जाता है कि वट वृक्ष की जड़ों में ब्रह्मा, तने में भगवान विष्णु व डालियों व पत्तियों में भगवान शिव का निवास स्थान माना जाता है। व्रत रखने वालों को मां सावित्री और सत्यवान की कथा पढ़ना या सुनना जरूरी होता है।&lt;/h2&gt;&lt;div&gt;यह व्रत विशेषकर विवाहित महिलाओं के द्वारा अखंड सौभाग्य का आशीर्वाद पाने के लिए रखा जाता है। धार्मिक मान्यता के अनुसार, यदि कोई शादीशुदा महिला इस व्रत को सच्चे मन से करती है तो उसका पति दीर्घायु होता है। हिन्दू पंचांग के अनुसार यह व्रत हर साल ज्येष्ठ माह की अमावस्या तिथि के दिन रखा जाता है। आइए जानते हैं इस व्रत का शुभ मुहूर्त और व्रत विधि।&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;h2 class=&quot;synopsis&quot;&gt;मान्यता है कि इस दिन माता सावित्री ने अपने दृढ़ संकल्प और श्रद्धा से यमराज द्वारा अपने मृत पति सत्यवान के प्राण वापस पाए। इसलिए महिलाओं के लिए ये व्रत बेहद ही फलदायी माना जाता है।&lt;/h2&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;यह प्रोजेक्ट शीघ्र ही प्रकाशित होनेवाली है।&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.openglprojects.in/feeds/184800815388313713/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.openglprojects.in/2020/05/vat-savitri-brat-opengl-computer-graphics-projects.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2020194800836807725/posts/default/184800815388313713'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2020194800836807725/posts/default/184800815388313713'/><link rel='alternate' type='text/html' href='http://www.openglprojects.in/2020/05/vat-savitri-brat-opengl-computer-graphics-projects.html' title='वट सावित्री व्रत ओपनजीएल प्रोजेक्ट्स'/><author><name>Rajeev</name><uri>http://www.blogger.com/profile/03147189487850777395</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgS4J-Vajq5Pj34gKufiqNumbsMHDz9n5nBEJ2Gn-wiryStF5S4AIysNeWfu2qxD0HL5yZay0GQPmQA7C25wevLC-i5DnJIyB-Ew7S9YtvQPq3oyH9aXubObo_9KWYPgso_F7v3UuDEvJhW/s72-c/images+%25282%2529.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2020194800836807725.post-1745387266022222641</id><published>2020-03-30T22:27:00.000+05:30</published><updated>2020-03-30T22:27:29.277+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Electromagnetic induction"/><category scheme="http://www.blogger.com/atom/ns#" term="Physics Projects"/><title type='text'>Electromagnetic induction demo with opengl graphic program</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Electromagnetic induction or magnetic induction or simply induction is process in which electric current or voltage is passed through a conductor when it is placed in postion around varying magnetic field. Induction also produce current when a conducting material constantly moves around a static magnetic field. The current run through conducting material due to electromagnetic force. Michael Faraday has been credited for discoverey of&amp;nbsp; Law of Induction in 1831. The laws is now called Faraday laws of Electromagnetic induction. We are going demo with help of computer graphics how Electromagnetic induction work. The graphic will be coded in c++ with opengl graphic library.&lt;/div&gt;
&lt;/div&gt;
&lt;h2&gt;
&lt;/h2&gt;
&lt;ul&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;Abstract&lt;/b&gt;&lt;/h2&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
With help of opengl program computer graphics we are going to demo the&amp;nbsp;&lt;span style=&quot;text-align: justify;&quot;&gt;Electromagnetic induction.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKvnsBvcmjl6piZsAqkkIbhOaSpuQAj0w8G-HyFUl4h1CKH7-WzXPAH3Cfp4y9wd2001sk_IjZvNdCcTv0CAlun3EATYxmTopL6Bc7a_KkqXsIlOxb22L5f7w_4c45rLMRemVdfrEdylVi/s1600/1585507483762196-0.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;
    &lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKvnsBvcmjl6piZsAqkkIbhOaSpuQAj0w8G-HyFUl4h1CKH7-WzXPAH3Cfp4y9wd2001sk_IjZvNdCcTv0CAlun3EATYxmTopL6Bc7a_KkqXsIlOxb22L5f7w_4c45rLMRemVdfrEdylVi/s1600/1585507483762196-0.png&quot; width=&quot;400&quot; /&gt;
  &lt;/a&gt;
&lt;/div&gt;
&lt;span style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;text-align: justify;&quot;&gt;Faraday laws of Electromagnetic induction.&lt;/span&gt;&lt;/h2&gt;
&lt;/div&gt;
Before we get into details of the program first you need to understand what&amp;nbsp;&lt;span style=&quot;text-align: justify;&quot;&gt;Faraday laws of Electromagnetic induction is all about. This will help us in properly demo the&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;text-align: justify;&quot;&gt;Electromagnetic induction with opengl program graphically.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background: rgb(255 , 255 , 255); border: 0px; box-sizing: border-box; font-family: &amp;quot;karla&amp;quot;; font-size: 16px; letter-spacing: -0.36px; margin: 0px; outline: 0px; padding: 0px;&quot;&gt;There are two faraday&#39;s law of electromagnetic induction as stated below -&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;background: rgb(255 , 255 , 255); border: 0px; box-sizing: border-box; font-family: &amp;quot;karla&amp;quot;; font-size: 16px; letter-spacing: -0.36px; margin: 0px; outline: 0px; padding: 0px;&quot;&gt;&lt;b&gt;First law :&lt;/b&gt;&amp;nbsp;change in magnetic flux linked with a closed coil, an induced emfis&amp;nbsp; produced and current flows through the coil. This induced e.m.f. remains till the flux changes.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Second law :&amp;nbsp;&lt;/b&gt;The induced emf in a coil is equal to the rate of change of flux linkage.&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
There are many things like equation, maxwell farady law, Lenz law, right thumb rule but we will not focus on them.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
There are many application of&amp;nbsp;&amp;nbsp;&lt;span style=&quot;text-align: justify;&quot;&gt;Electromagnetic induction&amp;nbsp;&lt;/span&gt;including electrical components such as inductors and transformers, and devices such as electric motors and generators. The ATM swipe in pos also use the Electromagnetic induction.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h2 style=&quot;text-align: justify;&quot;&gt;
Description of opengl program&lt;/h2&gt;
&lt;div&gt;
Our opengl program demo&amp;nbsp;&lt;span style=&quot;text-align: justify;&quot;&gt;Electromagnetic induction graphically. We are going to code the program with user interface.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;text-align: justify;&quot;&gt;The opengl program will create two basic model one for static magnet another for rotating magnet. First a wireframe cylinder is needed which will act as conductor or coil. This coil then attached to spherical object which is bulb. A rectangular magnet is also designed. When magnet is place in coil the emf is produced and bulb glows as current runs in coil. Color of sphere is black when there is no current and for current same will change to yellow.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;text-align: justify;&quot;&gt;In another scenario we will rotate magnet and produce current. Rapid movement of magnet can be shown using pencils like cone with rectangular middle.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;text-align: justify;&quot;&gt;User Interface&lt;/span&gt;&lt;/h2&gt;
&lt;div&gt;
&lt;span style=&quot;text-align: justify;&quot;&gt;Following keyboard interface and functionity as given below is used in this opengl program -&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;text-align: justify;&quot;&gt;&#39;S/s&#39; key - start the program&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;text-align: justify;&quot;&gt;&#39;M/m&#39; key - move the magnet&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;text-align: justify;&quot;&gt;&#39;T/t&#39; key - toggle&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;text-align: justify;&quot;&gt;&#39;F/f&#39; key - increase the flow&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;text-align: justify;&quot;&gt;&#39;Esc/e/E&#39; key - to exit any time.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;text-align: justify;&quot;&gt;Email us @ openglprojects@gmail.com for source code and reports.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://www.openglprojects.in/feeds/1745387266022222641/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.openglprojects.in/2020/03/electromagnetic-induction-demo-opengl-program.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2020194800836807725/posts/default/1745387266022222641'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2020194800836807725/posts/default/1745387266022222641'/><link rel='alternate' type='text/html' href='http://www.openglprojects.in/2020/03/electromagnetic-induction-demo-opengl-program.html' title='Electromagnetic induction demo with opengl graphic program'/><author><name>Rajeev</name><uri>http://www.blogger.com/profile/03147189487850777395</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKvnsBvcmjl6piZsAqkkIbhOaSpuQAj0w8G-HyFUl4h1CKH7-WzXPAH3Cfp4y9wd2001sk_IjZvNdCcTv0CAlun3EATYxmTopL6Bc7a_KkqXsIlOxb22L5f7w_4c45rLMRemVdfrEdylVi/s72-c/1585507483762196-0.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2020194800836807725.post-6790993100372340757</id><published>2019-01-14T23:05:00.001+05:30</published><updated>2019-01-15T00:55:21.456+05:30</updated><title type='text'>The Classroom CG lab Programs VTU</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h3&gt;
Preface&amp;nbsp;&lt;/h3&gt;
&lt;div&gt;
OpenGL is used in the CG lab Programs VTU 6th SEM for learning the graphics. The aim of this blog is to give as much exposure to students so they can learn create and explore the new ideas of implementing the Computer graphics.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
We have share many projects with free source code. We have also provided the free &lt;a href=&quot;https://www.openglprojects.in/search/label/Tutorial&quot;&gt;opengl tutorials&lt;/a&gt; in our blog. We have shre multiple programs snippets of c/c++ source code in OpenGL. There are many simple projects that can be used for large program with some library based program that can be complex in nature. With the same aim we have come up a program that act as the first part of our complex journey. We name the Program as&amp;nbsp; - &quot;The Classroom&quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpjLfRHxs4ZRNzU5aSQPp3uzu3_BZJQOLTH2Rs4H5oenomTcF71clyKgcOYJXCHtWSqx0f7HJJEzWAaUNNM5xLil5lMadcSIiVZv3F0P9mBSAYgNiVe4z6jOMXFWv_hyCtigXQG6zAsIxN/s1600/The+Classroom+CG+lab+Programs+VTU+6th+SEM.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;734&quot; data-original-width=&quot;907&quot; height=&quot;322&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpjLfRHxs4ZRNzU5aSQPp3uzu3_BZJQOLTH2Rs4H5oenomTcF71clyKgcOYJXCHtWSqx0f7HJJEzWAaUNNM5xLil5lMadcSIiVZv3F0P9mBSAYgNiVe4z6jOMXFWv_hyCtigXQG6zAsIxN/s400/The+Classroom+CG+lab+Programs+VTU+6th+SEM.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
Introduction&lt;/h3&gt;
&lt;/div&gt;
&lt;div&gt;
The Classroom CG lab Programs for VTU 6th SEM student comprised of showing jouney of education when we all are child and start learning the basics. This program will show the graphical representation of the the classroom where a teacher try to teaches student &quot;A for apple B for Ball ...&quot;.&lt;/div&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
Components&lt;/h3&gt;
&lt;div&gt;
CG lab Programs which&amp;nbsp; we have come up with have so many components or functions. These functions are basically code for small objects like roof, floor, blackboard tube light etc. Different parts of the classroom have different functions to create the objects.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
We have created the lady teachers by using the different objects. Like the face we have used the circle to draw it. Similarly the hair we use the semi circle (created code for it). The other parts like nose we have use the lines and vertices with proper coordinates.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
There are four kids which are facing towards the teachers has been rendered in this&amp;nbsp;The Classroom CG lab Programs VTU 6th SEM. We have created two benches and each benches consist of two students.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
There is dark mode of the program where you can switch off the tubelight and whole class would be in dark.&lt;/div&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
User Interactions&lt;/h3&gt;
&lt;div&gt;
n - to continues form start screen and proceed to next.&lt;/div&gt;
&lt;div&gt;
b- back to previous screen&lt;/div&gt;
&lt;div&gt;
r- restart the screen&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
Video Demo&lt;/h3&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;iframe allow=&quot;accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/YJrYP4-0muE&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
Source Code&lt;/h3&gt;
&lt;div&gt;
To get the source code write to openglprojects@gmail.com with the project title.&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://www.openglprojects.in/feeds/6790993100372340757/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.openglprojects.in/2019/01/the-classroom-cg-lab-programs-vtu-6th-sem.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2020194800836807725/posts/default/6790993100372340757'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2020194800836807725/posts/default/6790993100372340757'/><link rel='alternate' type='text/html' href='http://www.openglprojects.in/2019/01/the-classroom-cg-lab-programs-vtu-6th-sem.html' title='The Classroom CG lab Programs VTU'/><author><name>Rajeev</name><uri>http://www.blogger.com/profile/03147189487850777395</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpjLfRHxs4ZRNzU5aSQPp3uzu3_BZJQOLTH2Rs4H5oenomTcF71clyKgcOYJXCHtWSqx0f7HJJEzWAaUNNM5xLil5lMadcSIiVZv3F0P9mBSAYgNiVe4z6jOMXFWv_hyCtigXQG6zAsIxN/s72-c/The+Classroom+CG+lab+Programs+VTU+6th+SEM.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2020194800836807725.post-8607387049190657900</id><published>2018-08-26T00:28:00.002+05:30</published><updated>2018-08-26T00:28:18.009+05:30</updated><title type='text'>OpenGL Chess Board in C++ with Source Code</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Chess is interesting game with 8X8 checker of black and white. Hence we are going to see a program in OpenGL that implement Chess Board in C++ with free Source Code.&lt;br /&gt;
&lt;br /&gt;
This program implements with the three functions:&lt;br /&gt;
&lt;br /&gt;
1. Init function - this initalise the opengl program.&lt;br /&gt;
2. Chess Boards - this calculate the chess and sqaure and draw the same in the screen.&lt;br /&gt;
3.&amp;nbsp; Main function - this is the must and common program for each and every oepngl program.&lt;br /&gt;
&lt;br /&gt;
chessboard() this function is used for the calculation of the end point of the cordinates of the box to make and is also mainly responsible for calling the drawSquare()&lt;br /&gt;
It is also a display function which is called from the main function which is responsible for sending graphics to the display window.&lt;br /&gt;
&lt;br /&gt;
The forming of boxes is made through iterating first of all from 1st row and making 1st column then 2nd and then till 8th column as a single chessbord contains 8 column.&lt;br /&gt;
&lt;br /&gt;
The similiar above operation is repeated till all the 8 rows have been iterated making a total 64 boxes (8 rows and 8 column).&lt;br /&gt;
&lt;br /&gt;
The finally the chessboard() function contains a opengl glFlush()&amp;nbsp; which process all opengl routine as quickly as possible means it flushes all the matter on the display window for the next display.&lt;br /&gt;
&lt;br /&gt;
This similar to our earlier &lt;a href=&quot;https://www.openglprojects.in/2013/02/chess-board-in-opengl-computer-graphics.html#gsc.tab=0&quot;&gt;chess board opengl program&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiO15KN_5rep-dCs1TK0e7cXZZ4I1Yz9d5kQELQnlM-3MtVEuUzg3wS3yabc3BG8_u3r4-f-vsRpMcH3Jp3r2VSVCC-AtRITenuwKt4yB7Ab6fDPVx0r-JBmHRl0i_PXG1iJNhdLgeF62Ou/s1600/openGL_chess_Board.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;530&quot; data-original-width=&quot;680&quot; height=&quot;249&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiO15KN_5rep-dCs1TK0e7cXZZ4I1Yz9d5kQELQnlM-3MtVEuUzg3wS3yabc3BG8_u3r4-f-vsRpMcH3Jp3r2VSVCC-AtRITenuwKt4yB7Ab6fDPVx0r-JBmHRl0i_PXG1iJNhdLgeF62Ou/s320/openGL_chess_Board.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
USE OF THE PROGRAM:&lt;/h3&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; The program&amp;nbsp;OpenGL Chess Board in C++ can be use in the chess board game as well as in making the floor of the house or any other structure.&lt;br /&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
Source Code :&amp;nbsp;&lt;/h3&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
#include&amp;lt;windows.h&amp;gt;&lt;/div&gt;
&lt;div&gt;
#include&amp;lt;glut.h&amp;gt;&lt;/div&gt;
&lt;div&gt;
int c = 0;&lt;/div&gt;
&lt;div&gt;
void init()&lt;/div&gt;
&lt;div&gt;
{&lt;/div&gt;
&lt;div&gt;
// For displaying the window color&lt;/div&gt;
&lt;div&gt;
glClearColor(0, 1, 1, 0);&lt;/div&gt;
&lt;div&gt;
// Choosing the type of projection&lt;/div&gt;
&lt;div&gt;
glMatrixMode(GL_PROJECTION);&lt;/div&gt;
&lt;div&gt;
// for setting the transformation which here is 2D&lt;/div&gt;
&lt;div&gt;
gluOrtho2D(0, 800, 0,600);&lt;/div&gt;
&lt;div&gt;
}&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
void drawSquare(GLint x1, GLint y1, GLint x2, GLint y2, GLint x3, GLint y3, GLint x4, GLint y4)&lt;/div&gt;
&lt;div&gt;
{&lt;/div&gt;
&lt;div&gt;
// if color is 0 then draw white box and change value of color = 1&lt;/div&gt;
&lt;div&gt;
if (c == 0)&lt;/div&gt;
&lt;div&gt;
{&lt;/div&gt;
&lt;div&gt;
glColor3f(1, 1, 1); // white color value is 1 1 1&lt;/div&gt;
&lt;div&gt;
c = 1;&lt;/div&gt;
&lt;div&gt;
}&lt;/div&gt;
&lt;div&gt;
// if color is 1 then draw black box and change value of color = 0&lt;/div&gt;
&lt;div&gt;
else&lt;/div&gt;
&lt;div&gt;
{&lt;/div&gt;
&lt;div&gt;
glColor3f(0, 0, 0); // black color value is 0 0 0&lt;/div&gt;
&lt;div&gt;
c = 0;&lt;/div&gt;
&lt;div&gt;
}&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
// Draw Square&lt;/div&gt;
&lt;div&gt;
glBegin(GL_POLYGON);&lt;/div&gt;
&lt;div&gt;
glVertex2i(x1, y1);&lt;/div&gt;
&lt;div&gt;
glVertex2i(x2, y2);&lt;/div&gt;
&lt;div&gt;
glVertex2i(x3, y3);&lt;/div&gt;
&lt;div&gt;
glVertex2i(x4, y4);&lt;/div&gt;
&lt;div&gt;
glEnd();&lt;/div&gt;
&lt;div&gt;
}&lt;/div&gt;
&lt;div&gt;
void chessboard()&lt;/div&gt;
&lt;div&gt;
{&lt;/div&gt;
&lt;div&gt;
glClear(GL_COLOR_BUFFER_BIT); // Clear display window&lt;/div&gt;
&lt;div&gt;
GLint x, y;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
for (x = 0; x &amp;lt;= 800; x += 100)&lt;/div&gt;
&lt;div&gt;
{&lt;/div&gt;
&lt;div&gt;
for (y = 0; y &amp;lt;= 600; y += 75)&lt;/div&gt;
&lt;div&gt;
{&lt;/div&gt;
&lt;div&gt;
drawSquare(x, y + 75, x + 100, y + 75, x + 100, y, x, y);&lt;/div&gt;
&lt;div&gt;
}&lt;/div&gt;
&lt;div&gt;
}&lt;/div&gt;
&lt;div&gt;
// Process all OpenGL routine s as quickly as possible&lt;/div&gt;
&lt;div&gt;
glFlush();&lt;/div&gt;
&lt;div&gt;
}&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
int main(int agrc, char ** argv)&lt;/div&gt;
&lt;div&gt;
{&lt;/div&gt;
&lt;div&gt;
// Initialize GLUT&lt;/div&gt;
&lt;div&gt;
glutInit(&amp;amp;agrc, argv);&lt;/div&gt;
&lt;div&gt;
// Set display mode&lt;/div&gt;
&lt;div&gt;
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);&lt;/div&gt;
&lt;div&gt;
// Set top - left display window position.&lt;/div&gt;
&lt;div&gt;
glutInitWindowPosition(100, 100);&lt;/div&gt;
&lt;div&gt;
// Set display window width and height&lt;/div&gt;
&lt;div&gt;
glutInitWindowSize(800, 600);&lt;/div&gt;
&lt;div&gt;
// Create display window with the given title&lt;/div&gt;
&lt;div&gt;
glutCreateWindow(&quot;Chess Board using OpenGL in C++&quot;);&lt;/div&gt;
&lt;div&gt;
// Execute initialization procedure&lt;/div&gt;
&lt;div&gt;
init();&lt;/div&gt;
&lt;div&gt;
// Send graphics to display window&lt;/div&gt;
&lt;div&gt;
glutDisplayFunc(chessboard);&lt;/div&gt;
&lt;div&gt;
// Display everything and wait.&lt;/div&gt;
&lt;div&gt;
glutMainLoop();&lt;/div&gt;
&lt;div&gt;
}&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://www.openglprojects.in/feeds/8607387049190657900/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.openglprojects.in/2018/08/opengl-chess-board-in-c-with-source-code_26.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2020194800836807725/posts/default/8607387049190657900'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2020194800836807725/posts/default/8607387049190657900'/><link rel='alternate' type='text/html' href='http://www.openglprojects.in/2018/08/opengl-chess-board-in-c-with-source-code_26.html' title='OpenGL Chess Board in C++ with Source Code'/><author><name>Rajeev</name><uri>http://www.blogger.com/profile/03147189487850777395</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiO15KN_5rep-dCs1TK0e7cXZZ4I1Yz9d5kQELQnlM-3MtVEuUzg3wS3yabc3BG8_u3r4-f-vsRpMcH3Jp3r2VSVCC-AtRITenuwKt4yB7Ab6fDPVx0r-JBmHRl0i_PXG1iJNhdLgeF62Ou/s72-c/openGL_chess_Board.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2020194800836807725.post-6916800918466216881</id><published>2018-05-09T01:50:00.000+05:30</published><updated>2018-05-09T01:50:07.372+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Complex Projects"/><category scheme="http://www.blogger.com/atom/ns#" term="Games"/><title type='text'>AirPlane Game Computer Graphics Project</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
In our blog we have seen many projects that deals with gaming. Today we are introducing one of the most complex game which we called the &quot;AirPlane Game&quot;. It is not similar to copter &lt;a href=&quot;https://www.openglprojects.in/2016/04/copter-computer-graphics-game-project.html&quot;&gt;game in openGL&lt;/a&gt; we have seen earlier. It is more complex and used SOIL.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5tIgtUQaylgq912T8qvJ3uhpJ9w8cekvWK0G5LuGIq6RFITVFdMTGMrlCPhcD9oZAKjK4mkd1GFTQKyfIFEbapOpXQ52zSwkG1Pnys9yBD5neJUk7dcbgoTbFBVyzszBhgGuMubcbxTDl/s1600/airplane+game+computer+graphics.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;768&quot; data-original-width=&quot;1366&quot; height=&quot;223&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5tIgtUQaylgq912T8qvJ3uhpJ9w8cekvWK0G5LuGIq6RFITVFdMTGMrlCPhcD9oZAKjK4mkd1GFTQKyfIFEbapOpXQ52zSwkG1Pnys9yBD5neJUk7dcbgoTbFBVyzszBhgGuMubcbxTDl/s400/airplane+game+computer+graphics.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;
Objective :&lt;/h2&gt;
&lt;div&gt;
The objective of the project is to built a game using opengl and c++, which use the airplane as tool of game. The&amp;nbsp;Computer Graphics game Project use playing have to run the airplane through the scene avoiding the danger as well as keeping the fuel up. As the fuel goes down user game ends, same when you hit by incoming object.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
Features :&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
1. Splash Screen&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
2. Options to Choose the plane&lt;/div&gt;
&lt;div&gt;
3. Option to choose the scence&lt;/div&gt;
&lt;div&gt;
4. Different menu as mentioned below.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
A menu with screen with the following items:&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
• Play&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
• Settings&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
• Instructions&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
• Credits&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
• High Scores&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
• Exit&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The game use SOIL to load the image hence you have to first set the soil in your project.&amp;nbsp;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
For source code and documents email to openglprojects@gmail.com&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://www.openglprojects.in/feeds/6916800918466216881/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.openglprojects.in/2018/05/airplane-game-computer-graphics-project.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2020194800836807725/posts/default/6916800918466216881'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2020194800836807725/posts/default/6916800918466216881'/><link rel='alternate' type='text/html' href='http://www.openglprojects.in/2018/05/airplane-game-computer-graphics-project.html' title='AirPlane Game Computer Graphics Project'/><author><name>Rajeev</name><uri>http://www.blogger.com/profile/03147189487850777395</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5tIgtUQaylgq912T8qvJ3uhpJ9w8cekvWK0G5LuGIq6RFITVFdMTGMrlCPhcD9oZAKjK4mkd1GFTQKyfIFEbapOpXQ52zSwkG1Pnys9yBD5neJUk7dcbgoTbFBVyzszBhgGuMubcbxTDl/s72-c/airplane+game+computer+graphics.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2020194800836807725.post-2946950715311677799</id><published>2018-04-06T09:29:00.000+05:30</published><updated>2018-04-06T09:29:17.954+05:30</updated><title type='text'>OpenGL Code Traffic Signals</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Presenting to you another OpenGL Code on&amp;nbsp;Traffic Signals. We have already seen the Advance &lt;a href=&quot;https://www.openglprojects.in/2015/08/advance-traffic-signal-c-source-code-projects.html#gsc.tab=0&quot;&gt;Traffic Signal OpenGL Program&lt;/a&gt;, now we will see another good program for same.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFuZWAXNH7prn_1B757o30_pCd-zg0kAUWgyiiifZ6VfexxKZox-6dyEaEdDjNsR7vgrO39lGW5H5n5OG9W7hzEsFNKBtVYFpYrbmENtAMva4VXjsqswmKMmrol7oBAfbeMfPJAuNdeaHc/s1600/opengl+code+traffic+signal.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;OpenGL Code Traffic Signals&quot; border=&quot;0&quot; data-original-height=&quot;600&quot; data-original-width=&quot;1279&quot; height=&quot;187&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFuZWAXNH7prn_1B757o30_pCd-zg0kAUWgyiiifZ6VfexxKZox-6dyEaEdDjNsR7vgrO39lGW5H5n5OG9W7hzEsFNKBtVYFpYrbmENtAMva4VXjsqswmKMmrol7oBAfbeMfPJAuNdeaHc/s400/opengl+code+traffic+signal.PNG&quot; title=&quot;OpenGL Code Traffic Signals&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
Features&amp;nbsp;&lt;/h3&gt;
The&amp;nbsp;OpenGL Code&amp;nbsp; we presenting have many of the good features. Some of the features is listed below -&lt;br /&gt;
&lt;br /&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;b&gt;Light Options&lt;/b&gt; - As in any traffic signal you will see the three lights - red, yellow and green. All the options has been implemented.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Vehicles&lt;/b&gt; - To keep the OpenGL Code simple for all only three vehicles has been added. Though, if you like to add more do it, you are welcome.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Lanes&lt;/b&gt; -&amp;nbsp; The right and left lane options is implemented in the program.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;User Interactions&lt;/b&gt; - Both mouse and keyboard interaction has been added to the OpenGL Code. All the user interactions has been listed in the post below.&lt;/li&gt;
&lt;li&gt;There is options to speed up the traffic is also in the code.&lt;/li&gt;
&lt;li&gt;Program has include the front page for introduction.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
User Interactions&lt;/h3&gt;
&lt;div&gt;
As mentioned earlier both mouse and keyboard user interaction has been added to this&amp;nbsp;OpenGL Code.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;b&gt;Keyboard Interactions&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;b&gt;Enter - &lt;/b&gt;From First Introduction screen to screen press Enter key at beginning.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Help -&amp;nbsp;&lt;/b&gt; Press &lt;b&gt;&#39;h&#39;&lt;/b&gt;to get the help screen.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Left to right movement -&lt;/b&gt; press &lt;b&gt;&#39;l&#39;&lt;/b&gt; to allow only left to right movement of traffic.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Right to left movement -&lt;/b&gt; press &lt;b&gt;&#39;r&#39;&lt;/b&gt; to allow only right to left&amp;nbsp;movement of traffic.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Speed up - &lt;/b&gt;To speed up the traffic press &lt;b&gt;&#39;s&#39;&lt;/b&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;b&gt;Mouse Interactions&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;b&gt;Left Mouse Button - &lt;/b&gt;This will stop the traffic as Red light gets on.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Right Mouse Button (on hold) - &lt;/b&gt;Press right mouse button and keep on hold for yellow light.&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Right Mouse Button (released) - &lt;/b&gt;After releasing the right mouse button the light changes from yellow to green and traffic moves.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
Video Demo&lt;/h3&gt;
&lt;iframe allow=&quot;autoplay; encrypted-media&quot; allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/WrrC0g42-zA&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
Downloads&lt;/h3&gt;
&lt;div&gt;
You can download the&amp;nbsp;OpenGL Code from the &lt;a href=&quot;https://drive.google.com/open?id=1_DXF3ePOxgHQ2CPmcUZsOlwM0A0B0jt2&quot;&gt;Google Drive link&lt;/a&gt;.&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://www.openglprojects.in/feeds/2946950715311677799/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.openglprojects.in/2018/04/opengl-code-traffic-signals.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2020194800836807725/posts/default/2946950715311677799'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2020194800836807725/posts/default/2946950715311677799'/><link rel='alternate' type='text/html' href='http://www.openglprojects.in/2018/04/opengl-code-traffic-signals.html' title='OpenGL Code Traffic Signals'/><author><name>Rajeev</name><uri>http://www.blogger.com/profile/03147189487850777395</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFuZWAXNH7prn_1B757o30_pCd-zg0kAUWgyiiifZ6VfexxKZox-6dyEaEdDjNsR7vgrO39lGW5H5n5OG9W7hzEsFNKBtVYFpYrbmENtAMva4VXjsqswmKMmrol7oBAfbeMfPJAuNdeaHc/s72-c/opengl+code+traffic+signal.PNG" height="72" width="72"/><thr:total>0</thr:total></entry></feed>