SlideShare a Scribd company logo
1 of 9
Robot by
Gulnaz
 // CGassignment2.cpp : Making a simple Robot;
 //Gulnaz Akhter;
 #include "stdafx.h"
 // Run by Visual C++ 6 with OpenGL
 #include <math.h>
 #include <glut.h>
 void init (void)
 {
 /* select clearing (background) color */
 glClearColor (0.0, 0.0, 0.0, 1.0);
 // (red, green, blue, alpha), used by glClear
 /* initialize viewing values */
 glMatrixMode(GL_PROJECTION);
 glLoadIdentity();
 glOrtho(1.0, -1.0, -1.0, 1.0, -1.0, -1.0);
 // (left, right, bottom, top, near, far)
 }
 void display(void)
 {


 glColor3f (1.0, 0.0, 0.0);
 glBegin(GL_POLYGON);
 //Head;
 glVertex2f (0.08, 0.11);
 glVertex2f (0.01, 0.11);
 glVertex2f (0.01, 0.20);
 glVertex2f (0.08, 0.20);
 glEnd();
 glTranslatef(-0.01,0.07,0.00);
 glTranslatef(0.07,-0.20,0.00);
 glColor3f (1.0, 0.0, 0.0);
 glBegin(GL_POLYGON);
 //Body;
 glVertex2f (-0.05, -0.05);
 glVertex2f (0.02, -0.05);
 glVertex2f (0.02, 0.18);
 glVertex2f (-0.05, 0.18);
 glEnd();
 glTranslatef(-0.04,0.2,0.00);
 glColor3f (1.0, 0.0, 0.0);
 glBegin(GL_POLYGON);
 //Neck;
 glVertex2f (0.03, 0.06);
 glVertex2f (0.02, 0.06);
 glVertex2f (0.02, -0.02);
 glVertex2f (0.03, -0.02);
 glEnd();
 glTranslatef(0.02,-0.56,0.00);
 glColor3f (1.0, 0.0, 0.0);
 glBegin(GL_POLYGON);
 //Right Leg;
 glVertex2f (0.04, 0.10);
 glVertex2f (0.02, 0.10);
 glVertex2f (0.02, 0.30);
 glVertex2f (0.04, 0.30);
 glEnd();
 glTranslatef(-0.06,-0.01,0.00);
 glColor3f (1.0, 0.0, 0.0);
 glBegin(GL_POLYGON);
 //Left Leg;
 glVertex2f (0.05, 0.11);
 glVertex2f (0.03, 0.11);
 glVertex2f (0.03, 0.31);
 glVertex2f (0.05, 0.31);
 glEnd();
 //Mouth
 glTranslatef(0.05,0.63,0.00);
 glColor3f (0.0, 1.0, 0.0);
 glBegin(GL_LINES);
 glVertex2f(.03,0.00);
 glVertex2f(.00,.00);

 glEnd();


 // (red, green, blue)
 glTranslatef(0.00,-0.03,0.00);
 //glColor3f (0.0, 0.0, 1.0);
 glPointSize(4);
 glBegin(GL_POINTS);
 glVertex3f (0.00, 0.08, 0.0);
 glEnd();
 glTranslatef(-0.02,0.00,0.00);
 //glColor3f (0.0, 0.0, 1.0);
 glPointSize(4);
 glBegin(GL_POINTS);
 glVertex3f (0.05, 0.08, 0.0);

 glEnd();
 glTranslatef(-0.05,-0.15,0.00);
 glColor3f (1.0, 0.0, 0.0);
 glBegin(GL_POLYGON);
 //Right hand;
 glVertex2f (0.04, 0.10);
 glVertex2f (0.02, 0.10);
 glVertex2f (0.02, 0.30);
 glVertex2f (0.04, 0.30);
 glEnd();
 glTranslatef(0.10,-0.21,0.00);
 glColor3f (1.0, 0.0, 0.0);
 glBegin(GL_POLYGON);
 //Left hand;
 glVertex2f (0.05, 0.11);
 glVertex2f (0.03, 0.11);
 glVertex2f (0.03, 0.31);
 glVertex2f (0.05, 0.31);
 glEnd();
 glFlush ();
 }
 int main(int argc, char** argv)
 {
 glutInit(&argc, argv);
 glutInitWindowSize (600, 500);
 glutInitWindowPosition (200, 100);
 // Screen origin (0,0) is at Top Left
 glutCreateWindow ("Hello Computer Graphics Students");
 init(); // calling init()
 glutDisplayFunc(display); // glut call back function,
calling display()
 glutMainLoop();
 return 0; // ANSI C requires main to return int.
 }

