This document discusses OpenGL primitives for drawing geometric shapes. It explains that OpenGL uses vertices and primitive types to describe objects. Point, line, triangle, quad and polygon primitives are covered. Code examples are provided to demonstrate each primitive type, including how to specify vertices, colors, line widths and drawing modes. The document concludes by inviting the reader to design their own 2D scene on graph paper and then implement it using OpenGL primitives.
Computer Graphics and Multimedia lab reportBijoy679
According to NU of Bangladesh for BSC Hons in CSE 6th semester, here you can find the solution about this subject according to the board question respectively.
This is my first robot in opengl by using visual c++. I hope it help u in making a robot . Its easy and simple . Must try and remember me in your prayers
FLTK Summer Course - Part VIII - Eighth Impact - ExercisesMichel Alves
FLTK (pronounced "fulltick") is a cross-platform C++ GUI toolkit for UNIX®/Linux® (X11), Microsoft® Windows®, and MacOS® X. FLTK provides modern GUI functionality without the bloat and supports 3D graphics via OpenGL® and its built-in GLUT emulation. FLTK is designed to be small and modular enough to be statically linked, but works fine as a shared library. FLTK also includes an excellent UI builder called FLUID that can be used to create applications in minutes. FLTK is provided under the terms of the GNU Library Public License, Version 2 with exceptions that allow for static linking. More informations in http://www.fltk.org.
Unit 8 - Information and Communication Technology (Paper I).pdfThiyagu K
This slides describes the basic concepts of ICT, basics of Email, Emerging Technology and Digital Initiatives in Education. This presentations aligns with the UGC Paper I syllabus.
The Indian economy is classified into different sectors to simplify the analysis and understanding of economic activities. For Class 10, it's essential to grasp the sectors of the Indian economy, understand their characteristics, and recognize their importance. This guide will provide detailed notes on the Sectors of the Indian Economy Class 10, using specific long-tail keywords to enhance comprehension.
For more information, visit-www.vavaclasses.com
The French Revolution, which began in 1789, was a period of radical social and political upheaval in France. It marked the decline of absolute monarchies, the rise of secular and democratic republics, and the eventual rise of Napoleon Bonaparte. This revolutionary period is crucial in understanding the transition from feudalism to modernity in Europe.
For more information, visit-www.vavaclasses.com
How to Make a Field invisible in Odoo 17Celine George
It is possible to hide or invisible some fields in odoo. Commonly using “invisible” attribute in the field definition to invisible the fields. This slide will show how to make a field invisible in odoo 17.
How to Split Bills in the Odoo 17 POS ModuleCeline George
Bills have a main role in point of sale procedure. It will help to track sales, handling payments and giving receipts to customers. Bill splitting also has an important role in POS. For example, If some friends come together for dinner and if they want to divide the bill then it is possible by POS bill splitting. This slide will show how to split bills in odoo 17 POS.
How to Create Map Views in the Odoo 17 ERPCeline George
The map views are useful for providing a geographical representation of data. They allow users to visualize and analyze the data in a more intuitive manner.
Ethnobotany and Ethnopharmacology:
Ethnobotany in herbal drug evaluation,
Impact of Ethnobotany in traditional medicine,
New development in herbals,
Bio-prospecting tools for drug discovery,
Role of Ethnopharmacology in drug evaluation,
Reverse Pharmacology.
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdfTechSoup
In this webinar you will learn how your organization can access TechSoup's wide variety of product discount and donation programs. From hardware to software, we'll give you a tour of the tools available to help your nonprofit with productivity, collaboration, financial management, donor tracking, security, and more.
2. OPENGL OUTPUT PRIMITIVES
Each geometric object is described by a set of vertices and the type of primitive to be
drawn. Whether and how the vertices are connected is determined by the primitive
type.
3. OPENGL PRIMITIVES- GL_POINTS
Lab Activity (1): Add the following code to display() method.
glPointSize(4.0); /* specify point to be 4 pixels thick */
glBegin(GL_POINTS);
glVertex2f(0.0f, 2.0f); //note 2D form
glVertex2f(1.0f, 2.0f);
glVertex2f(0.0f, -2.0f);
glVertex2f(-1.0f, 0.0f);
glEnd();
4. OPENGL PRIMITIVES- LINES
Three different line primitives can be created:
GL_LINES: glColor3f(0.0,0.0,0.0);
glLineWidth(5.0);
glBegin(GL_LINES);
glVertex2f (-20.0, -20.0);
glVertex2f (20.0, 20.0);
glColor3f(1.0,1.0,0.0);
glVertex2f (10.0, -20.0);
glVertex2f (10.0, 20.0);
glEnd();
5. OPENGL PRIMITIVES- LINES
GL_LINE_STRIP: Draws a connected set of line segments from the first vertex to the
last.
glColor3f(0.5,0.6,0.0);
glLineWidth(4);
glBegin(GL_LINE_STRIP);
glVertex2f (5.0, 10.0);
glVertex2f (10.0, 10.0);
glVertex2f (10.0, 0.0);
glVertex2f (5.0, 0.0);
glEnd();
7. OPENGL PRIMITIVES –GL_TRIANGES
glColor3f(1.0,0.0,1.0);
glLineWidth(4); -The default is GL_FILL for both front-and back-facing
polygons.
glBegin(GL_TRIANGLES);
glVertex2f (-10.0, -10.0);
glVertex2f (-5.0, -10.0);
glVertex2f (-5.0, -5.0);
glEnd();
Insert this command before glLineWidth, and note the effect.
glPolygonMode(GL_FRONT, GL_LINE);
GL_BACK GL_POINT
or or
GL_FRONT_AND_BACK GL_FILL
8. OPENGL PRIMITIVES –
GL_TRIANGLE_STRIP
glColor3f(0.0,1.0,0.0);
glLineWidth(4);
glPolygonMode(GL_FRONT, GL_LINE);
glBegin(GL_TRIANGLE_STRIP);
glVertex2f (-10.0, -10.0);
glVertex2f (-19.0, -10.0);
glVertex2f (-10.0, -20.0);
glVertex2f (-18.0,-19.0); //create 2ndtriangle
glVertex2f (-5.0, -25.0); //create 3rd triangle
glVertex2f (-20.0, -29.0); //create 4th triangle
glEnd();
Note:
• Order of points does matter!
• If the vertices are defined clockwise, the front of the polygon will
be shown. Otherwise, the back of the polygon will be shown.
9. OPENGL PRIMITIVES –
GL_TRIANGLE_FAN
Draws a connected set of triangles. One triangle is defined for each vertex
presented after the first two vertices.
Note: Order of points does matter!
glColor3f(0.0,0.0,1.0);
glLineWidth(4);
/* draw only the outline of polygon */
glPolygonMode(GL_FRONT, GL_LINE);
glBegin( GL_TRIANGLE_FAN);
glVertex2f (12.0, -30.0);
glVertex2f(30.0, -30.0);
glVertex2f (30.0, -20.0);
glVertex2f (22.0, -15.0);
glVertex2f (12.0, -12.0);
glEnd();
14. LAB EXERCISE: TIME TO SHOW YOUR
CREATIVITY
“Sample 2D Scenary are given Lab folder”
1. Show your best to Design your virtual World (2D Scene) onto graph
paper.
With Well defined coordinates Points of each object in Scene.
Also Define Color of each Object Of Your Scene
1. Use Open GL built in primitives to Implement your
Designed virtual world (2D Scene).
MyTricksLab.com (Computer Science & Tech Tutorials)