DRAWING AND MOVING IMAGES

Size: px
Start display at page:

Download "DRAWING AND MOVING IMAGES"

Transcription

1 DRAWING AND MOVING IMAGES Moving images and shapes in a Visual Basic application simply requires the user of a Timer that changes the x- and y-positions every time the Timer ticks. In our first example, we will look at how to move a simple shape. MOVING SHAPES To move a shape, the first thing we will do is draw a circle when the form loads and the user clicks anywhere in the form. Let s start by creating a simple form with two buttons (btnstart and btnstop) and a Timer called tmrtimer. Now let s create a few variables that we re going to need for this program: Public Class MovingBall Private g As Graphics Private mybrush As SolidBrush Private xpos, ypos As Integer Private start As Boolean End Class Drawing and Moving Images Page 1 of 7

2 We will obviously need a Graphics object and a SolidBrush object so that we can draw our shape. What we re also going to need are two variables to keep track of the x-position and the y-position of the shape that we will be drawing. Finally, we will need a Boolean variable to determine when we want the shape to be drawn. I ve called the Boolean start. Let s now add some code that will set the initial values of our variables: Private Sub MovingBall_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load g = Me.CreateGraphics() mybrush = New SolidBrush(Color.CadetBlue) xpos = 0 ypos = 0 start = False btnstart.enabled = False btnstop.enabled = False When the form loads, I simply want to set the x- and y-positions to 0 by default and set my Boolean variable start to false because I m not going to want to draw anything until the user clicks the form. Now let s do something when the user clicks the form with the mouse: Private Sub MovingBall_MouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseClick xpos = e.x ypos = e.y start = True btnstart.enabled = True When the user clicks on the form, we re simply going to set the x- and y-position to the x- and y-position of the mouse cursor. We will also set our start variable to true and refresh the screen so that the program can go to the Paint() method where we will have the code we need to draw our shape. Private Sub MovingBall_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint If start = True Then g.fillellipse(mybrush, xpos, ypos, 75, 75) Drawing and Moving Images Page 2 of 7

3 In our Paint() method we are going to draw a simple circle 75 pixels wide and 75 pixels high at the x- and y-positions that are set when the user clicks the form. Right now when you run the program, a circle should be drawn wherever the user clicks on the form: Now let s get the circle moving when the user clicks the START button. For this to happen, all we need to do is simply start our timer: Private Sub btnstart_click(byval sender As System.Object, ByVal e As System.EventArgs) Handles btnstart.click btnstart.enabled = False btnstop.enabled = True tmrtimer.start() You ll notice I also disabled the START button and enabled the STOP button. The reason for this is because I don t want the user to click START while the object is already moving. While we re dealing with the starting of the timer we might as well write the code for our STOP button, which will simply stop the timer and thus stop the circle from moving: Private Sub btnstop_click(byval sender As System.Object, ByVal e As System.EventArgs) Handles btnstop.click btnstop.enabled = False Drawing and Moving Images Page 3 of 7

4 btnstart.enabled = True tmrtimer.stop() Our final step is writing code for our Timer object. The only thing we need to do here is increase the x- position and the y-position by whatever number of pixels we want and refresh the screen: Private Sub tmrtimer_tick(byval sender As System.Object, ByVal e As System.EventArgs) Handles tmrtimer.tick xpos += 5 ypos += 5 That s it! Now when you run the program, the circle will start moving diagonally once you click the form and click the START button. The shape will stop moving when the user clicks STOP because this will stop the timer. DRAWING AND MOVING AN IMAGE To move an image is exactly the same thing, the only difference is that instead of drawing a shape you need to draw an image. Drawing an image in Visual Basic is very simple. The first thing you need is an image which you will need to declare. For this example, I will declare an image and call it imggreenlantern: Private imggreenlantern As Image When the form loads, initialize your Image object by getting the file: imggreenlantern = Image.FromFile(Directory.GetCurrentDirectory() & "\images\green_lantern.png") Remember to import System.IO so that you can use the Directory class and retrieve the picture file from the default directory. Now you will need to replace the FillEllipse() method that we used in the Paint() method with DrawImage(). There are a number of ways that you can use the DrawImage() method in Visual Basic. The following are a list of some of the common ways that DrawImage() is used: METHOD DrawImage(Image, Int32, Int32) DESCRIPTION Draws the specified image, using its original physical size, at the location specified by a coordinate pair. Drawing and Moving Images Page 4 of 7

5 DrawImage(Image, Int32, Int32, Int32, Int32) DrawImage(Image, Int32, Int32, Rectangle, GraphicsUnit) DrawImage(Image, Point) Draws the specified Image at the specified location and with the specified size. Draws a portion of an image at a specified location. Draws the specified Image, using its original physical size, at the specified location. Replace the code you have in the Paint() method with the following code to draw an image: Private Sub MovingBall_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint If start = True Then g.drawimage(imggreenlantern, xpos, ypos, imggreenlantern.width, imggreenlantern.height) Now when you run the program, you will see an image moving diagonally across the screen instead of a circle. Drawing and Moving Images Page 5 of 7