More Related Content

Viewers also liked

20090330 ofício para o cnen
20090330 ofício para o cnen20090330 ofício para o cnen
20090330 ofício para o cnenVascaodopastel
 
Sales made simple 1day Workshop
Sales made simple 1day WorkshopSales made simple 1day Workshop
Sales made simple 1day WorkshopBen Fewtrell
 
Slides tecnologias
Slides tecnologiasSlides tecnologias
Slides tecnologiasMirianlucena
 
Johnny cassell expert at chatting to women
 Johnny cassell expert at chatting to women Johnny cassell expert at chatting to women
Johnny cassell expert at chatting to womendiatontonometer
 
Riza N. Abarquez Resume
Riza N. Abarquez ResumeRiza N. Abarquez Resume
Riza N. Abarquez ResumeRiza Abarquez
 
eTwinning - adding embed codes to TwinSpace
eTwinning - adding embed codes to TwinSpaceeTwinning - adding embed codes to TwinSpace
eTwinning - adding embed codes to TwinSpaceDominika Tokarz
 
VERNEST PARKER RESUME-2
VERNEST PARKER RESUME-2VERNEST PARKER RESUME-2
VERNEST PARKER RESUME-2Vernest Parker
 
Comperhensive Personal Financial Retirement planning Excel Sheet
Comperhensive Personal Financial Retirement  planning Excel SheetComperhensive Personal Financial Retirement  planning Excel Sheet
Comperhensive Personal Financial Retirement planning Excel Sheetcrpnair
 
ECR - Integração e Eficiência Ao Consumidor
ECR - Integração e Eficiência Ao ConsumidorECR - Integração e Eficiência Ao Consumidor
ECR - Integração e Eficiência Ao ConsumidorJuliana Maria Lopes
 
SaaS Wars: Europe Awakens. The Accel Euroscape 2016
SaaS Wars: Europe Awakens. The Accel Euroscape 2016SaaS Wars: Europe Awakens. The Accel Euroscape 2016
SaaS Wars: Europe Awakens. The Accel Euroscape 2016Philippe Botteri
 

Viewers also liked (12)

Juan santos - Ventajas del Aprendizaje Colaborativo
Juan santos - Ventajas del Aprendizaje ColaborativoJuan santos - Ventajas del Aprendizaje Colaborativo
Juan santos - Ventajas del Aprendizaje Colaborativo
 
20090330 ofício para o cnen
20090330 ofício para o cnen20090330 ofício para o cnen
20090330 ofício para o cnen
 
Sales made simple 1day Workshop
Sales made simple 1day WorkshopSales made simple 1day Workshop
Sales made simple 1day Workshop
 
Slides tecnologias
Slides tecnologiasSlides tecnologias
Slides tecnologias
 
Johnny cassell expert at chatting to women
 Johnny cassell expert at chatting to women Johnny cassell expert at chatting to women
Johnny cassell expert at chatting to women
 
Goldstone-Booklet
Goldstone-BookletGoldstone-Booklet
Goldstone-Booklet
 
Riza N. Abarquez Resume
Riza N. Abarquez ResumeRiza N. Abarquez Resume
Riza N. Abarquez Resume
 
eTwinning - adding embed codes to TwinSpace
eTwinning - adding embed codes to TwinSpaceeTwinning - adding embed codes to TwinSpace
eTwinning - adding embed codes to TwinSpace
 
VERNEST PARKER RESUME-2
VERNEST PARKER RESUME-2VERNEST PARKER RESUME-2
VERNEST PARKER RESUME-2
 
