Final Project Virtual Slot Machine. By: Bander Alrogi Khaled Al Nuaimi Mohammed Almajhad Metaib Al-Enzai Course Title: ECE 2552 Instructor: Dr Kepuska.

Slides:



Advertisements
Similar presentations
First of all – lets look at the windows you are going to use. At the top you have a toolbar, with all your various tools you can use when customising your.
Advertisements

Computer Graphics- SCC 342
Lecture 2 Concepts, Terms and Definitions. Display Devices They are divided into a lot of small squares called pixels (“PICture ELements”). Each pixel.
Graphics Shapes. Setup for using graphics You have to import the graphics library You can use either “import graphics” or “from graphics import *” or.
CS 376 Introduction to Computer Graphics 02 / 02 / 2007 Instructor: Michael Eckmann.
Week 8 - Monday.  What did we talk about last time?  StdAudio.
BGI graphics library And Visual Studio.
RAPTOR Syntax and Semantics By Lt Col Schorsch
PHY-102 SAPIntroductory GraphicsSlide 1 Introductory Graphics In this section we will learn how about how to draw graphics on the screen in Java:  Drawing.
Week 7: Input and Output 1.  Now we are going to talk a little bit about output  You have a lot of experience with System.out.println() and System.out.print()
Introduction to Illustrator. With the release of Illustrator, Adobe has completed a tightly integrated trio of applications (Photoshop, InDesign and now.
“Computers and Creativity”
Motor control drive in circles Pragmas configure motors Turning right in function of time Turning left in function of time Main program starts from here.
Subdue Graph Visualizer by Gayathri Sampath, M.S. (CSE) University of Texas at Arlington.
Graphics Output Primitives Pixel Addressing and Fill Area Dr. M. Al-Mulhem Feb. 1, 2008.
Four simple expressions in meta. Data objects Pieces of data in a computer are called objects Today, we’ll talk about four kinds of objects Numbers Pictures.
1 Python Programming: An Introduction to Computer Science Chapter 3 Objects and Graphics.
Computer Monitors Principles of Information Technology Lytle High School Click to Continue.
2 What is pyGame? A set of Python modules to make it easier to write games. –home page: –documentation:
Addison Wesley is an imprint of © 2010 Pearson Addison-Wesley. All rights reserved. Chapter 3 Variables, Calculations, and Colors Starting Out with Games.
CS 450: Computer Graphics PIXEL AdDRESSING AND OBJECT GEOMETRY
ECE291 Computer Engineering II Lecture 9 Josh Potts University of Illinois at Urbana- Champaign.
Video Monitor Uses raster scanning to display images –Beam of electrons illuminates phosphorus dots on the screen called pixels. Starting at the top of.
Computer Graphics Lecture 1 July 11, Computer Graphics What do you think of? The term “computer graphics” is a blanket term used to refer to the.
Creating a PowerPoint Presentation
ECE 448: Lab 6 VGA Display (mini chess game). Video Graphic Array (VGA) Resolution: 640x480 Display: 16 colors (4 bits), 256 colors (8 bits) Refresh Rate:
1. Insert the Resource CD into your CD-ROM drive, click Start and choose Run. In the field that appears, enter F:\XXX\Setup.exe (if “F” is the letter of.
GRAPHICS AND MOUSE PROGRAMMING IN C. Turbo C has a good collection of graphics libraries. If you know the basics of C, you can easily learn graphics programming.
Microsoft® Small Basic
Addison Wesley is an imprint of © 2010 Pearson Addison-Wesley. All rights reserved. Chapter 7 The Game Loop and Animation Starting Out with Games & Graphics.
Graphics Concepts CS 2302, Fall /3/20142 Drawing Paths.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved CheckWriter Application Introducing Graphics and Printing.
CREATING A POWERPOINT PRESENTATION. Planning a presentation Create a presentation Rearrange and delete text and slides Add animations Add transitions.
Agent P, I have been hearing some rumours about a Python Turtle.
به نام خدا تنظیم کننده : فرانه حدادی استاد : مهندس زمانیان تابستان 92.
Introduction Computer Graphics & Its application Types of computer graphics Graphic display : random Scan & Raster Scan display Frame buffer and video.
Addison Wesley is an imprint of © 2010 Pearson Addison-Wesley. All rights reserved. Chapter 2 Graphics Programming with C++ and the Dark GDK Library Starting.
Processing Lab 3 – Header issues and trace editing Bryce Hutchinson Objectives: Fixing elevation issues Define an LMO function Pick first breaks Kill traces.
Programming for Artists ART 315 Dr. J. R. Parker Art/Digital Media Lab Lec 10 Fall 2010.
How to link the robot and the computer (Bluetooth) How to turn on and off How to connect the adaptor Fluke card connection Sec Getting Started How.
Introduction to Flash Animation CS 318. Topics Introduction to Flash and animation The Flash development environment Creating Flash animations  Layers.
Loops & Graphics IP 10 Mr. Mellesmoen Recall Earlier we wrote a program listing numbers from 1 – 24 i=1 start: TextWindow.WriteLine(i) i=i+1 If.
1 Building Java Programs Supplement 3G: Graphics These lecture notes are copyright (C) Marty Stepp and Stuart Reges, They may not be rehosted, sold,
CMP 131 Introduction to Computer Programming Violetta Cavalli-Sforza Week 3, Lecture 1.
Algorithms Writing instructions in the order they should execute.
10/15/02 (c) 2002 University of Wisconsin, CS559 Who Am I? Prof Stephen Chenney These notes will be online after the lecture – in fact they’re online already.
SIMULINK-Tutorial 1 Class ECES-304 Presented by : Shubham Bhat.
Graphics and Java2D Chapter Java Coordinate System Origin is in _____________ corner –Behind title bar of window X values increase to the ________.
A1 Acoustic Rhinometer The following presentation gives an overview of the main functions of the A1Acoustic Rhinometer, it’s accessories and normal operational.
Digital & Interactive Media
Open a new Flash File Action Script 2.0. Create a button like you did last lesson and name it Click to Play.
Introduction to Computer Programming - Project 2 Intro to Digital Technology.
CS305j Introduction to Computing Simple Graphics 1 Topic 11 Simple Graphics "What makes the situation worse is that the highest level CS course I've ever.
Introduction to Graphics. Graphical objects To draw pictures, we will use three classes of objects: –DrawingPanel : A window on the screen. –Graphics.
PyGame - Unit 1 PyGame Unit – – Introduction to PyGame.
Lecture 11 Text mode video
Direct-Access Color Graphics Chapter 11. Graphics modes C++ provides a different combination of graphics characteristics. These characteristics include.
Computer Graphics CC416 Lecture 04: Bresenham Line Algorithm & Mid-point circle algorithm Dr. Manal Helal – Fall 2014.
Digital & Interactive Media
An Introduction to Computers and Visual Basic
Example: Card Game Create a class called “Card”
An Introduction to Computers and Visual Basic
Microprocessor and Assembly Language
Agent P, I have been hearing some rumours about a Python Turtle.
Items, Group Boxes, Check Boxes & Radio Buttons
Otasuke GP-EX! Chapter 1 Menu Screen.
Graphics Systems Lecture-2
An Introduction to Computers and Visual Basic
2D Shapes Rectangle Circle Triangle Rectangle. What shape is the door? Rectangle.
Presentation transcript:

Final Project Virtual Slot Machine. By: Bander Alrogi Khaled Al Nuaimi Mohammed Almajhad Metaib Al-Enzai Course Title: ECE 2552 Instructor: Dr Kepuska Spring 2005

Concepts Used ClassesInheritance Abstract Class Graphic Mode and Objects Sound Function

Objective To create a program that is a simulation of a Virtual Slot Machine used specially for gambling. Color shapes appear in a window, as if slot machine wheels were turning.

Functionalities When we start the program, three square windows appear on the screen. One of four different shapes appears randomly in each window. Red circle (apple), blue circle (blueberry), square, and pyramid. Each time a shape appears, a click sound is heard. Gradually, the shapes appear more and more slowly, as if the slot machine wheel were slowing down. Finally they stop, and the program sounds a two-tone signal. If the three shapes are same, you win otherwise you lost.

Class Hierarchy Shape RectangleBallTriangleNo Shape Wheel BlueberryAppleSquarePyramid

Graphics Display Points, Lines, and Shapes Address individual pixels and dots Resolution of 640*480 VGA mode can address 307,200 pixels

Graphics initgraph() Function: It must be executed before any other graphic mode function can be used. It switches your computer’s display system into the appropriate graphics mode. Uses Graphic.h header file

Graphics Graphics Driver To specify the mode, we need to choose appropriate values for the parameters to initgraph(). Graphics Mode Specify the specific mode to be used. For example CGA, EGA, VGA,….

Graphics Driver = DETECT Let the system decide what graphic mode to use, it checks the adaptor and choose the driver and mode that gives the highest resolution. Set the driver argument to the constant DETECT.

Graphics initgraph(&drive, &mode, "c:\\tc\\bgi"); Address of Operator: & Instead of using like EGA and EGAHI, we placed them in variables driver and mode. & Symbol address where the constants are stored.

Graphics initgraph(&drive, &mode, "c:\\tc\\bgi"); Path: It’s the path to the graphic driver. This argument must be specified whether you use auto-detect or specify a mode yourself.

Graphics Closegraph() When exit from the graphics program, we should restore the system to the video mode that was previously in use.

Sound Generation Sound Generation requires three steps 1.Turning the sound on 2.Delaying for an appropriate amount of time 3.Turning the sound off

Sound Generation Sound() function It sets the sound generation to a specific frequency in Hertz. The range of the frequency varies from 15 Hertz to 3000 Hertz. Once this function is executed, the sound remains on until specifically stopped.

Sound Generation Delay() function Function to control how long the sound will continue. It takes simple argument in milliseconds. Nosound() function Takes no argument and it turn off the sound.

Drawing Shapes Circle It takes the (x, y) co-ordinates and radius as parameters to draw it circle (x, y, radius);

Drawing Shapes Rectangle It takes the top-left co-ordinates and the right-bottom co-ordinates as parameters to draw it rectangle (x1, y1, x2, y2);

Drawing Shapes Triangle Fillpoly function draws and fill a polygon. It takes 2 input arguments. Number of points, and the points to a sequence of (numpoint * 2). Each pair of integers gives x and y co-ordinates of a point on the polygon. triangle[] = {x1, y1, x2, y2, x3, y3}; fillpoly (3, triangle[]);