6 CHECKING IF AN OBJECT IS OFF THE SCREEN You ll notice that as the image continues to move, eventually it goes off the screen. If you don t want an image to go off the screen or you want something to happen when an image goes off the screen, you need to write code that first checks where the image is and then does something when it reaches a certain point. Let s start by checking if the image goes off the screen on the right. To do this, we need to write code in our Timer that checks the position of the image every time the Timer ticks. The code would look something like this: Private Sub tmrtimer_tick(byval sender As System.Object, ByVal e As System.EventArgs) Handles tmrtimer.tick xpos += 5 ypos += 5 If xpos > Me.Width Then xpos = -imggreenlantern.width Now when you run the program, you ll notice that the image goes back to the right side of the screen and gradually reappears when it goes off the screen to the right. Let s do the same thing for when the image goes off the screen at the bottom, in which case we want to move it back to the top: Private Sub tmrtimer_tick(byval sender As System.Object, ByVal e As System.EventArgs) Handles tmrtimer.tick xpos += 5 ypos += 5 If xpos > Me.Width Then xpos = -imggreenlantern.width If ypos > Me.Height Then ypos = -imggreenlantern.height Drawing and Moving Images Page 6 of 7

7 Now when the image goes off the screen at the bottom or on the right, it will return back. Drawing and Moving Images Page 7 of 7

OVERLOADING METHODS AND CONSTRUCTORS: The Ball Class

OVERLOADING METHODS AND CONSTRUCTORS: The Ball Class OVERLOADING METHODS AND CONSTRUCTORS: The Ball Class Create a Ball Demo program that uses a Ball class. Use the following UML diagram to create the Ball class: Ball - ballcolor: Color - ballwidth, ballheight:

More information

(0,0) (600, 400) CS109. PictureBox and Timer Controls