Comperhensive Personal Financial Retirement planning Excel Sheet
Comperhensive Personal Financial Retirement  planning Excel SheetComperhensive Personal Financial Retirement  planning Excel Sheet
Comperhensive Personal Financial Retirement planning Excel Sheet
 
ECR - Integração e Eficiência Ao Consumidor
ECR - Integração e Eficiência Ao ConsumidorECR - Integração e Eficiência Ao Consumidor
ECR - Integração e Eficiência Ao Consumidor
 
SaaS Wars: Europe Awakens. The Accel Euroscape 2016
SaaS Wars: Europe Awakens. The Accel Euroscape 2016SaaS Wars: Europe Awakens. The Accel Euroscape 2016
SaaS Wars: Europe Awakens. The Accel Euroscape 2016
 

Similar to Robot by Gulnaz - Simple Robot Model in OpenGL C

Robot In OpenGL Using Line Function
Robot In OpenGL Using Line Function Robot In OpenGL Using Line Function
Robot In OpenGL Using Line Function Jannat Jamshed
 
Ass day2 2_rotating my name (robi)
Ass day2 2_rotating my name (robi)Ass day2 2_rotating my name (robi)
Ass day2 2_rotating my name (robi)Robi Parvez
 
Tutorial Open GL (Listing Code)
Tutorial Open GL (Listing Code)Tutorial Open GL (Listing Code)
Tutorial Open GL (Listing Code)Aila Gema Safitri
 
computer graphics at openGL
computer graphics at openGLcomputer graphics at openGL
computer graphics at openGLYasir Khan
 
Ass day3 2_olympic logos
Ass day3 2_olympic logosAss day3 2_olympic logos
Ass day3 2_olympic logosRobi Parvez
 
Programa de objetos 3 d wire
Programa de objetos 3 d wirePrograma de objetos 3 d wire
Programa de objetos 3 d wireRené Domínguez
 
#includefloat angle, move, scene, roadmove,turn, on=1; int i, st.docx
#includefloat angle, move, scene, roadmove,turn, on=1; int i, st.docx#includefloat angle, move, scene, roadmove,turn, on=1; int i, st.docx
#includefloat angle, move, scene, roadmove,turn, on=1; int i, st.docxajoy21
 
Computer Graphics and Multimedia lab report
Computer Graphics and Multimedia lab reportComputer Graphics and Multimedia lab report
Computer Graphics and Multimedia lab reportBijoy679
 
square.cpp Open
 square.cpp Open square.cpp Open
square.cpp OpenMikeEly930
 
The Ring programming language version 1.7 book - Part 60 of 196
The Ring programming language version 1.7 book - Part 60 of 196The Ring programming language version 1.7 book - Part 60 of 196
The Ring programming language version 1.7 book - Part 60 of 196Mahmoud Samir Fayed
 
computer graphics at openGL (2)
computer graphics at openGL (2)computer graphics at openGL (2)
computer graphics at openGL (2)Yasir Khan
 
The Ring programming language version 1.5.3 book - Part 65 of 184
The Ring programming language version 1.5.3 book - Part 65 of 184The Ring programming language version 1.5.3 book - Part 65 of 184
The Ring programming language version 1.5.3 book - Part 65 of 184Mahmoud Samir Fayed
 
Robot Motion Source code
Robot Motion Source codeRobot Motion Source code
Robot Motion Source codeBrian Goggins
 
The Ring programming language version 1.9 book - Part 65 of 210
The Ring programming language version 1.9 book - Part 65 of 210The Ring programming language version 1.9 book - Part 65 of 210
The Ring programming language version 1.9 book - Part 65 of 210Mahmoud Samir Fayed
 

Similar to Robot by Gulnaz - Simple Robot Model in OpenGL C (20)

Robot In OpenGL Using Line Function
Robot In OpenGL Using Line Function Robot In OpenGL Using Line Function
Robot In OpenGL Using Line Function
 
Robot by gulnaz
Robot by gulnazRobot by gulnaz
Robot by gulnaz
 
