SlideShare a Scribd company logo
1 of 2
Download to read offline
This project has been designed for you to get experience with basic computer graphics concepts
and write a first computer graphics application in C++
4.1. Overview § You should design a simple 2D scene with an object which you can move, e.g. a
car, a robot, a person, a spaceship, a sword, etc. Use at least 50 points (vertex).
4.2 Required Functionality Here are the elements that your program must have. Despite this
"list" of requirements, there is a lot of room for creativity!
40 points. Drawing and Double Buffering: You created a program that uses OpenGL and GLUT.
The program compiles and runs. A window appears on the screen. You use double buffering.
Something moves on the screen. The animation is flicker free.
40 points. Movement control: Implement keyboard control for the selected object (e.g. a car).
The car is positioned in the Start Area. Use the following special keys: cursor down, cursor up,
cursor left, cursor right. To make it harder you can forbid the user to break to speed 0, but always
go forward a minimum speed.
10 points. Design / Make a Game / Effort: We will judge the general “design” aspect of the
program. This includes various aspects. E.g. programs with additional features, visual design, ...
will get some more points and programs with undesirable design choices will get less.
Solution
#include
#include
#include
#include
int main()
{
clrscr();
int driver = DETECT,mode;
char *path = "D:pgms"; // place your tc file path
initgraph(&driver,&mode,"");
putpixel(200,300,WHITE);
line(0,400,639,400); //Road
for(int i=0;i<500;i++)
{
line(50+i,370,90+i,370);
arc(110+i,370,0,180+i,20);
line(130+i,370,220+i,370);
arc(240+i,370,0,180+i,20);
line(260+i,370,300+i,370);
line(300+i,370,300+i,350);
line(300+i,350,240+i,330);
line(240+i,330,200+i,300);
line(200+i,300,110+i,300);
line(110+i,300,80+i,300);
line(80+i,300,60+i,340);
line(50+i,340,50+i,370);
line(165+i,305,165+i,330);
line(165+i,330,230+i,330);
line(230+i,330,195+i,305);
line(195+i,305,165+i,305);
line(160+i,305,160+i,330);
line(160+i,330,95+i,330);
line(100+i,330,120+i,305);
line(120+i,305,160+i,305);
circle(110+i,370,17);
circle(220+i,370,17);
delay(10);
}
getch();
closegraph();
return 0;
}

More Related Content

Similar to This project has been designed for you to get experience with basic .pdf

Auto cad 2007-tutorial
Auto cad 2007-tutorialAuto cad 2007-tutorial
Auto cad 2007-tutorial
Syed Javeed
 
ABC Consolidated Financial InfoABC Companys current financial inf.docx
ABC Consolidated Financial InfoABC Companys current financial inf.docxABC Consolidated Financial InfoABC Companys current financial inf.docx
ABC Consolidated Financial InfoABC Companys current financial inf.docx
ransayo
 
K to 12_entrep-based_technical_drafting_learning_module
K to 12_entrep-based_technical_drafting_learning_moduleK to 12_entrep-based_technical_drafting_learning_module
K to 12_entrep-based_technical_drafting_learning_module
Gilbert Bautista
 
Second Life How It Works And How It Doesnt
Second Life How It Works And How It DoesntSecond Life How It Works And How It Doesnt
Second Life How It Works And How It Doesnt
ConSanFrancisco123
 

Similar to This project has been designed for you to get experience with basic .pdf (20)

Introduction to Box2D Physics Engine
Introduction to Box2D Physics EngineIntroduction to Box2D Physics Engine
Introduction to Box2D Physics Engine
 
Presentación Unity
Presentación UnityPresentación Unity
Presentación Unity
 
Autocad 2007 Workbook Tutorial
Autocad 2007 Workbook TutorialAutocad 2007 Workbook Tutorial
Autocad 2007 Workbook Tutorial
 
Данило Ульянич “C89 OpenGL for ARM microcontrollers on Cortex-M. Basic functi...
Данило Ульянич “C89 OpenGL for ARM microcontrollers on Cortex-M. Basic functi...Данило Ульянич “C89 OpenGL for ARM microcontrollers on Cortex-M. Basic functi...
Данило Ульянич “C89 OpenGL for ARM microcontrollers on Cortex-M. Basic functi...
 
Auto cad 2007-tutorial
Auto cad 2007-tutorialAuto cad 2007-tutorial
Auto cad 2007-tutorial
 
Lecture 1 Introduction to VR Programming
Lecture 1 Introduction to VR ProgrammingLecture 1 Introduction to VR Programming
Lecture 1 Introduction to VR Programming
 
Practical work 1
Practical work 1Practical work 1
Practical work 1
 
Building a game engine with jQuery
Building a game engine with jQueryBuilding a game engine with jQuery
Building a game engine with jQuery
 