(0,0) (600, 400) CS109. PictureBox and Timer Controls CS109 PictureBox and Timer Controls Let s take a little diversion and discuss how to draw some simple graphics. Graphics are not covered in the book, so you ll have to use these notes (or the built-in

More information

PROGRAMMING ASSIGNMENT: MOVIE QUIZ

PROGRAMMING ASSIGNMENT: MOVIE QUIZ PROGRAMMING ASSIGNMENT: MOVIE QUIZ For this assignment you will be responsible for creating a Movie Quiz application that tests the user s of movies. Your program will require two arrays: one that stores

More information

Chapter 13. Graphics, Animation, Sound, and Drag-and-Drop. McGraw-Hill. Copyright 2011 by The McGraw-Hill Companies, Inc. All Rights Reserved.

Chapter 13. Graphics, Animation, Sound, and Drag-and-Drop. McGraw-Hill. Copyright 2011 by The McGraw-Hill Companies, Inc. All Rights Reserved. Chapter 13 Graphics, Animation, Sound, and Drag-and-Drop McGraw-Hill Copyright 2011 by The McGraw-Hill Companies, Inc. All Rights Reserved. Objectives (1 of 2) Use Graphics methods to draw shapes, lines,

More information

C4.3, 4 Lab: Conditionals - Select Statement and Additional Input Controls Solutions

C4.3, 4 Lab: Conditionals - Select Statement and Additional Input Controls Solutions C4.3, 4 Lab: Conditionals - Select Statement and Additional Input Controls Solutions Between the comments included with the code and the code itself, you shouldn t have any problems understanding what

More information

Introduction. Create a New Project. Create the Main Form. Assignment 1 Lights Out! in C# GUI Programming 10 points

Introduction. Create a New Project. Create the Main Form. Assignment 1 Lights Out! in C# GUI Programming 10 points Assignment 1 Lights Out! in C# GUI Programming 10 points Introduction In this lab you will create a simple C# application with a menu, some buttons, and an About dialog box. You will learn how to create

More information

Animations that make decisions

Animations that make decisions Chapter 17 Animations that make decisions 17.1 String decisions Worked Exercise 17.1.1 Develop an animation of a simple traffic light. It should initially show a green disk; after 5 seconds, it should

More information

Capturing the Mouse. Dragging Example

Capturing the Mouse. Dragging Example Capturing the Mouse In order to allow the user to drag something, you need to keep track of whether the mouse is "down" or "up". It is "down" from the MouseDown event to the subsequent MouseUp event. What

More information

Form Adapter Example. DRAFT Document ID : Form_Adapter.PDF Author : Michele Harris Version : 1.1 Date :

Form Adapter Example. DRAFT Document ID : Form_Adapter.PDF Author : Michele Harris Version : 1.1 Date : Form Adapter Example DRAFT Document ID : Form_Adapter.PDF Author : Michele Harris Version : 1.1 Date : 2009-06-19 Form_Adapter.doc DRAFT page 1 Table of Contents Creating Form_Adapter.vb... 2 Adding the

More information

Painting your window

Painting your window The Paint event "Painting your window" means to make its appearance correct: it should reflect the current data associated with that window, and any text or images or controls it contains should appear

More information

HOW TO. In this section, you will find. miscellaneous handouts that explain. HOW TO do various things.

HOW TO. In this section, you will find. miscellaneous handouts that explain. HOW TO do various things. In this section, you will find miscellaneous handouts that explain do various things. 140 SAVING Introduction Every time you do something, you should save it on the DESKTOP. Click Save and then click on

More information

Instructor s Notes Programming Logic Printing Reports. Programming Logic. Printing Custom Reports

Instructor s Notes Programming Logic Printing Reports. Programming Logic. Printing Custom Reports Instructor s Programming Logic Printing Reports Programming Logic Quick Links & Text References Printing Custom Reports Printing Overview Page 575 Linking Printing Objects No book reference Creating a

More information

Mr.Khaled Anwar ( )

Mr.Khaled Anwar ( ) The Rnd() function generates random numbers. Every time Rnd() is executed, it returns a different random fraction (greater than or equal to 0 and less than 1). If you end execution and run the program

More information

HOUR 4 Understanding Events

HOUR 4 Understanding Events HOUR 4 Understanding Events It s fairly easy to produce an attractive interface for an application using Visual Basic.NET s integrated design tools. You can create beautiful forms that have buttons to

More information

Else. End If End Sub End Class. PDF created with pdffactory trial version

Else. End If End Sub End Class. PDF created with pdffactory trial version Dim a, b, r, m As Single Randomize() a = Fix(Rnd() * 13) b = Fix(Rnd() * 13) Label1.Text = a Label3.Text = b TextBox1.Clear() TextBox1.Focus() Private Sub Button2_Click(ByVal sender As System.Object, ByVal

More information

Class Test 5. Create a simple paint program that conforms to the following requirements.

Class Test 5. Create a simple paint program that conforms to the following requirements. Class Test 5 Question 1 Use visual studio 2012 ultimate to create a C# windows forms application. Create a simple paint program that conforms to the following requirements. The control box is disabled

More information

Smoother Graphics Taking Control of Painting the Screen

Smoother Graphics Taking Control of Painting the Screen It is very likely that by now you ve tried something that made your game run rather slow. Perhaps you tried to use an image with a transparent background, or had a gazillion objects moving on the window

More information

[ the academy_of_code] Senior Beginners

[ the academy_of_code] Senior Beginners [ the academy_of_code] Senior Beginners 1 Drawing Circles First step open Processing Open Processing by clicking on the Processing icon (that s the white P on the blue background your teacher will tell

More information

VARIABLES. 1. STRINGS Data with letters and/or characters 2. INTEGERS Numbers without decimals 3. FLOATING POINT NUMBERS Numbers with decimals

VARIABLES. 1. STRINGS Data with letters and/or characters 2. INTEGERS Numbers without decimals 3. FLOATING POINT NUMBERS Numbers with decimals VARIABLES WHAT IS A VARIABLE? A variable is a storage location in the computer s memory, used for holding information while the program is running. The information that is stored in a variable may change,

More information

Responding to the Mouse

Responding to the Mouse Responding to the Mouse The mouse has two buttons: left and right. Each button can be depressed and can be released. Here, for reference are the definitions of three common terms for actions performed

More information

Learning VB.Net. Tutorial 19 Classes and Inheritance

Learning VB.Net. Tutorial 19 Classes and Inheritance Learning VB.Net Tutorial 19 Classes and Inheritance Hello everyone welcome to vb.net tutorials. These are going to be very basic tutorials about using the language to create simple applications, hope you

More information

Dice in Google SketchUp

Dice in Google SketchUp A die (the singular of dice) looks so simple. But if you want the holes placed exactly and consistently, you need to create some extra geometry to use as guides. Plus, using components for the holes is

More information

Using Visual Studio. Solutions and Projects

Using Visual Studio. Solutions and Projects Using Visual Studio Solutions and Projects A "solution" contains one or several related "projects". Formerly, the word workspace was used instead of solution, and it was a more descriptive word. For example,

More information

Tutorial 03 understanding controls : buttons, text boxes

Tutorial 03 understanding controls : buttons, text boxes Learning VB.Net Tutorial 03 understanding controls : buttons, text boxes Hello everyone welcome to vb.net tutorials. These are going to be very basic tutorials about using the language to create simple

More information

To enter the number in decimals Label 1 To show total. Text:...

To enter the number in decimals Label 1 To show total. Text:... Visual Basic tutorial - currency converter We will use visual studio to create a currency converter where we can convert a UK currency pound to other currencies. This is the interface for the application.

More information

Visual C# Program: Simple Game 3

Visual C# Program: Simple Game 3 C h a p t e r 6C Visual C# Program: Simple Game 3 In this chapter, you will learn how to use the following Visual C# Application functions to World Class standards: Opening Visual C# Editor Beginning a

More information

In this tutorial we will create a simple calculator to Add/Subtract/Multiply and Divide two numbers and show a simple message box result.

In this tutorial we will create a simple calculator to Add/Subtract/Multiply and Divide two numbers and show a simple message box result. Simple Calculator In this tutorial we will create a simple calculator to Add/Subtract/Multiply and Divide two numbers and show a simple message box result. Let s get started First create a new Visual Basic

More information

Lesson 5: Creating Heterogeneous Parts

Lesson 5: Creating Heterogeneous Parts Lesson 5: Creating Heterogeneous Parts Lesson Objectives After you complete this lesson you will be able to: Create a Heterogeneous part Annotate a Heterogeneous part (Optional) Heterogeneous Parts A heterogeneous

More information

What is a variable? A named locajon in the computer s memory. A variable stores values

What is a variable? A named locajon in the computer s memory. A variable stores values Chapter 4 Summary/review coordinate system basic drawing commands and their parameters (rect, line, ellipse,background, stroke, fill) color model - RGB + alpha Processing IDE - entering/saving/running

More information

We ve covered enough material so far that we can write very sophisticated programs. Let s cover a few more examples that use arrays.

We ve covered enough material so far that we can write very sophisticated programs. Let s cover a few more examples that use arrays. Arrays Part 2 We ve covered enough material so far that we can write very sophisticated programs. Let s cover a few more examples that use arrays. First, once in a while it may be useful to be able to

More information

Honors Computer Science Python Mr. Clausen Program 7A, 7B

Honors Computer Science Python Mr. Clausen Program 7A, 7B Honors Computer Science Python Mr. Clausen Program 7A, 7B PROGRAM 7A Turtle Graphics Animation (100 points) Here is the overview of the program. Use functions to draw a minimum of two background scenes.

More information

Word 2003: Flowcharts Learning guide

Word 2003: Flowcharts Learning guide Word 2003: Flowcharts Learning guide How can I use a flowchart? As you plan a project or consider a new procedure in your department, a good diagram can help you determine whether the project or procedure

More information

Now it only remains to supply the code. Begin by creating three fonts:

Now it only remains to supply the code. Begin by creating three fonts: Owner-Draw Menus Normal menus are always drawn in the same font and the same size. But sometimes, this may not be enough for your purposes. For example, here is a screen shot from MathXpert: Notice in

More information

FRC LabVIEW Sub vi Example

FRC LabVIEW Sub vi Example FRC LabVIEW Sub vi Example Realizing you have a clever piece of code that would be useful in lots of places, or wanting to un clutter your program to make it more understandable, you decide to put some

More information

Microsoft Visual Basic.NET Projects for the Classroom Written by Alfred C Thompson II Distributed by Mainfunction.com

Microsoft Visual Basic.NET Projects for the Classroom Written by Alfred C Thompson II Distributed by Mainfunction.com Microsoft Visual Basic.NET Projects for the Classroom Written by Alfred C Thompson II Distributed by Mainfunction.com Page 1 Introduction...4 Introduction to the Visual Basic.NET edition...4 Why we have

More information

Object-Oriented Programming in Processing

Object-Oriented Programming in Processing Object-Oriented Programming in Processing Object-Oriented Programming We ve (kinda) been doing this since Day 1: Python is a deeply object oriented language Most of the data types we were using (strings,

More information

Chapter 13. Graphics, Animation, Sound and Drag-and-Drop The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill

Chapter 13. Graphics, Animation, Sound and Drag-and-Drop The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Chapter 13 Graphics, Animation, Sound and Drag-and-Drop McGraw-Hill 2010 The McGraw-Hill Companies, Inc. All rights reserved. Chapter Objectives - 1 Use Graphics methods to draw shapes, lines, and filled

More information

Create a memory DC for double buffering

Create a memory DC for double buffering Animation Animation is implemented as follows: Create a memory DC for double buffering Every so many milliseconds, update the image in the memory DC to reflect the motion since the last update, and then

More information

Learning VB.Net. Tutorial 10 Collections

Learning VB.Net. Tutorial 10 Collections Learning VB.Net Tutorial 10 Collections Hello everyone welcome to vb.net tutorials. These are going to be very basic tutorials about using the language to create simple applications, hope you enjoy it.

More information

IMS1906: Business Software Fundamentals Tutorial exercises Week 5: Variables and Constants

IMS1906: Business Software Fundamentals Tutorial exercises Week 5: Variables and Constants IMS1906: Business Software Fundamentals Tutorial exercises Week 5: Variables and Constants These notes are available on the IMS1906 Web site http://www.sims.monash.edu.au Tutorial Sheet 4/Week 5 Please

More information

CSci 1113, Fall 2015 Lab Exercise 11 (Week 13): Discrete Event Simulation. Warm-up. Stretch

CSci 1113, Fall 2015 Lab Exercise 11 (Week 13): Discrete Event Simulation. Warm-up. Stretch CSci 1113, Fall 2015 Lab Exercise 11 (Week 13): Discrete Event Simulation It's time to put all of your C++ knowledge to use to implement a substantial program. In this lab exercise you will construct a

More information

What is a variable? a named location in the computer s memory. mousex mousey. width height. fontcolor. username

What is a variable? a named location in the computer s memory. mousex mousey. width height. fontcolor. username What is a variable? a named location in the computer s memory mousex mousey width height fontcolor username Variables store/remember values can be changed must be declared to store a particular kind of

More information

Adobe Illustrator. Quick Start Guide

Adobe Illustrator. Quick Start Guide Adobe Illustrator Quick Start Guide 1 In this guide we will cover the basics of setting up an Illustrator file for use with the laser cutter in the InnovationStudio. We will also cover the creation of

More information

In this lecture we will briefly examine a few new controls, introduce the concept of scope, random numbers, and drawing simple graphics.

In this lecture we will briefly examine a few new controls, introduce the concept of scope, random numbers, and drawing simple graphics. Additional Controls, Scope, Random Numbers, and Graphics CS109 In this lecture we will briefly examine a few new controls, introduce the concept of scope, random numbers, and drawing simple graphics. Combo

More information

Animations involving numbers

Animations involving numbers 136 Chapter 8 Animations involving numbers 8.1 Model and view The examples of Chapter 6 all compute the next picture in the animation from the previous picture. This turns out to be a rather restrictive

More information

TUTORIAL No 1: Page Setup

TUTORIAL No 1: Page Setup TUTORIAL No 1: Page Setup Skill Level: Foundation This tutorial shows you how to set up a workspace to draw in. The workspace is the area you are working in on the screen. 1. Open 2D Design. A screen with

More information

Pointers, Arrays and Parameters

Pointers, Arrays and Parameters Pointers, Arrays and Parameters This exercise is different from our usual exercises. You don t have so much a problem to solve by creating a program but rather some things to understand about the programming

More information

Revision for Final Examination (Second Semester) Grade 9

Revision for Final Examination (Second Semester) Grade 9 Revision for Final Examination (Second Semester) Grade 9 Name: Date: Part 1: Answer the questions given below based on your knowledge about Visual Basic 2008: Question 1 What is the benefit of using Visual

More information

Do a domain analysis by hand-drawing three or more pictures of what the world program will look like at different stages when it is running.

Do a domain analysis by hand-drawing three or more pictures of what the world program will look like at different stages when it is running. How to Design Worlds The How to Design Worlds process provides guidance for designing interactive world programs using big-bang. While some elements of the process are tailored to big-bang, the process

More information

FrontPage 98 Quick Guide. Copyright 2000 Peter Pappas. edteck press All rights reserved.

FrontPage 98 Quick Guide. Copyright 2000 Peter Pappas. edteck press All rights reserved. Master web design skills with Microsoft FrontPage 98. This step-by-step guide uses over 40 full color close-up screen shots to clearly explain the fast and easy way to design a web site. Use edteck s QuickGuide

More information

Final Exam Winter 2013

Final Exam Winter 2013 Final Exam Winter 2013 1. Which modification to the following program makes it so that the display shows just a single circle at the location of the mouse. The circle should move to follow the mouse but

More information

My first game. 'function which adds objects with bug tag to bugarray array. Saturday, November 23, :06 AM

My first game. 'function which adds objects with bug tag to bugarray array. Saturday, November 23, :06 AM My first game Saturday, November 23, 2013 5:06 AM Public Class Form1 Dim moveright As Boolean = False Dim moveup As Boolean = False Dim moveleft As Boolean = False Dim movedown As Boolean = False Dim score

More information

Visual Basic 2008 The programming part

Visual Basic 2008 The programming part Visual Basic 2008 The programming part Code Computer applications are built by giving instructions to the computer. In programming, the instructions are called statements, and all of the statements that

More information

A Second Visual BASIC Application : Greetings

A Second Visual BASIC Application : Greetings The Greetings Program A Second Visual BASIC Application : Greetings The following instructions take you through the steps to create a simple application. A greeting is displayed in one of four different

More information

+ Inheritance. Sometimes we need to create new more specialized types that are similar to types we have already created.

+ Inheritance. Sometimes we need to create new more specialized types that are similar to types we have already created. + Inheritance + Inheritance Classes that we design in Java can be used to model some concept in our program. For example: Pokemon a = new Pokemon(); Pokemon b = new Pokemon() Sometimes we need to create

More information

VISUAL BASIC II CC111 INTRODUCTION TO COMPUTERS

VISUAL BASIC II CC111 INTRODUCTION TO COMPUTERS VISUAL BASIC II CC111 INTRODUCTION TO COMPUTERS Intended Learning Objectives Able to build a simple Visual Basic Application. 2 The Sub Statement Private Sub ControlName_eventName(ByVal sender As System.Object,

More information

MapWindow Plug-in Development

MapWindow Plug-in Development MapWindow Plug-in Development Sample Project: Simple Path Analyzer Plug-in A step-by-step guide to creating a custom MapWindow Plug-in using the IPlugin interface by Allen Anselmo shade@turbonet.com Introduction

More information

What can we do with Processing? Let s check. Natural Language and Dialogue Systems Lab Guest Image. Remember how colors work.

What can we do with Processing? Let s check. Natural Language and Dialogue Systems Lab Guest Image. Remember how colors work. MIDTERM REVIEW: THURSDAY I KNOW WHAT I WANT TO REVIEW. BUT ALSO I WOULD LIKE YOU TO TELL ME WHAT YOU MOST NEED TO GO OVER FOR MIDTERM. BY EMAIL AFTER TODAY S CLASS. What can we do with Processing? Let

More information

Lesson 6A Loops. By John B. Owen All rights reserved 2011, revised 2014

Lesson 6A Loops. By John B. Owen All rights reserved 2011, revised 2014 Lesson 6A Loops By John B. Owen All rights reserved 2011, revised 2014 Topic List Objectives Loop structure 4 parts Three loop styles Example of a while loop Example of a do while loop Comparison while

More information

Decision Structures. Start. Do I have a test in morning? Study for test. Watch TV tonight. Stop

Decision Structures. Start. Do I have a test in morning? Study for test. Watch TV tonight. Stop Decision Structures In the programs created thus far, Visual Basic reads and processes each of the procedure instructions in turn, one after the other. This is known as sequential processing or as the

More information

Your screen may look different from mine below but that is OK.

Your screen may look different from mine below but that is OK. How to Make the Akumal Beach WebCam Your Desktop Image Special thanks to Grump for the original idea This has only been tested on Microsoft Windows XP If you have some other version of Windows it may or

More information

Efficiency of Bubble and Shell Sorts

Efficiency of Bubble and Shell Sorts REVIEW Efficiency of Bubble and Shell Sorts Array Elements Bubble Sort Comparisons Shell Sort Comparisons 5 10 17 10 45 57 15 105 115 20 190 192 25 300 302 30 435 364 50 1225 926 100 4950 2638 500 124,750

More information

Assignment 1 Photoshop CAD Fundamentals I Due January 18 Architecture 411

Assignment 1 Photoshop CAD Fundamentals I Due January 18 Architecture 411 Due January 18 Architecture 411 Objectives To learn the basic concepts involved with raster-based images, including: pixels, RGB color, indexed color, layers, rasterization, and the sorts of operations

More information

WAIPA DISTRICT COUNCIL. Maps Online 9. Updated January This document contains an overview of IntraMaps/Maps Online version 9.

WAIPA DISTRICT COUNCIL. Maps Online 9. Updated January This document contains an overview of IntraMaps/Maps Online version 9. WAIPA DISTRICT COUNCIL Maps Online 9 Updated January 2018 This document contains an overview of IntraMaps/Maps Online version 9.0 Contents Starting Maps Online... 3 Menu Bar... 4 Tools... 5 View Tab...

More information

Connection Example. Document ID : Connection_Example.PDF Author : Michele Harris Version : 1.1 Date :

Connection Example. Document ID : Connection_Example.PDF Author : Michele Harris Version : 1.1 Date : Connection Example Document ID : Connection_Example.PDF Author : Michele Harris Version : 1.1 Date : 2009-06-19 page 1 Table of Contents Connection Example... 2 Adding the Code... 2 Quick Watch myconnection...

More information

Snap Shot. User Guide

Snap Shot. User Guide Snap Shot User Guide 1 Table of Contents Snap Shot...3 Capturing the Image... 3 Editing The Pen/Marker Settings... 5 Changing the Pen/Marker Line Thickness...5 Erasing...6 Changing the Line Color...6 Undo

More information

Composite Pattern Diagram. Explanation. JavaFX Subclass Hierarchy, cont. JavaFX: Node. JavaFX Layout Classes. Top-Level Containers 10/12/2018

Composite Pattern Diagram. Explanation. JavaFX Subclass Hierarchy, cont. JavaFX: Node. JavaFX Layout Classes. Top-Level Containers 10/12/2018 Explanation Component has Operation( ), which is a method that applies to all components, whether composite or leaf. There are generally many operations. Component also has composite methods: Add( ), Remove(

More information

How to Validate DataGridView Input

How to Validate DataGridView Input How to Validate DataGridView Input This example explains how to use DR.net to set validation criteria for a DataGridView control on a Visual Studio.NET form. Why You Should Use This To add extensible and

More information

In this lesson you are going to create a drawing program similar to Windows Paint. 1. Start with a new project and remove the default cat sprite.

In this lesson you are going to create a drawing program similar to Windows Paint. 1. Start with a new project and remove the default cat sprite. Drawing Program In this lesson you are going to create a drawing program similar to Windows Paint. 1. Start with a new project and remove the default cat sprite. 2. Create a new sprite. 3. The new sprite

More information

1 Getting started with Processing

1 Getting started with Processing cis3.5, spring 2009, lab II.1 / prof sklar. 1 Getting started with Processing Processing is a sketch programming tool designed for use by non-technical people (e.g., artists, designers, musicians). For

More information

Lecture 7. Processing Development Environment (or PDE)

Lecture 7. Processing Development Environment (or PDE) Lecture 7 Processing Development Environment (or PDE) Processing Class Overview What is Processing? Installation and Intro. Serial Comm. from Arduino to Processing Drawing a dot & controlling position

More information

Learning to use the drawing tools

Learning to use the drawing tools Create a blank slide This module was developed for Office 2000 and 2001, but although there are cosmetic changes in the appearance of some of the tools, the basic functionality is the same in Powerpoint

More information

void setup() { void draw() { draw a rectangle or ellipse wherever the mouse cursor is }

void setup() { void draw() { draw a rectangle or ellipse wherever the mouse cursor is } void setup() size(600,600); background(230); smooth(); //set window size //set window background color //for smooth lines void draw() draw a rectangle or ellipse wherever the mouse cursor is void setup()

More information

Interaction Design A.A. 2017/2018

Interaction Design A.A. 2017/2018 Corso di Laurea Magistrale in Design, Comunicazione Visiva e Multimediale - Sapienza Università di Roma Interaction Design A.A. 2017/2018 8 Loops and Arrays in Processing Francesco Leotta, Andrea Marrella

More information

Reading: Managing Files in Windows XP

Reading: Managing Files in Windows XP Student Resource 13.4a Reading: Managing Files in Windows XP Directions: All recent versions of Windows (XP, Vista, Windows 7) have fairly similar ways of managing files, but their graphic user interfaces

More information

Connecting Arduino to Processing

Connecting Arduino to Processing Connecting Arduino to Processing Introduction to Processing So, you ve blinked some LEDs with Arduino, and maybe you ve even drawn some pretty pictures with Processing - what s next? At this point you

More information

Introduction. What is Max?

Introduction. What is Max? Introduction What is Max? Max is a graphical music programming environment for people who have hit the limits of the usual sequencer and voicing programs for MIDI equipment. Miller Puckette, Max reference

More information

Introduction to Windows

Introduction to Windows Introduction to Windows Naturally, if you have downloaded this document, you will already be to some extent anyway familiar with Windows. If so you can skip the first couple of pages and move on to the

More information

First Steps with IndraLogic

First Steps with IndraLogic Last Update: 28.11.02 CONTENT 1 STARTING INDRALOGIC 2 2 WRITING THE FIRST PROGRAM 2 3 A VISUALIZATION FOR THIS 6 4 START THE TARGET SYSTEM 8 5 SETTINGS FOR ESTABLISHING THE CONNECTION 8 6 START THE PROJECT

More information

Java Primer. CITS2200 Data Structures and Algorithms. Topic 2

Java Primer. CITS2200 Data Structures and Algorithms. Topic 2 CITS2200 Data Structures and Algorithms Topic 2 Java Primer Review of Java basics Primitive vs Reference Types Classes and Objects Class Hierarchies Interfaces Exceptions Reading: Lambert and Osborne,

More information

Instructions for Crossword Assignment CS130

Instructions for Crossword Assignment CS130 Instructions for Crossword Assignment CS130 Purposes: Implement a keyboard interface. 1. The program you will build is meant to assist a person in preparing a crossword puzzle for publication. You have

More information

Intermediate Microsoft Word 2010

Intermediate Microsoft Word 2010 Intermediate Microsoft Word 2010 USING PICTURES... PAGE 02! Inserting Pictures/The Insert Tab! Picture Tools/Format Tab! Resizing Images! Using the Arrange Tools! Positioning! Wrapping Text! Using the

More information

Fireplace Mantel in Google SketchUp

Fireplace Mantel in Google SketchUp Creating the fireplace itself is quite easy: it s just a box with a hole. But creating the mantel around the top requires the fun-to-use Follow Me tool. This project was created in SketchUp 8, but will

More information

This document should only be used with the Apple Macintosh version of Splosh.

This document should only be used with the Apple Macintosh version of Splosh. Splosh 1 Introduction Splosh is an easy to use art package that runs under both Microsoft Windows and the Macintosh Mac OS Classic or Mac OS X operating systems. It should however be noted that the Apple

More information

VISUAL BASIC 2005 EXPRESS: NOW PLAYING

VISUAL BASIC 2005 EXPRESS: NOW PLAYING VISUAL BASIC 2005 EXPRESS: NOW PLAYING by Wallace Wang San Francisco ADVANCED DATA STRUCTURES: QUEUES, STACKS, AND HASH TABLES Using a Queue To provide greater flexibility in storing information, Visual

More information

FACULTY AND STAFF COMPUTER FOOTHILL-DE ANZA. Office Graphics

FACULTY AND STAFF COMPUTER FOOTHILL-DE ANZA. Office Graphics FACULTY AND STAFF COMPUTER TRAINING @ FOOTHILL-DE ANZA Office 2001 Graphics Microsoft Clip Art Introduction Office 2001 wants to be the application that does everything, including Windows! When it comes

More information

RENDERING TECHNIQUES

RENDERING TECHNIQUES RENDERING TECHNIQUES Colors in Flash In Flash, colors are specified as numbers. A color number can be anything from 0 to 16,777,215 for 24- bit color which is 256 * 256 * 256. Flash uses RGB color, meaning

More information

Paint Tutorial (Project #14a)

Paint Tutorial (Project #14a) Paint Tutorial (Project #14a) In order to learn all there is to know about this drawing program, go through the Microsoft Tutorial (below). (Do not save this to your folder.) Practice using the different

More information

Drawing Tools. Drawing a Rectangle

Drawing Tools. Drawing a Rectangle Chapter Microsoft Word provides extensive DRAWING TOOLS that allow you to enhance the appearance of your documents. You can use these tools to assist in the creation of detailed publications, newsletters,

More information

Creating or enlarging a hole in the center of a kaleidoscope (Paint Shop Pro)

Creating or enlarging a hole in the center of a kaleidoscope (Paint Shop Pro) TM Kaleidoscope Kreator Tutorial Series Creating or enlarging a hole in the center of a kaleidoscope (Paint Shop Pro) There may be times when you want to create (or enlarge) a hole in the center of a kaleidoscope:

More information

Transforming Selections In Photoshop

Transforming Selections In Photoshop Transforming Selections In Photoshop Written by Steve Patterson. In previous tutorials, we learned how to draw simple shape-based selections with Photoshop s Rectangular and Elliptical Marquee Tools. Using

More information

Year 12 : Visual Basic Tutorial.

Year 12 : Visual Basic Tutorial. Year 12 : Visual Basic Tutorial. STUDY THIS Input and Output (Text Boxes) The three stages of a computer process Input Processing Output Data is usually input using TextBoxes. [1] Create a new Windows

More information

Chapter 7 Applets. Answers

Chapter 7 Applets. Answers Chapter 7 Applets Answers 1. D The drawoval(x, y, width, height) method of graphics draws an empty oval within a bounding box, and accepts 4 int parameters. The x and y coordinates of the left/top point

More information

ACTIVE PROCESSING Summary Learning Objectives How to Proceed Check your Understanding Learning Objectives 412

ACTIVE PROCESSING Summary Learning Objectives How to Proceed Check your Understanding Learning Objectives 412 ACTIVE PROCESSING Summary This is a difficult unit we finally move away from boring calculation programs and start to have programs that animate and you can interact with. These are called active programs

More information

To get a copy of this image you right click on the image with your mouse and you will get a menu. Scroll down the menu and select "Save Image As".

To get a copy of this image you right click on the image with your mouse and you will get a menu. Scroll down the menu and select Save Image As. The most popular lesson I teach is editing photographs. Everyone wants to put his or her brother's head on a monkey or something similar. This is also a lesson about "emphasis". You can cause more individuals

More information

Chapter 5. Condi.onals

Chapter 5. Condi.onals Chapter 5 Condi.onals Making Decisions If you wish to defrost, press the defrost bu=on; otherwise press the full power bu=on. Let the dough rise in a warm place un.l it has doubled in size. If the ball

More information

Objectives. After completing this topic, the students will: Understand of the concept of polymorphism Know on How to implement 2 types of polymorphism

Objectives. After completing this topic, the students will: Understand of the concept of polymorphism Know on How to implement 2 types of polymorphism Polymorphism Objectives After completing this topic, the students will: Understand of the concept of polymorphism Know on How to implement 2 types of polymorphism Definition Polymorphism provides the ability

More information

Ancient Cell Phone Tracing an Object and Drawing with Layers

Ancient Cell Phone Tracing an Object and Drawing with Layers Ancient Cell Phone Tracing an Object and Drawing with Layers 1) Open Corel Draw. Create a blank 8.5 x 11 Document. 2) Go to the Import option and browse to the Graphics 1 > Lessons folder 3) Find the Cell

More information

Honors Computer Science C++ Mr. Clausen Program 6A, 6B, 6C, & 6G

Honors Computer Science C++ Mr. Clausen Program 6A, 6B, 6C, & 6G Honors Computer Science C++ Mr. Clausen Program 6A, 6B, 6C, & 6G Special Note: Every program from Chapter 4 to the end of the year needs to have functions! Program 6A: Celsius To Fahrenheit Or Visa Versa

More information

All About Me in HyperStudio

All About Me in HyperStudio All About Me in HyperStudio (1) Open HyperStudio Next, Click on the New Stack choice in the HyperStudio Home Stack HyperStudio v3. HyperStudio v4. Addy will ask if you re sure... Click YES (or press the

More information