Ass day2 2_rotating my name (robi)
Ass day2 2_rotating my name (robi)Ass day2 2_rotating my name (robi)
Ass day2 2_rotating my name (robi)
 
Tutorial Open GL (Listing Code)
Tutorial Open GL (Listing Code)Tutorial Open GL (Listing Code)
Tutorial Open GL (Listing Code)
 
computer graphics at openGL
computer graphics at openGLcomputer graphics at openGL
computer graphics at openGL
 
Ass day3 2_olympic logos
Ass day3 2_olympic logosAss day3 2_olympic logos
Ass day3 2_olympic logos
 
Programa de objetos 3 d wire
Programa de objetos 3 d wirePrograma de objetos 3 d wire
Programa de objetos 3 d wire
 
#includefloat angle, move, scene, roadmove,turn, on=1; int i, st.docx
#includefloat angle, move, scene, roadmove,turn, on=1; int i, st.docx#includefloat angle, move, scene, roadmove,turn, on=1; int i, st.docx
#includefloat angle, move, scene, roadmove,turn, on=1; int i, st.docx
 
Development with OpenGL and Qt
Development with OpenGL and QtDevelopment with OpenGL and Qt
Development with OpenGL and Qt
 
Computer Graphics and Multimedia lab report
Computer Graphics and Multimedia lab reportComputer Graphics and Multimedia lab report
Computer Graphics and Multimedia lab report
 
Grafika komputer 2
Grafika komputer 2Grafika komputer 2
Grafika komputer 2
 
Komputer Grafik
Komputer GrafikKomputer Grafik
Komputer Grafik
 
square.cpp Open
 square.cpp Open square.cpp Open
square.cpp Open
 
The Ring programming language version 1.7 book - Part 60 of 196
The Ring programming language version 1.7 book - Part 60 of 196The Ring programming language version 1.7 book - Part 60 of 196
The Ring programming language version 1.7 book - Part 60 of 196
 
Practicing 2d drawing primitives
Practicing 2d drawing primitivesPracticing 2d drawing primitives
Practicing 2d drawing primitives
 
Practica
PracticaPractica
Practica
 
computer graphics at openGL (2)
computer graphics at openGL (2)computer graphics at openGL (2)
computer graphics at openGL (2)
 
The Ring programming language version 1.5.3 book - Part 65 of 184
The Ring programming language version 1.5.3 book - Part 65 of 184The Ring programming language version 1.5.3 book - Part 65 of 184
The Ring programming language version 1.5.3 book - Part 65 of 184
 
Robot Motion Source code
Robot Motion Source codeRobot Motion Source code
Robot Motion Source code
 
The Ring programming language version 1.9 book - Part 65 of 210
The Ring programming language version 1.9 book - Part 65 of 210The Ring programming language version 1.9 book - Part 65 of 210
The Ring programming language version 1.9 book - Part 65 of 210
 

Recently uploaded

Lilac Illustrated Social Psychology Presentation.pptx
Lilac Illustrated Social Psychology Presentation.pptxLilac Illustrated Social Psychology Presentation.pptx
Lilac Illustrated Social Psychology Presentation.pptxABMWeaklings
 
办理国外毕业证学位证《原版美国montana文凭》蒙大拿州立大学毕业证制作成绩单修改
办理国外毕业证学位证《原版美国montana文凭》蒙大拿州立大学毕业证制作成绩单修改办理国外毕业证学位证《原版美国montana文凭》蒙大拿州立大学毕业证制作成绩单修改
办理国外毕业证学位证《原版美国montana文凭》蒙大拿州立大学毕业证制作成绩单修改atducpo
 
Call Girls in Kalyan Vihar Delhi 💯 Call Us 🔝8264348440🔝
Call Girls in Kalyan Vihar Delhi 💯 Call Us 🔝8264348440🔝Call Girls in Kalyan Vihar Delhi 💯 Call Us 🔝8264348440🔝
Call Girls in Kalyan Vihar Delhi 💯 Call Us 🔝8264348440🔝soniya singh
 