Absolute Beginners Guide to iPhone dev
Absolute Beginners Guide to iPhone devAbsolute Beginners Guide to iPhone dev
Absolute Beginners Guide to iPhone dev
 
ABC Consolidated Financial InfoABC Companys current financial inf.docx
ABC Consolidated Financial InfoABC Companys current financial inf.docxABC Consolidated Financial InfoABC Companys current financial inf.docx
ABC Consolidated Financial InfoABC Companys current financial inf.docx
 
AutoCAD Architecture
AutoCAD ArchitectureAutoCAD Architecture
AutoCAD Architecture
 
TP_Webots_7mai2021.pdf
TP_Webots_7mai2021.pdfTP_Webots_7mai2021.pdf
TP_Webots_7mai2021.pdf
 
K to 12_entrep-based_technical_drafting_learning_module
K to 12_entrep-based_technical_drafting_learning_moduleK to 12_entrep-based_technical_drafting_learning_module
K to 12_entrep-based_technical_drafting_learning_module
 
Tablet pc
Tablet pcTablet pc
Tablet pc
 
AUTO CAD final prestation.pptx
AUTO CAD final prestation.pptxAUTO CAD final prestation.pptx
AUTO CAD final prestation.pptx
 
Introduction to React Native
Introduction to React NativeIntroduction to React Native
Introduction to React Native
 
Introduction to html5 game programming with impact js
Introduction to html5 game programming with impact jsIntroduction to html5 game programming with impact js
Introduction to html5 game programming with impact js
 
Second Life How It Works And How It Doesnt
Second Life How It Works And How It DoesntSecond Life How It Works And How It Doesnt
Second Life How It Works And How It Doesnt
 
Technical Drafting Learning Module v.2.0
Technical Drafting Learning Module v.2.0Technical Drafting Learning Module v.2.0
Technical Drafting Learning Module v.2.0
 
autocad.pptx
autocad.pptxautocad.pptx
autocad.pptx
 

More from eyeonsecuritysystems

Case Study Synlait Milk is an innovative dairy processing company th.pdf
Case Study Synlait Milk is an innovative dairy processing company th.pdfCase Study Synlait Milk is an innovative dairy processing company th.pdf
Case Study Synlait Milk is an innovative dairy processing company th.pdf
eyeonsecuritysystems
 
Assume you are the new CEO of the Delta Phi Corporation. When the Bo.pdf
Assume you are the new CEO of the Delta Phi Corporation. When the Bo.pdfAssume you are the new CEO of the Delta Phi Corporation. When the Bo.pdf
Assume you are the new CEO of the Delta Phi Corporation. When the Bo.pdf
eyeonsecuritysystems
 
A manager typically spends the least amount of time Communicating Mo.pdf
A manager typically spends the least amount of time Communicating Mo.pdfA manager typically spends the least amount of time Communicating Mo.pdf
A manager typically spends the least amount of time Communicating Mo.pdf
eyeonsecuritysystems
 
Write message.cpp and priorityq.cpp. The code in message.cpp and pri.pdf
Write message.cpp and priorityq.cpp. The code in message.cpp and pri.pdfWrite message.cpp and priorityq.cpp. The code in message.cpp and pri.pdf
Write message.cpp and priorityq.cpp. The code in message.cpp and pri.pdf
eyeonsecuritysystems
 
What aspect of Ethernet can be a problem for security What mechanis.pdf
What aspect of Ethernet can be a problem for security What mechanis.pdfWhat aspect of Ethernet can be a problem for security What mechanis.pdf
What aspect of Ethernet can be a problem for security What mechanis.pdf
eyeonsecuritysystems
 

More from eyeonsecuritysystems (20)

For each step of DNA replication, predict the outcome if • concen.pdf
For each step of DNA replication, predict the outcome if • concen.pdfFor each step of DNA replication, predict the outcome if • concen.pdf
For each step of DNA replication, predict the outcome if • concen.pdf
 
Explain why a virus cant infect every cell Explain why a viru.pdf
Explain why a virus cant infect every cell Explain why a viru.pdfExplain why a virus cant infect every cell Explain why a viru.pdf
Explain why a virus cant infect every cell Explain why a viru.pdf
 
Explain advantages and disadvantages of designing an OS kernel in la.pdf
Explain advantages and disadvantages of designing an OS kernel in la.pdfExplain advantages and disadvantages of designing an OS kernel in la.pdf
Explain advantages and disadvantages of designing an OS kernel in la.pdf
 
Explain three similarities and two diffrences in anaerobic and aerob.pdf
Explain three similarities and two diffrences in anaerobic and aerob.pdfExplain three similarities and two diffrences in anaerobic and aerob.pdf
Explain three similarities and two diffrences in anaerobic and aerob.pdf
 
