Solution Notes. COMP 151: Terms Test

Size: px
Start display at page:

Download "Solution Notes. COMP 151: Terms Test"

Transcription

1 Family Name: Other Names: ID Number: Signature Solution Notes COMP 151: Terms Test 17 th August 2016 Instructions Time allowed: 45 minutes. Answer all the questions. There are four questions and 45 marks in total. Write your answers in the boxes in this test paper and hand in pages There is brief Processing documentation on page 11, which you may detach from the test paper. If you think some question is unclear, ask for clarification. This test contributes 10% of your final grade You may use paper translation dictionaries. No other materials are permitted. You may write notes and working on this paper, but make sure your answers are clear. Questions Marks 1. Straight line algorithm [15 2. Graphical output in Processing [10 3. Vectors and dot products [10 4. Specifying objects [10 TOTAL

2 SPARE PAGE FOR EXTRA ANSWERS Cross out rough working that you do not want marked. Specify the question number for work that you do want marked. COMP 151 (Terms Test) Page 2 of 11

3 1. Straight line algorithm (15 marks) Write an algorithm for drawing a straight line that uses only integer arithmetic. Assume that the line starts at (x 0, y 0 ) and ends at (x 1, y 1 ). Assume that x 0 < x 1. Assume that the slope of the line is between 0 and 45. Assume that x 0, y 0, x 1, y 1 are all integers. Assume that function drawpixel(x,y) turns on the pixel at integer location (x, y). You may write in Java code, Processing code, or pseudo-code. Minor syntax errors will not be penalised. void drawline( int x0, int y0, int x1, int y1 ) { int dx = (x1 - x0) ; int d2x = 2*dx ; int d2y = 2*(y1 - y0) ; int x = x0 ; int yf = 0 ; int y = y0 ; while (x <= x1) { drawpixel(x,y) x++ ; yf += d2y ; if( yf > dx ) { y++ ; yf -= d2x ; // This is Bresenham s algorithm. There are other ways to do this, // in particular the integer version of the Midpoint algorithm. COMP 151 (Terms Test) Page 3 of 11

4 SPARE PAGE FOR EXTRA ANSWERS Cross out rough working that you do not want marked. Specify the question number for work that you do want marked. COMP 151 (Terms Test) Page 4 of 11

5 2. Graphical output in Processing (10 marks) (a) (6 marks) Double loops Sketch what the following code will draw in the Processing window. size( 300, 300 ) ; background( 255 ) ; stroke( 0 ) ; fill( 255 ); for( int i = 0 ; i < 3 ; i++ ) { for( int j = 0 ; j < 3 ; j++ ) { if( i == j ) { ellipse( i* , j * , 80, 40 ) ; else { rect( i* , j * , 40, 80 ) ; ( Processing window) (Question 2 continued on next page) COMP 151 (Terms Test) Page 5 of 11

6 (Question 2 continued) (b) (4 marks) Transformations Sketch what the following code will draw in the Processing window. size( 300, 300 ) ; background( 255 ) ; stroke( 0 ) ; fill( 255 ) ; translate( 150, 150 ) ; for( int i = 0 ; i < 8 ; i++ ) { rotate( PI / 4 ) ; ellipse( 100, 0, 20, 50 ) ; ( Processing window) (Question 2 continued on next page) COMP 151 (Terms Test) Page 6 of 11

7 (Question 2 continued) Extra copies (in case you made a mistake) (spare copy of Processing window) (spare copy of Processing window) COMP 151 (Terms Test) Page 7 of 11

8 3. Vectors and dot products (10 marks) (a) (4 marks) Vector algebra You are given two vectors, p =. Evaluate the following expressions. [ 5 2 and q = [ 3 4 Vector addition p + q = [ 8 6 Vector subtraction p q = [ 2 2 Dot product p q = = 23 Magnitude q = = 5 (Question 3 continued on next page) COMP 151 (Terms Test) Page 8 of 11

9 (Question 3 continued) (b) (6 marks) Unit vectors The diagram shows a unit circle (a circle of radius 1) with four unit vectors (vectors of length 1): a, b, c and d. The pair of vectors a and b are at right angles (90 or π/2 radians) to one another, as are each of the pairs b and c, c and d, d and a. Vectors a and c are co-linear (i.e., they lie on the same infinite line). Vectors b and d are co-linear. From the definitions of cosine and sine, we know that the coordinates of a are [ cos θ a =. sin θ What are the coordinates of these other two vectors? b = [ sin θ cos θ c = [ cos θ sin θ What are these two dot products? a b = 0 a c = 1= cos 2 θ sin 2 θ COMP 151 (Terms Test) Page 9 of 11

10 4. Specifying objects (10 marks) A point in 2D is specified by two numbers: its x-coordinate and its y-coordinate. These are called its parameters. An axis-aligned rectangle, such as generated by Processing s rect() function, requires four parameters, for example, the x- and y-coordinates of its top left corner and its width and height. Give the minimum number of parameters required to specify each of the following graphical objects in 2D and list an example of those parameters. The first two are done for you. Graphical object point, such as generated by Processing s point() function Minimum number of parameters List of parameters 2 x, y (position of the point) axis-aligned rectangle, such as generated by Processing s rect() function 4 top, left, width, height (position of the top left corner and the dimensions [width and height of the rectangle) line segment, such as generated by Processing s line() function 4 (x 0, y 0 ), (x 1, y 1 ): the positions of the end points of the line vector 2 x, y infinitely long line 2* angle of line and perpendicular distance of line from origin* rectangle that is not aligned with the axes 5 centre position (x, y), width, height, rotation angle Bézier cubic spline 8 positions of the four control points: (x 0, y 0 ), (x 1, y 1 ), (x 2, y 2 ), (x 3, y 3 ) * Other plausible answers that get half credit: 2, m and c in y = mx + c (but cannot represent a vertical line) 3, a, b, c in the equation ax + by + c = 0 COMP 151 (Terms Test) Page 10 of 11

11 Brief Processing documentation void point( float x, float y ) // draw a point at location (x,y) void line( float x1, float y1, float x2, float y2) // draw a line segment from location (x1, y1) to location (x2, y2) void rect( float left, float top, float width, float height ) // draw a rectangle with its top left corner at the indicated position // of size width times height void ellipse( float centerx, float centery, float width, float height ) // draw an ellipse centred at the indicated position // of size width times height void triangle( float x1, float y1, float x2, float y2, float x3, float y3 ) // draw a triangle with vertices at the three points // (x1,y1 ), (x2,y2 ), (x3, y3) void background( float grey ) void stroke( float grey ) void fill( float grey ) // set the colour of the background, stroke or fill to be // a grey value between 0 ( black ) and 255 ( white ) void nostroke() void nofill() // turn off drawing strokes around objects and filling objects, respectively * * * * * * * * * * * * * * * COMP 151 (Terms Test) Page 11 of 11

EXAMINATIONS 2017 TRIMESTER 2

EXAMINATIONS 2017 TRIMESTER 2 EXAMINATIONS 2017 TRIMESTER 2 CGRA 151 INTRODUCTION TO COMPUTER GRAPHICS Time Allowed: TWO HOURS CLOSED BOOK Permitted materials: Silent non-programmable calculators or silent programmable calculators

More information

EXAMINATIONS 2016 TRIMESTER 2

EXAMINATIONS 2016 TRIMESTER 2 EXAMINATIONS 2016 TRIMESTER 2 CGRA 151 INTRODUCTION TO COMPUTER GRAPHICS Time Allowed: TWO HOURS CLOSED BOOK Permitted materials: Silent non-programmable calculators or silent programmable calculators

More information

COMP 102 : Test. 2017, Apr 3

COMP 102 : Test. 2017, Apr 3 Family Name:.............................. Other Names:............................. Student ID:................................ Signature.................................. COMP 102 : Test 2017, Apr 3

More information

Computer Graphics. Lecture 2. Doç. Dr. Mehmet Gokturk

Computer Graphics. Lecture 2. Doç. Dr. Mehmet Gokturk Computer Graphics Lecture 2 Doç. Dr. Mehmet Gokturk Mathematical Foundations l Hearn and Baker (A1 A4) appendix gives good review l Some of the mathematical tools l Trigonometry l Vector spaces l Points,

More information

COMP 102: Test August, 2017

COMP 102: Test August, 2017 Family Name:.......................... Other Names:.......................... Student ID:............................ Signature.............................. COMP 102: Test 1 14 August, 2017 Instructions

More information

To graph the point (r, θ), simply go out r units along the initial ray, then rotate through the angle θ. The point (1, 5π 6. ) is graphed below:

To graph the point (r, θ), simply go out r units along the initial ray, then rotate through the angle θ. The point (1, 5π 6. ) is graphed below: Polar Coordinates Any point in the plane can be described by the Cartesian coordinates (x, y), where x and y are measured along the corresponding axes. However, this is not the only way to represent points

More information

To graph the point (r, θ), simply go out r units along the initial ray, then rotate through the angle θ. The point (1, 5π 6

To graph the point (r, θ), simply go out r units along the initial ray, then rotate through the angle θ. The point (1, 5π 6 Polar Coordinates Any point in the plane can be described by the Cartesian coordinates (x, y), where x and y are measured along the corresponding axes. However, this is not the only way to represent points

More information

Model Solutions. COMP 102: Test. 14 August, 2014

Model Solutions. COMP 102: Test. 14 August, 2014 Family Name:.............................. Other Names:............................. ID Number:............................... Signature.................................. Model Solutions COMP 102: Test

More information

Transform 1: Translate, Matrices

Transform 1: Translate, Matrices Transform 1: Translate, Matrices This unit introduces coordinate system transformations and explains how to control their scope. Syntax introduced: translate(), pushmatrix(), popmatrix() The coordinate

More information

COMP 102 : Test. 2017, Apr 3 ** WITH SOLUTIONS **

COMP 102 : Test. 2017, Apr 3 ** WITH SOLUTIONS ** Family Name:.............................. Other Names:............................. Student ID:................................ Signature.................................. COMP 102 : Test 2017, Apr 3

More information

P1 REVISION EXERCISE: 1

P1 REVISION EXERCISE: 1 P1 REVISION EXERCISE: 1 1. Solve the simultaneous equations: x + y = x +y = 11. For what values of p does the equation px +4x +(p 3) = 0 have equal roots? 3. Solve the equation 3 x 1 =7. Give your answer

More information

1. Complete these exercises to practice creating user functions in small sketches.

1. Complete these exercises to practice creating user functions in small sketches. Lab 6 Due: Fri, Nov 4, 9 AM Consult the Standard Lab Instructions on LEARN for explanations of Lab Days ( D1, D2, D3 ), the Processing Language and IDE, and Saving and Submitting. Rules: Do not use the

More information

CISC 1600 Lecture 3.1 Introduction to Processing

CISC 1600 Lecture 3.1 Introduction to Processing CISC 1600 Lecture 3.1 Introduction to Processing Topics: Example sketches Drawing functions in Processing Colors in Processing General Processing syntax Processing is for sketching Designed to allow artists

More information

COMP 102: Test August, 2017

COMP 102: Test August, 2017 Family Name:.......................... Other Names:.......................... Student ID:............................ Signature.............................. COMP 102: Test 1 14 August, 2017 Instructions

More information

Output Primitives Lecture: 4. Lecture 4

Output Primitives Lecture: 4. Lecture 4 Lecture 4 Circle Generating Algorithms Since the circle is a frequently used component in pictures and graphs, a procedure for generating either full circles or circular arcs is included in most graphics

More information

Catholic Central High School

Catholic Central High School Catholic Central High School Algebra II Practice Examination I Instructions: 1. Show all work on the test copy itself for every problem where work is required. Points may be deducted if insufficient or

More information

PARAMETRIC EQUATIONS AND POLAR COORDINATES

PARAMETRIC EQUATIONS AND POLAR COORDINATES 10 PARAMETRIC EQUATIONS AND POLAR COORDINATES PARAMETRIC EQUATIONS & POLAR COORDINATES A coordinate system represents a point in the plane by an ordered pair of numbers called coordinates. PARAMETRIC EQUATIONS

More information

Part I. There are 5 problems in Part I, each worth 5 points. No partial credit will be given, so be careful. Circle the correct answer.

Part I. There are 5 problems in Part I, each worth 5 points. No partial credit will be given, so be careful. Circle the correct answer. Math 109 Final Exam-Spring 016 Page 1 Part I. There are 5 problems in Part I, each worth 5 points. No partial credit will be given, so be careful. Circle the correct answer. 1) Determine an equivalent

More information

Multivariable Calculus

Multivariable Calculus Multivariable Calculus Chapter 10 Topics in Analytic Geometry (Optional) 1. Inclination of a line p. 5. Circles p. 4 9. Determining Conic Type p. 13. Angle between lines p. 6. Parabolas p. 5 10. Rotation

More information

Exam 3 SCORE. MA 114 Exam 3 Spring Section and/or TA:

Exam 3 SCORE. MA 114 Exam 3 Spring Section and/or TA: MA 114 Exam 3 Spring 217 Exam 3 Name: Section and/or TA: Last Four Digits of Student ID: Do not remove this answer page you will return the whole exam. You will be allowed two hours to complete this test.

More information

Model Solutions. COMP 102: Test. 18 August, 2016

Model Solutions. COMP 102: Test. 18 August, 2016 Family Name:.............................. Other Names:............................. ID Number:............................... Signature.................................. Model Solutions COMP 102: Test

More information

Review of Trigonometry

Review of Trigonometry Worksheet 8 Properties of Trigonometric Functions Section Review of Trigonometry This section reviews some of the material covered in Worksheets 8, and The reader should be familiar with the trig ratios,

More information

CS 130 Final. Fall 2015

CS 130 Final. Fall 2015 CS 130 Final Fall 2015 Name Student ID Signature You may not ask any questions during the test. If you believe that there is something wrong with a question, write down what you think the question is trying

More information

Iteration in Programming

Iteration in Programming Iteration in Programming for loops Produced by: Mairead Meagher Dr. Siobhán Drohan Department of Computing and Mathematics http://www.wit.ie/ Topics list There are three types of loop in programming: While

More information

AQA GCSE Further Maths Topic Areas

AQA GCSE Further Maths Topic Areas AQA GCSE Further Maths Topic Areas This document covers all the specific areas of the AQA GCSE Further Maths course, your job is to review all the topic areas, answering the questions if you feel you need

More information

Old 257 Exam #2s for Practice

Old 257 Exam #2s for Practice Old Exam #2s 257/757 Exploring Programming with Graphics Page 1 Old 257 Exam #2s for Practice Exams will be taken on Thursday March 27 in the cluster. You will have the entire class time to do the exam.

More information

WJEC LEVEL 2 CERTIFICATE 9550/01 ADDITIONAL MATHEMATICS

WJEC LEVEL 2 CERTIFICATE 9550/01 ADDITIONAL MATHEMATICS Surname Other Names Centre Number 0 Candidate Number WJEC LEVEL 2 CERTIFICATE 9550/01 ADDITIONAL MATHEMATICS A.M. MONDAY, 24 June 2013 2 1 hours 2 ADDITIONAL MATERIALS A calculator will be required for

More information

Catholic Central High School

Catholic Central High School Catholic Central High School Algebra II Practice Examination II Instructions: 1. Show all work on the test copy itself for every problem where work is required. Points may be deducted if insufficient or

More information

Using Methods. Methods that handle events. Mairead Meagher Dr. Siobhán Drohan. Produced by: Department of Computing and Mathematics

Using Methods. Methods that handle events. Mairead Meagher Dr. Siobhán Drohan. Produced by: Department of Computing and Mathematics Using Methods Methods that handle events Produced by: Mairead Meagher Dr. Siobhán Drohan Department of Computing and Mathematics http://www.wit.ie/ Caveat The term function is used in Processing e.g. line(),

More information

The diagram above shows a sketch of the curve C with parametric equations

The diagram above shows a sketch of the curve C with parametric equations 1. The diagram above shows a sketch of the curve C with parametric equations x = 5t 4, y = t(9 t ) The curve C cuts the x-axis at the points A and B. (a) Find the x-coordinate at the point A and the x-coordinate

More information

Glossary of dictionary terms in the AP geometry units

Glossary of dictionary terms in the AP geometry units Glossary of dictionary terms in the AP geometry units affine linear equation: an equation in which both sides are sums of terms that are either a number times y or a number times x or just a number [SlL2-D5]

More information

OpenGL Graphics System. 2D Graphics Primitives. Drawing 2D Graphics Primitives. 2D Graphics Primitives. Mathematical 2D Primitives.

OpenGL Graphics System. 2D Graphics Primitives. Drawing 2D Graphics Primitives. 2D Graphics Primitives. Mathematical 2D Primitives. D Graphics Primitives Eye sees Displays - CRT/LCD Frame buffer - Addressable pixel array (D) Graphics processor s main function is to map application model (D) by projection on to D primitives: points,

More information

CSCI 4620/8626. Coordinate Reference Frames

CSCI 4620/8626. Coordinate Reference Frames CSCI 4620/8626 Computer Graphics Graphics Output Primitives Last update: 2014-02-03 Coordinate Reference Frames To describe a picture, the world-coordinate reference frame (2D or 3D) must be selected.

More information

Unit 3, Lesson 1.3 Special Angles in the Unit Circle

Unit 3, Lesson 1.3 Special Angles in the Unit Circle Unit, Lesson Special Angles in the Unit Circle Special angles exist within the unit circle For these special angles, it is possible to calculate the exact coordinates for the point where the terminal side

More information

Jim Lambers MAT 169 Fall Semester Lecture 33 Notes

Jim Lambers MAT 169 Fall Semester Lecture 33 Notes Jim Lambers MAT 169 Fall Semester 2009-10 Lecture 33 Notes These notes correspond to Section 9.3 in the text. Polar Coordinates Throughout this course, we have denoted a point in the plane by an ordered

More information

The University of Calgary

The University of Calgary The University of Calgary Department of Computer Science Final Examination, Questions ENEL/CPSC 555 Computer Graphics Time: 2 Hours Closed Book, calculators are permitted. The questions carry equal weight.

More information

Model Solutions. COMP 102: Test 1. 6 April, 2016

Model Solutions. COMP 102: Test 1. 6 April, 2016 Family Name:.............................. Other Names:............................. ID Number:............................... Signature.................................. Model Solutions COMP 102: Test

More information

1. (10 pts) Order the following three images by how much memory they occupy:

1. (10 pts) Order the following three images by how much memory they occupy: CS 47 Prelim Tuesday, February 25, 2003 Problem : Raster images (5 pts). (0 pts) Order the following three images by how much memory they occupy: A. a 2048 by 2048 binary image B. a 024 by 024 grayscale

More information

: Find the values of the six trigonometric functions for θ. Special Right Triangles:

: Find the values of the six trigonometric functions for θ. Special Right Triangles: ALGEBRA 2 CHAPTER 13 NOTES Section 13-1 Right Triangle Trig Understand and use trigonometric relationships of acute angles in triangles. 12.F.TF.3 CC.9- Determine side lengths of right triangles by using

More information

CHAPTER 2 REVIEW COORDINATE GEOMETRY MATH Warm-Up: See Solved Homework questions. 2.2 Cartesian coordinate system

CHAPTER 2 REVIEW COORDINATE GEOMETRY MATH Warm-Up: See Solved Homework questions. 2.2 Cartesian coordinate system CHAPTER 2 REVIEW COORDINATE GEOMETRY MATH6 2.1 Warm-Up: See Solved Homework questions 2.2 Cartesian coordinate system Coordinate axes: Two perpendicular lines that intersect at the origin O on each line.

More information

12 - THREE DIMENSIONAL GEOMETRY Page 1 ( Answers at the end of all questions ) = 2. ( d ) - 3. ^i - 2. ^j c 3. ( d )

12 - THREE DIMENSIONAL GEOMETRY Page 1 ( Answers at the end of all questions ) = 2. ( d ) - 3. ^i - 2. ^j c 3. ( d ) - THREE DIMENSIONAL GEOMETRY Page ( ) If the angle θ between the line x - y + x + y - z - and the plane λ x + 4 0 is such that sin θ, then the value of λ is - 4-4 [ AIEEE 00 ] ( ) If the plane ax - ay

More information

COMPUTER AIDED ENGINEERING DESIGN (BFF2612)

COMPUTER AIDED ENGINEERING DESIGN (BFF2612) COMPUTER AIDED ENGINEERING DESIGN (BFF2612) BASIC MATHEMATICAL CONCEPTS IN CAED by Dr. Mohd Nizar Mhd Razali Faculty of Manufacturing Engineering mnizar@ump.edu.my COORDINATE SYSTEM y+ y+ z+ z+ x+ RIGHT

More information

Unit 12 Topics in Analytic Geometry - Classwork

Unit 12 Topics in Analytic Geometry - Classwork Unit 1 Topics in Analytic Geometry - Classwork Back in Unit 7, we delved into the algebra and geometry of lines. We showed that lines can be written in several forms: a) the general form: Ax + By + C =

More information

8-1 Simple Trigonometric Equations. Objective: To solve simple Trigonometric Equations and apply them

8-1 Simple Trigonometric Equations. Objective: To solve simple Trigonometric Equations and apply them Warm Up Use your knowledge of UC to find at least one value for q. 1) sin θ = 1 2 2) cos θ = 3 2 3) tan θ = 1 State as many angles as you can that are referenced by each: 1) 30 2) π 3 3) 0.65 radians Useful

More information

AP * Calculus Review. Area and Volume

AP * Calculus Review. Area and Volume AP * Calculus Review Area and Volume Student Packet Advanced Placement and AP are registered trademark of the College Entrance Examination Board. The College Board was not involved in the production of,

More information

Tópicos de Computação Gráfica Topics in Computer Graphics 10509: Doutoramento em Engenharia Informática. Chap. 2 Rasterization.

Tópicos de Computação Gráfica Topics in Computer Graphics 10509: Doutoramento em Engenharia Informática. Chap. 2 Rasterization. Tópicos de Computação Gráfica Topics in Computer Graphics 10509: Doutoramento em Engenharia Informática Chap. 2 Rasterization Rasterization Outline : Raster display technology. Basic concepts: pixel, resolution,

More information

FORMULAS to UNDERSTAND & MEMORIZE

FORMULAS to UNDERSTAND & MEMORIZE 1 of 6 FORMULAS to UNDERSTAND & MEMORIZE Now we come to the part where you need to just bear down and memorize. To make the process a bit simpler, I am providing all of the key info that they re going

More information

Scan Converting Lines

Scan Converting Lines Scan Conversion 1 Scan Converting Lines Line Drawing Draw a line on a raster screen between two points What s wrong with the statement of the problem? it doesn t say anything about which points are allowed

More information

2D Object Definition (1/3)

2D Object Definition (1/3) 2D Object Definition (1/3) Lines and Polylines Lines drawn between ordered points to create more complex forms called polylines Same first and last point make closed polyline or polygon Can intersect itself

More information

1 Some easy lines (2, 17) (10, 17) (18, 2) (18, 14) (1, 5) (8, 12) Check with a ruler. Are your lines straight?

1 Some easy lines (2, 17) (10, 17) (18, 2) (18, 14) (1, 5) (8, 12) Check with a ruler. Are your lines straight? 1 Some easy lines Computers draw images using pixels. Pixels are the tiny squares that make up the image you see on computer monitors. If you look carefully at a computer screen with a magnifying glass,

More information

CPSC / Scan Conversion

CPSC / Scan Conversion CPSC 599.64 / 601.64 Computer Screens: Raster Displays pixel rasters (usually) square pixels in rectangular raster evenly cover the image problem no such things such as lines, circles, etc. scan conversion

More information

Trigonometric Functions of Any Angle

Trigonometric Functions of Any Angle Trigonometric Functions of Any Angle MATH 160, Precalculus J. Robert Buchanan Department of Mathematics Fall 2011 Objectives In this lesson we will learn to: evaluate trigonometric functions of any angle,

More information

COMP30019 Graphics and Interaction Scan Converting Polygons and Lines

COMP30019 Graphics and Interaction Scan Converting Polygons and Lines COMP30019 Graphics and Interaction Scan Converting Polygons and Lines Department of Computer Science and Software Engineering The Lecture outline Introduction Scan conversion Scan-line algorithm Edge coherence

More information

MATH 31A HOMEWORK 9 (DUE 12/6) PARTS (A) AND (B) SECTION 5.4. f(x) = x + 1 x 2 + 9, F (7) = 0

MATH 31A HOMEWORK 9 (DUE 12/6) PARTS (A) AND (B) SECTION 5.4. f(x) = x + 1 x 2 + 9, F (7) = 0 FROM ROGAWSKI S CALCULUS (2ND ED.) SECTION 5.4 18.) Express the antiderivative F (x) of f(x) satisfying the given initial condition as an integral. f(x) = x + 1 x 2 + 9, F (7) = 28.) Find G (1), where

More information

Rasterization: Geometric Primitives

Rasterization: Geometric Primitives Rasterization: Geometric Primitives Outline Rasterizing lines Rasterizing polygons 1 Rasterization: What is it? How to go from real numbers of geometric primitives vertices to integer coordinates of pixels

More information

Computer Graphics Prof. Sukhendu Das Dept. of Computer Science and Engineering Indian Institute of Technology, Madras Lecture - 14

Computer Graphics Prof. Sukhendu Das Dept. of Computer Science and Engineering Indian Institute of Technology, Madras Lecture - 14 Computer Graphics Prof. Sukhendu Das Dept. of Computer Science and Engineering Indian Institute of Technology, Madras Lecture - 14 Scan Converting Lines, Circles and Ellipses Hello everybody, welcome again

More information

INSTRUCTIONS FOR THE USE OF THE SUPER RULE TM

INSTRUCTIONS FOR THE USE OF THE SUPER RULE TM INSTRUCTIONS FOR THE USE OF THE SUPER RULE TM NOTE: All images in this booklet are scale drawings only of template shapes and scales. Preparation: Your SUPER RULE TM is a valuable acquisition for classroom

More information

The Straight Line. m is undefined. Use. Show that mab

The Straight Line. m is undefined. Use. Show that mab The Straight Line What is the gradient of a horizontal line? What is the equation of a horizontal line? So the equation of the x-axis is? What is the gradient of a vertical line? What is the equation of

More information

Goals: Course Unit: Describing Moving Objects Different Ways of Representing Functions Vector-valued Functions, or Parametric Curves

Goals: Course Unit: Describing Moving Objects Different Ways of Representing Functions Vector-valued Functions, or Parametric Curves Block #1: Vector-Valued Functions Goals: Course Unit: Describing Moving Objects Different Ways of Representing Functions Vector-valued Functions, or Parametric Curves 1 The Calculus of Moving Objects Problem.

More information

Basics of Computational Geometry

Basics of Computational Geometry Basics of Computational Geometry Nadeem Mohsin October 12, 2013 1 Contents This handout covers the basic concepts of computational geometry. Rather than exhaustively covering all the algorithms, it deals

More information

Summer Math Assignments for Students Entering Integrated Math

Summer Math Assignments for Students Entering Integrated Math Summer Math Assignments for Students Entering Integrated Math Purpose: The purpose of this packet is to review pre-requisite skills necessary for the student to be successful in Integrated Math. You are

More information

The base of a solid is the region in the first quadrant bounded above by the line y = 2, below by

The base of a solid is the region in the first quadrant bounded above by the line y = 2, below by Chapter 7 1) (AB/BC, calculator) The base of a solid is the region in the first quadrant bounded above by the line y =, below by y sin 1 x, and to the right by the line x = 1. For this solid, each cross-section

More information

MATH EXAM 1 - SPRING 2018 SOLUTION

MATH EXAM 1 - SPRING 2018 SOLUTION MATH 140 - EXAM 1 - SPRING 018 SOLUTION 8 February 018 Instructor: Tom Cuchta Instructions: Show all work, clearly and in order, if you want to get full credit. If you claim something is true you must

More information

Math 1313 Prerequisites/Test 1 Review

Math 1313 Prerequisites/Test 1 Review Math 1313 Prerequisites/Test 1 Review Test 1 (Prerequisite Test) is the only exam that can be done from ANYWHERE online. Two attempts. See Online Assignments in your CASA account. Note the deadline too.

More information

mith College Computer Science CSC103 How Computers Work Week 7 Fall 2017 Dominique Thiébaut

mith College Computer Science CSC103 How Computers Work Week 7 Fall 2017 Dominique Thiébaut mith College Computer Science CSC103 How Computers Work Week 7 Fall 2017 Dominique Thiébaut dthiebaut@smith.edu Important Review Does the animation leave a trace? Are the moving objects move without a

More information

Walt Whitman High School SUMMER REVIEW PACKET. For students entering AP CALCULUS BC

Walt Whitman High School SUMMER REVIEW PACKET. For students entering AP CALCULUS BC Walt Whitman High School SUMMER REVIEW PACKET For students entering AP CALCULUS BC Name: 1. This packet is to be handed in to your Calculus teacher on the first day of the school year.. All work must be

More information

COMP 102/112 : Test. 2019, Apr 1 ** WITH SOLUTIONS **

COMP 102/112 : Test. 2019, Apr 1 ** WITH SOLUTIONS ** Family Name:.............................. Other Names:...................................... Signature.................................. COMP 102/112 : Test 2019, Apr 1 ** WITH SOLUTIONS ** Instructions

More information

Volumes of Solids of Revolution Lecture #6 a

Volumes of Solids of Revolution Lecture #6 a Volumes of Solids of Revolution Lecture #6 a Sphereoid Parabaloid Hyperboloid Whateveroid Volumes Calculating 3-D Space an Object Occupies Take a cross-sectional slice. Compute the area of the slice. Multiply

More information

Conic Sections. College Algebra

Conic Sections. College Algebra Conic Sections College Algebra Conic Sections A conic section, or conic, is a shape resulting from intersecting a right circular cone with a plane. The angle at which the plane intersects the cone determines

More information

Int 2 Checklist (Unit 1) Int 2 Checklist (Unit 1) Percentages

Int 2 Checklist (Unit 1) Int 2 Checklist (Unit 1) Percentages Percentages Know that appreciation means an increase in value and depreciation means a decrease in value Calculate simple interest over 1 year Calculate simple interest over a certain number of months

More information

Notes on Spherical Geometry

Notes on Spherical Geometry Notes on Spherical Geometry Abhijit Champanerkar College of Staten Island & The Graduate Center, CUNY Spring 2018 1. Vectors and planes in R 3 To review vector, dot and cross products, lines and planes

More information

Investigating the Sine and Cosine Functions Part 1

Investigating the Sine and Cosine Functions Part 1 Investigating the Sine and Cosine Functions Part 1 Name: Period: Date: Set-Up Press. Move down to 5: Cabri Jr and press. Press for the F1 menu and select New. Press for F5 and select Hide/Show > Axes.

More information

Section 7.2 Volume: The Disk Method

Section 7.2 Volume: The Disk Method Section 7. Volume: The Disk Method White Board Challenge Find the volume of the following cylinder: No Calculator 6 ft 1 ft V 3 1 108 339.9 ft 3 White Board Challenge Calculate the volume V of the solid

More information

MODULE - 4. e-pg Pathshala

MODULE - 4. e-pg Pathshala e-pg Pathshala MODULE - 4 Subject : Computer Science Paper: Computer Graphics and Visualization Module: Midpoint Circle Drawing Procedure Module No: CS/CGV/4 Quadrant 1 e-text Before going into the Midpoint

More information

Log1 Contest Round 2 Theta Circles, Parabolas and Polygons. 4 points each

Log1 Contest Round 2 Theta Circles, Parabolas and Polygons. 4 points each Name: Units do not have to be included. 016 017 Log1 Contest Round Theta Circles, Parabolas and Polygons 4 points each 1 Find the value of x given that 8 x 30 Find the area of a triangle given that it

More information

Class #1. introduction, functions, variables, conditionals

Class #1. introduction, functions, variables, conditionals Class #1 introduction, functions, variables, conditionals what is processing hello world tour of the grounds functions,expressions, statements console/debugging drawing data types and variables decisions

More information

MET71 COMPUTER AIDED DESIGN

MET71 COMPUTER AIDED DESIGN UNIT - II BRESENHAM S ALGORITHM BRESENHAM S LINE ALGORITHM Bresenham s algorithm enables the selection of optimum raster locations to represent a straight line. In this algorithm either pixels along X

More information

1. Use the Trapezium Rule with five ordinates to find an approximate value for the integral

1. Use the Trapezium Rule with five ordinates to find an approximate value for the integral 1. Use the Trapezium Rule with five ordinates to find an approximate value for the integral Show your working and give your answer correct to three decimal places. 2 2.5 3 3.5 4 When When When When When

More information

Worksheet 3.2: Double Integrals in Polar Coordinates

Worksheet 3.2: Double Integrals in Polar Coordinates Boise State Math 75 (Ultman) Worksheet 3.: ouble Integrals in Polar Coordinates From the Toolbox (what you need from previous classes): Trig/Calc II: Convert equations in x and y into r and θ, using the

More information

Chapter 10: Parametric And Polar Curves; Conic Sections

Chapter 10: Parametric And Polar Curves; Conic Sections 206 Chapter 10: Parametric And Polar Curves; Conic Sections Summary: This chapter begins by introducing the idea of representing curves using parameters. These parametric equations of the curves can then

More information

CISC 1600, Lab 3.1: Processing

CISC 1600, Lab 3.1: Processing CISC 1600, Lab 3.1: Processing Prof Michael Mandel 1 Getting set up For this lab, we will be using OpenProcessing, a site for building processing sketches online using processing.js. 1.1. Go to https://www.openprocessing.org/class/57767/

More information

Lecture 5 2D Transformation

Lecture 5 2D Transformation Lecture 5 2D Transformation What is a transformation? In computer graphics an object can be transformed according to position, orientation and size. Exactly what it says - an operation that transforms

More information

Java Programming: Test 1

Java Programming: Test 1 Family Name:.............................. Other Names:............................. Student ID:................................ Signature.................................. Java Programming: Test 1 2016,

More information

Geometry B. The University of Texas at Austin Continuing & Innovative Education K 16 Education Center 1

Geometry B. The University of Texas at Austin Continuing & Innovative Education K 16 Education Center 1 Geometry B Credit By Exam This Credit By Exam can help you prepare for the exam by giving you an idea of what you need to study, review, and learn. To succeed, you should be thoroughly familiar with the

More information

Kimberly Nguyen Professor Oliehoek Introduction to Programming 8 September 2013

Kimberly Nguyen Professor Oliehoek Introduction to Programming 8 September 2013 1. A first program // Create 200x200 canvas // Print favorite quote size(200, 200); println("it is what it is"); // Draw rectangle and a line rect(100,100,50,50); line(0,0,50,50); // Save as.pde. Can be

More information

SNAP Centre Workshop. Introduction to Trigonometry

SNAP Centre Workshop. Introduction to Trigonometry SNAP Centre Workshop Introduction to Trigonometry 62 Right Triangle Review A right triangle is any triangle that contains a 90 degree angle. There are six pieces of information we can know about a given

More information

Part I. There are 8 problems in Part I, each worth 5 points. No partial credit will be given, so be careful. Circle the correct answer.

Part I. There are 8 problems in Part I, each worth 5 points. No partial credit will be given, so be careful. Circle the correct answer. Math 109 Final Final Exam-Spring 2018 Page 1 Part I. There are 8 problems in Part I, each worth 5 points. No partial credit will be given, so be careful. Circle the correct answer. 1) Determine an equivalent

More information

Unit Circle. Project Response Sheet

Unit Circle. Project Response Sheet NAME: PROJECT ACTIVITY: Trigonometry TOPIC Unit Circle GOALS MATERIALS Explore Degree and Radian Measure Explore x- and y- coordinates on the Unit Circle Investigate Odd and Even functions Investigate

More information

Birkdale High School - Higher Scheme of Work

Birkdale High School - Higher Scheme of Work Birkdale High School - Higher Scheme of Work Module 1 - Integers and Decimals Understand and order integers (assumed) Use brackets and hierarchy of operations (BODMAS) Add, subtract, multiply and divide

More information

Honors Precalculus: Solving equations and inequalities graphically and algebraically. Page 1

Honors Precalculus: Solving equations and inequalities graphically and algebraically. Page 1 Solving equations and inequalities graphically and algebraically 1. Plot points on the Cartesian coordinate plane. P.1 2. Represent data graphically using scatter plots, bar graphs, & line graphs. P.1

More information

Model Solutions. COMP 102: Test March, 2014

Model Solutions. COMP 102: Test March, 2014 Family Name:.............................. Other Names:............................. ID Number:............................... Signature.................................. Model Solutions COMP 102: Test

More information

Math 144 Activity #4 Connecting the unit circle to the graphs of the trig functions

Math 144 Activity #4 Connecting the unit circle to the graphs of the trig functions 144 p 1 Math 144 Activity #4 Connecting the unit circle to the graphs of the trig functions Graphing the sine function We are going to begin this activity with graphing the sine function ( y = sin x).

More information

Calculators ARE NOT Permitted On This Portion Of The Exam 28 Questions - 55 Minutes

Calculators ARE NOT Permitted On This Portion Of The Exam 28 Questions - 55 Minutes 1 of 11 1) Give f(g(1)), given that Calculators ARE NOT Permitted On This Portion Of The Exam 28 Questions - 55 Minutes 2) Find the slope of the tangent line to the graph of f at x = 4, given that 3) Determine

More information

Pre-Calculus Guided Notes: Chapter 10 Conics. A circle is

Pre-Calculus Guided Notes: Chapter 10 Conics. A circle is Name: Pre-Calculus Guided Notes: Chapter 10 Conics Section Circles A circle is _ Example 1 Write an equation for the circle with center (3, ) and radius 5. To do this, we ll need the x1 y y1 distance formula:

More information

Using Methods. More on writing methods. Dr. Siobhán Drohan Mairead Meagher. Produced by: Department of Computing and Mathematics

Using Methods. More on writing methods. Dr. Siobhán Drohan Mairead Meagher. Produced by: Department of Computing and Mathematics Using Methods More on writing methods Produced by: Dr. Siobhán Drohan Mairead Meagher Department of Computing and Mathematics http://www.wit.ie/ Topics list Method example: Eyes Method example: X s Overloading

More information

Question 1: As you drag the green arrow, what gets graphed? Does it make sense? Explain in words why the resulting graph looks the way it does.

Question 1: As you drag the green arrow, what gets graphed? Does it make sense? Explain in words why the resulting graph looks the way it does. GRAPH A: r 0.5 Question 1: As you drag the green arrow, what gets graphed? Does it make sense? Explain in words why the resulting graph looks the way it does. Question 2: How many theta does it take before

More information

Lesson 27: Angles in Standard Position

Lesson 27: Angles in Standard Position Lesson 27: Angles in Standard Position PreCalculus - Santowski PreCalculus - Santowski 1 QUIZ Draw the following angles in standard position 50 130 230 320 770-50 2 radians PreCalculus - Santowski 2 Fast

More information

Math 2 Coordinate Geometry Part 3 Inequalities & Quadratics

Math 2 Coordinate Geometry Part 3 Inequalities & Quadratics Math 2 Coordinate Geometry Part 3 Inequalities & Quadratics 1 DISTANCE BETWEEN TWO POINTS - REVIEW To find the distance between two points, use the Pythagorean theorem. The difference between x 1 and x

More information

Trigonometry and the Unit Circle. Chapter 4

Trigonometry and the Unit Circle. Chapter 4 Trigonometry and the Unit Circle Chapter 4 Topics Demonstrate an understanding of angles in standard position, expressed in degrees and radians. Develop and apply the equation of the unit circle. Solve

More information

1 Introduction to Graphics

1 Introduction to Graphics 1 1.1 Raster Displays The screen is represented by a 2D array of locations called pixels. Zooming in on an image made up of pixels The convention in these notes will follow that of OpenGL, placing the

More information