Dhule Call Girls #9907093804 Contact Number Escorts Service Dhule
Dhule Call Girls #9907093804 Contact Number Escorts Service DhuleDhule Call Girls #9907093804 Contact Number Escorts Service Dhule
Dhule Call Girls #9907093804 Contact Number Escorts Service Dhulesrsj9000
 
(No.1)↠Young Call Girls in Sikanderpur (Gurgaon) ꧁❤ 9711911712 ❤꧂ Escorts
(No.1)↠Young Call Girls in Sikanderpur (Gurgaon) ꧁❤ 9711911712 ❤꧂ Escorts(No.1)↠Young Call Girls in Sikanderpur (Gurgaon) ꧁❤ 9711911712 ❤꧂ Escorts
(No.1)↠Young Call Girls in Sikanderpur (Gurgaon) ꧁❤ 9711911712 ❤꧂ EscortsDelhi Escorts Service
 
Call Girls in Govindpuri Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Govindpuri Delhi 💯Call Us 🔝8264348440🔝Call Girls in Govindpuri Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Govindpuri Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Reinventing Corporate Philanthropy_ Strategies for Meaningful Impact by Leko ...
Reinventing Corporate Philanthropy_ Strategies for Meaningful Impact by Leko ...Reinventing Corporate Philanthropy_ Strategies for Meaningful Impact by Leko ...
Reinventing Corporate Philanthropy_ Strategies for Meaningful Impact by Leko ...Leko Durda
 
CALL ON ➥8923113531 🔝Call Girls Adil Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Adil Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Adil Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Adil Nagar Lucknow best Female serviceanilsa9823
 
CALL ON ➥8923113531 🔝Call Girls Aliganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Aliganj Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Aliganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Aliganj Lucknow best sexual serviceanilsa9823
 
The Selfspace Journal Preview by Mindbrush
The Selfspace Journal Preview by MindbrushThe Selfspace Journal Preview by Mindbrush
The Selfspace Journal Preview by MindbrushShivain97
 
办理西悉尼大学毕业证成绩单、制作假文凭
办理西悉尼大学毕业证成绩单、制作假文凭办理西悉尼大学毕业证成绩单、制作假文凭
办理西悉尼大学毕业证成绩单、制作假文凭o8wvnojp
 
Call Girls Anjuna beach Mariott Resort ₰8588052666
Call Girls Anjuna beach Mariott Resort ₰8588052666Call Girls Anjuna beach Mariott Resort ₰8588052666
Call Girls Anjuna beach Mariott Resort ₰8588052666nishakur201
 
REFLECTIONS Newsletter Jan-Jul 2024.pdf.pdf
REFLECTIONS Newsletter Jan-Jul 2024.pdf.pdfREFLECTIONS Newsletter Jan-Jul 2024.pdf.pdf
REFLECTIONS Newsletter Jan-Jul 2024.pdf.pdfssusere8ea60
 
Lucknow 💋 High Class Call Girls Lucknow 10k @ I'm VIP Independent Escorts Gir...
Lucknow 💋 High Class Call Girls Lucknow 10k @ I'm VIP Independent Escorts Gir...Lucknow 💋 High Class Call Girls Lucknow 10k @ I'm VIP Independent Escorts Gir...
Lucknow 💋 High Class Call Girls Lucknow 10k @ I'm VIP Independent Escorts Gir...anilsa9823
 
Postal Ballot procedure for employees to utilise
Postal Ballot procedure for employees to utilisePostal Ballot procedure for employees to utilise
Postal Ballot procedure for employees to utiliseccsubcollector
 
social media chat application main ppt.pptx
social media chat application main ppt.pptxsocial media chat application main ppt.pptx
social media chat application main ppt.pptxsprasad829829
 