Exercise 7-8 Kickapoo Company uses an imprest petty cash system. The .pdf
Exercise 7-8 Kickapoo Company uses an imprest petty cash system. The .pdfExercise 7-8 Kickapoo Company uses an imprest petty cash system. The .pdf
Exercise 7-8 Kickapoo Company uses an imprest petty cash system. The .pdf
 
Discussions Grades people Syllabus Modules Google Drive D Question 1 .pdf
Discussions Grades people Syllabus Modules Google Drive D Question 1 .pdfDiscussions Grades people Syllabus Modules Google Drive D Question 1 .pdf
Discussions Grades people Syllabus Modules Google Drive D Question 1 .pdf
 
Discuss the range of interactions that occur between human beings an.pdf
Discuss the range of interactions that occur between human beings an.pdfDiscuss the range of interactions that occur between human beings an.pdf
Discuss the range of interactions that occur between human beings an.pdf
 
Critique the customer contact model. What are its strengths and weak.pdf
Critique the customer contact model. What are its strengths and weak.pdfCritique the customer contact model. What are its strengths and weak.pdf
Critique the customer contact model. What are its strengths and weak.pdf
 
Case Study Synlait Milk is an innovative dairy processing company th.pdf
Case Study Synlait Milk is an innovative dairy processing company th.pdfCase Study Synlait Milk is an innovative dairy processing company th.pdf
Case Study Synlait Milk is an innovative dairy processing company th.pdf
 
An entity with two multivalued attributes will be mapped as how many.pdf
An entity with two multivalued attributes will be mapped as how many.pdfAn entity with two multivalued attributes will be mapped as how many.pdf
An entity with two multivalued attributes will be mapped as how many.pdf
 
Assume you are the new CEO of the Delta Phi Corporation. When the Bo.pdf
Assume you are the new CEO of the Delta Phi Corporation. When the Bo.pdfAssume you are the new CEO of the Delta Phi Corporation. When the Bo.pdf
Assume you are the new CEO of the Delta Phi Corporation. When the Bo.pdf
 
A manager typically spends the least amount of time Communicating Mo.pdf
A manager typically spends the least amount of time Communicating Mo.pdfA manager typically spends the least amount of time Communicating Mo.pdf
A manager typically spends the least amount of time Communicating Mo.pdf
 
Write message.cpp and priorityq.cpp. The code in message.cpp and pri.pdf
Write message.cpp and priorityq.cpp. The code in message.cpp and pri.pdfWrite message.cpp and priorityq.cpp. The code in message.cpp and pri.pdf
Write message.cpp and priorityq.cpp. The code in message.cpp and pri.pdf
 
Will a Pigovian tax always be equal to the marginal external cost of.pdf
Will a Pigovian tax always be equal to the marginal external cost of.pdfWill a Pigovian tax always be equal to the marginal external cost of.pdf
Will a Pigovian tax always be equal to the marginal external cost of.pdf
 
Would you identify UTC’s approach to supply chain managemet as ce.pdf
Would you identify UTC’s approach to supply chain managemet as ce.pdfWould you identify UTC’s approach to supply chain managemet as ce.pdf
Would you identify UTC’s approach to supply chain managemet as ce.pdf
 
White collar crimes are best defined as a wide variety of nonviolent.pdf
White collar crimes are best defined as a wide variety of nonviolent.pdfWhite collar crimes are best defined as a wide variety of nonviolent.pdf
White collar crimes are best defined as a wide variety of nonviolent.pdf
 
Why do we diverge from the Rational Choice Paradigm when identifying.pdf
Why do we diverge from the Rational Choice Paradigm when identifying.pdfWhy do we diverge from the Rational Choice Paradigm when identifying.pdf
Why do we diverge from the Rational Choice Paradigm when identifying.pdf
 
Why is lactose much more soluble in water than in ethanolSolu.pdf
Why is lactose much more soluble in water than in ethanolSolu.pdfWhy is lactose much more soluble in water than in ethanolSolu.pdf
Why is lactose much more soluble in water than in ethanolSolu.pdf
 
Which of the following is a technology that takes an Internet sig.pdf
Which of the following is a technology that takes an Internet sig.pdfWhich of the following is a technology that takes an Internet sig.pdf
Which of the following is a technology that takes an Internet sig.pdf
 
What aspect of Ethernet can be a problem for security What mechanis.pdf
What aspect of Ethernet can be a problem for security What mechanis.pdfWhat aspect of Ethernet can be a problem for security What mechanis.pdf
What aspect of Ethernet can be a problem for security What mechanis.pdf
 

Recently uploaded

Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
SoniaTolstoy
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 

Recently uploaded (20)

fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 

This project has been designed for you to get experience with basic .pdf