《塔夫斯大学毕业证成绩单购买》做Tufts文凭毕业证成绩单/伪造美国假文凭假毕业证书图片Q微信741003700《塔夫斯大学毕业证购买》《Tufts毕业文...
《塔夫斯大学毕业证成绩单购买》做Tufts文凭毕业证成绩单/伪造美国假文凭假毕业证书图片Q微信741003700《塔夫斯大学毕业证购买》《Tufts毕业文...《塔夫斯大学毕业证成绩单购买》做Tufts文凭毕业证成绩单/伪造美国假文凭假毕业证书图片Q微信741003700《塔夫斯大学毕业证购买》《Tufts毕业文...
《塔夫斯大学毕业证成绩单购买》做Tufts文凭毕业证成绩单/伪造美国假文凭假毕业证书图片Q微信741003700《塔夫斯大学毕业证购买》《Tufts毕业文...ur8mqw8e
 
Breath, Brain & Beyond_A Holistic Approach to Peak Performance.pdf
Breath, Brain & Beyond_A Holistic Approach to Peak Performance.pdfBreath, Brain & Beyond_A Holistic Approach to Peak Performance.pdf
Breath, Brain & Beyond_A Holistic Approach to Peak Performance.pdfJess Walker
 
Understanding Relationship Anarchy: A Guide to Liberating Love | CIO Women Ma...
Understanding Relationship Anarchy: A Guide to Liberating Love | CIO Women Ma...Understanding Relationship Anarchy: A Guide to Liberating Love | CIO Women Ma...
Understanding Relationship Anarchy: A Guide to Liberating Love | CIO Women Ma...CIOWomenMagazine
 

Recently uploaded (20)

Lilac Illustrated Social Psychology Presentation.pptx
Lilac Illustrated Social Psychology Presentation.pptxLilac Illustrated Social Psychology Presentation.pptx
Lilac Illustrated Social Psychology Presentation.pptx
 
办理国外毕业证学位证《原版美国montana文凭》蒙大拿州立大学毕业证制作成绩单修改
办理国外毕业证学位证《原版美国montana文凭》蒙大拿州立大学毕业证制作成绩单修改办理国外毕业证学位证《原版美国montana文凭》蒙大拿州立大学毕业证制作成绩单修改
办理国外毕业证学位证《原版美国montana文凭》蒙大拿州立大学毕业证制作成绩单修改
 
Model Call Girl in Lado Sarai Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Lado Sarai Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Lado Sarai Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Lado Sarai Delhi reach out to us at 🔝9953056974🔝
 
Call Girls in Kalyan Vihar Delhi 💯 Call Us 🔝8264348440🔝
Call Girls in Kalyan Vihar Delhi 💯 Call Us 🔝8264348440🔝Call Girls in Kalyan Vihar Delhi 💯 Call Us 🔝8264348440🔝
Call Girls in Kalyan Vihar Delhi 💯 Call Us 🔝8264348440🔝
 
Dhule Call Girls #9907093804 Contact Number Escorts Service Dhule
Dhule Call Girls #9907093804 Contact Number Escorts Service DhuleDhule Call Girls #9907093804 Contact Number Escorts Service Dhule
Dhule Call Girls #9907093804 Contact Number Escorts Service Dhule
 
(No.1)↠Young Call Girls in Sikanderpur (Gurgaon) ꧁❤ 9711911712 ❤꧂ Escorts
(No.1)↠Young Call Girls in Sikanderpur (Gurgaon) ꧁❤ 9711911712 ❤꧂ Escorts(No.1)↠Young Call Girls in Sikanderpur (Gurgaon) ꧁❤ 9711911712 ❤꧂ Escorts
(No.1)↠Young Call Girls in Sikanderpur (Gurgaon) ꧁❤ 9711911712 ❤꧂ Escorts
 
Call Girls in Govindpuri Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Govindpuri Delhi 💯Call Us 🔝8264348440🔝Call Girls in Govindpuri Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Govindpuri Delhi 💯Call Us 🔝8264348440🔝
 
Reinventing Corporate Philanthropy_ Strategies for Meaningful Impact by Leko ...
Reinventing Corporate Philanthropy_ Strategies for Meaningful Impact by Leko ...Reinventing Corporate Philanthropy_ Strategies for Meaningful Impact by Leko ...
Reinventing Corporate Philanthropy_ Strategies for Meaningful Impact by Leko ...
 
CALL ON ➥8923113531 🔝Call Girls Adil Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Adil Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Adil Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Adil Nagar Lucknow best Female service
 
CALL ON ➥8923113531 🔝Call Girls Aliganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Aliganj Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Aliganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Aliganj Lucknow best sexual service
 
The Selfspace Journal Preview by Mindbrush
The Selfspace Journal Preview by MindbrushThe Selfspace Journal Preview by Mindbrush
The Selfspace Journal Preview by Mindbrush
 
办理西悉尼大学毕业证成绩单、制作假文凭
办理西悉尼大学毕业证成绩单、制作假文凭办理西悉尼大学毕业证成绩单、制作假文凭
办理西悉尼大学毕业证成绩单、制作假文凭
 
Call Girls Anjuna beach Mariott Resort ₰8588052666
Call Girls Anjuna beach Mariott Resort ₰8588052666Call Girls Anjuna beach Mariott Resort ₰8588052666
Call Girls Anjuna beach Mariott Resort ₰8588052666
 
REFLECTIONS Newsletter Jan-Jul 2024.pdf.pdf
REFLECTIONS Newsletter Jan-Jul 2024.pdf.pdfREFLECTIONS Newsletter Jan-Jul 2024.pdf.pdf
REFLECTIONS Newsletter Jan-Jul 2024.pdf.pdf
 
Lucknow 💋 High Class Call Girls Lucknow 10k @ I'm VIP Independent Escorts Gir...
Lucknow 💋 High Class Call Girls Lucknow 10k @ I'm VIP Independent Escorts Gir...Lucknow 💋 High Class Call Girls Lucknow 10k @ I'm VIP Independent Escorts Gir...
Lucknow 💋 High Class Call Girls Lucknow 10k @ I'm VIP Independent Escorts Gir...
 
Postal Ballot procedure for employees to utilise
Postal Ballot procedure for employees to utilisePostal Ballot procedure for employees to utilise
Postal Ballot procedure for employees to utilise
 
social media chat application main ppt.pptx
social media chat application main ppt.pptxsocial media chat application main ppt.pptx
social media chat application main ppt.pptx
 
《塔夫斯大学毕业证成绩单购买》做Tufts文凭毕业证成绩单/伪造美国假文凭假毕业证书图片Q微信741003700《塔夫斯大学毕业证购买》《Tufts毕业文...
《塔夫斯大学毕业证成绩单购买》做Tufts文凭毕业证成绩单/伪造美国假文凭假毕业证书图片Q微信741003700《塔夫斯大学毕业证购买》《Tufts毕业文...《塔夫斯大学毕业证成绩单购买》做Tufts文凭毕业证成绩单/伪造美国假文凭假毕业证书图片Q微信741003700《塔夫斯大学毕业证购买》《Tufts毕业文...
《塔夫斯大学毕业证成绩单购买》做Tufts文凭毕业证成绩单/伪造美国假文凭假毕业证书图片Q微信741003700《塔夫斯大学毕业证购买》《Tufts毕业文...
 
Breath, Brain & Beyond_A Holistic Approach to Peak Performance.pdf
Breath, Brain & Beyond_A Holistic Approach to Peak Performance.pdfBreath, Brain & Beyond_A Holistic Approach to Peak Performance.pdf
Breath, Brain & Beyond_A Holistic Approach to Peak Performance.pdf
 
Understanding Relationship Anarchy: A Guide to Liberating Love | CIO Women Ma...
Understanding Relationship Anarchy: A Guide to Liberating Love | CIO Women Ma...Understanding Relationship Anarchy: A Guide to Liberating Love | CIO Women Ma...
Understanding Relationship Anarchy: A Guide to Liberating Love | CIO Women Ma...
 

Robot by Gulnaz - Simple Robot Model in OpenGL C

  • 2.  // CGassignment2.cpp : Making a simple Robot;  //Gulnaz Akhter;  #include "stdafx.h"  // Run by Visual C++ 6 with OpenGL  #include <math.h>  #include <glut.h>  void init (void)  {  /* select clearing (background) color */  glClearColor (0.0, 0.0, 0.0, 1.0);  // (red, green, blue, alpha), used by glClear  /* initialize viewing values */  glMatrixMode(GL_PROJECTION);  glLoadIdentity();  glOrtho(1.0, -1.0, -1.0, 1.0, -1.0, -1.0);  // (left, right, bottom, top, near, far)  }
  • 3.  void display(void)  {    glColor3f (1.0, 0.0, 0.0);  glBegin(GL_POLYGON);  //Head;  glVertex2f (0.08, 0.11);  glVertex2f (0.01, 0.11);  glVertex2f (0.01, 0.20);  glVertex2f (0.08, 0.20);  glEnd();  glTranslatef(-0.01,0.07,0.00);  glTranslatef(0.07,-0.20,0.00);  glColor3f (1.0, 0.0, 0.0);  glBegin(GL_POLYGON);
  • 4.  //Body;  glVertex2f (-0.05, -0.05);  glVertex2f (0.02, -0.05);  glVertex2f (0.02, 0.18);  glVertex2f (-0.05, 0.18);  glEnd();  glTranslatef(-0.04,0.2,0.00);  glColor3f (1.0, 0.0, 0.0);  glBegin(GL_POLYGON);  //Neck;  glVertex2f (0.03, 0.06);  glVertex2f (0.02, 0.06);  glVertex2f (0.02, -0.02);  glVertex2f (0.03, -0.02);  glEnd();
  • 5.  glTranslatef(0.02,-0.56,0.00);  glColor3f (1.0, 0.0, 0.0);  glBegin(GL_POLYGON);  //Right Leg;  glVertex2f (0.04, 0.10);  glVertex2f (0.02, 0.10);  glVertex2f (0.02, 0.30);  glVertex2f (0.04, 0.30);  glEnd();  glTranslatef(-0.06,-0.01,0.00);  glColor3f (1.0, 0.0, 0.0);  glBegin(GL_POLYGON);
  • 6.  //Left Leg;  glVertex2f (0.05, 0.11);  glVertex2f (0.03, 0.11);  glVertex2f (0.03, 0.31);  glVertex2f (0.05, 0.31);  glEnd();  //Mouth  glTranslatef(0.05,0.63,0.00);  glColor3f (0.0, 1.0, 0.0);  glBegin(GL_LINES);  glVertex2f(.03,0.00);  glVertex2f(.00,.00);   glEnd();
  • 7.    // (red, green, blue)  glTranslatef(0.00,-0.03,0.00);  //glColor3f (0.0, 0.0, 1.0);  glPointSize(4);  glBegin(GL_POINTS);  glVertex3f (0.00, 0.08, 0.0);  glEnd();  glTranslatef(-0.02,0.00,0.00);  //glColor3f (0.0, 0.0, 1.0);  glPointSize(4);  glBegin(GL_POINTS);  glVertex3f (0.05, 0.08, 0.0);   glEnd();
  • 8.  glTranslatef(-0.05,-0.15,0.00);  glColor3f (1.0, 0.0, 0.0);  glBegin(GL_POLYGON);  //Right hand;  glVertex2f (0.04, 0.10);  glVertex2f (0.02, 0.10);  glVertex2f (0.02, 0.30);  glVertex2f (0.04, 0.30);  glEnd();  glTranslatef(0.10,-0.21,0.00);  glColor3f (1.0, 0.0, 0.0);  glBegin(GL_POLYGON);  //Left hand;
  • 9.  glVertex2f (0.05, 0.11);  glVertex2f (0.03, 0.11);  glVertex2f (0.03, 0.31);  glVertex2f (0.05, 0.31);  glEnd();  glFlush ();  }  int main(int argc, char** argv)  {  glutInit(&argc, argv);  glutInitWindowSize (600, 500);  glutInitWindowPosition (200, 100);  // Screen origin (0,0) is at Top Left  glutCreateWindow ("Hello Computer Graphics Students");  init(); // calling init()  glutDisplayFunc(display); // glut call back function, calling display()  glutMainLoop();  return 0; // ANSI C requires main to return int.  }