Drawing Curves Lecture 9 Mon, Sep 15, 2003. Drawing Functions If f(x) is a function, then thanks to the vertical-line test, for each value of x, there.

Slides:



Advertisements
Similar presentations
Reflections and Translations
Advertisements

Quadratic Functions By: Cristina V. & Jasmine V..
Copyright © Cengage Learning. All rights reserved.
Copyright © 2007 Pearson Education, Inc. Slide 6-2 Chapter 6: Analytic Geometry 6.1Circles and Parabolas 6.2Ellipses and Hyperbolas 6.3Summary of the.
Integral Calculus One Mark Questions. Choose the Correct Answer 1. The value of is (a) (b) (c) 0(d)  2. The value of is (a) (b) 0 (c) (d) 
PARAMETRIC EQUATIONS AND POLAR COORDINATES
17 VECTOR CALCULUS.
Lengths of Plane Curves
Chapter 16 – Vector Calculus
CHAPTER Continuity Areas Between Curves The area A of the region bounded by the curves y = f(x), y = g(x), and the lines x = a, x = b, where f and.
Graphic Function
Parabolas.
Relations The key question: How is a relation different from a function?  A relation is a set of ordered pairs (x, y) of real numbers.  The graph of.
Functions and Models 1. Parametric Curves Parametric Curves Imagine that a particle moves along the curve C shown in Figure 1. It is impossible.
9.2 Key Features of a Parabola
Copyright © Cengage Learning. All rights reserved. 10 Parametric Equations and Polar Coordinates.
ME 2304: 3D Geometry & Vector Calculus Dr. Faraz Junejo Line Integrals.
Do Now 10/26/10 In your notebook, explain how you know a function is a function. Then answer if the following three tables are functions or not. x
Copyright © 2011 Pearson Education, Inc. Slide
Rotation of Axes; General Form of a Conic
Unit #4 Conics. An ellipse is the set of all points in a plane whose distances from two fixed points in the plane, the foci, is constant. Major Axis Minor.
Over Lesson 4–1 5-Minute Check 1 A.maximum B.minimum Does the function f(x) = 3x 2 + 6x have a maximum or a minimum value?
Chapter 1-The Basics Calculus, 2ed, by Blank & Krantz, Copyright 2011 by John Wiley & Sons, Inc, All Rights Reserved.
1.4 Parametric Equations. Relations Circles Ellipses Lines and Other Curves What you’ll learn about… …and why Parametric equations can be used to obtain.
Parameterization. Section 1 Parametrically Defined Curves.
Parametric Equations. In a rectangular coordinate system, you will recall, a point in the plane is represented by an ordered pair of number (x,y), where.
Volume: The Disk Method
Chapter 10.5 Conic Sections. Def: The equation of a conic section is given by: Ax 2 + Bxy + Cy 2 + Dx + Ey + F = 0 Where: A, B, C, D, E and F are not.
Slide Copyright © 2006 Pearson Education, Inc. Publishing as Pearson Addison-Wesley.
ME 2304: 3D Geometry & Vector Calculus
Vector Analysis Copyright © Cengage Learning. All rights reserved.
Conics: a crash course MathScience Innovation Center Betsey Davis.
Section 17.2 Line Integrals.
Prerequisites for Calculus
Copyright © Cengage Learning. All rights reserved. 10 Parametric Equations and Polar Coordinates.
Conics Review Study Hard!. Name the Conic without graphing and write it in standard form X 2 + Y 2 -4Y-12=0.
Equations of Circles. Vocab Review: Circle The set of all points a fixed distance r from a point (h, k), where r is the radius of the circle and the point.
MATT KWAK 10.2 THE CIRCLE AND THE ELLIPSE. CIRCLE Set of all points in a plane that are at a fixed distance from a fixed point(center) in the plane. With.
9.6 Circles in the Coordinate Plane Date: ____________.
Parametric Surfaces and their Area Part I
Copyright © Cengage Learning. All rights reserved. 16 Vector Calculus.
Chapter 5: Applications of the Derivative Chapter 4: Derivatives Chapter 5: Applications.
Introduction to Conic Sections Conic sections will be defined in two different ways in this unit. 1.The set of points formed by the intersection of a plane.
Vector Analysis 15 Copyright © Cengage Learning. All rights reserved.
Splash Screen. Then/Now You wrote equations of lines using information about their graphs. Write the equation of a circle. Graph a circle on the coordinate.
Then/Now You wrote equations of lines using information about their graphs. Write the equation of a circle. Graph a circle on the coordinate plane.
INTRO TO CONIC SECTIONS. IT ALL DEPENDS ON HOW YOU SLICE IT! Start with a cone:
Chapter 10 Conic Sections
Copyright © Cengage Learning. All rights reserved.
Date Calculus AB Ms. Brewer
Basic theory of curve and surface
Vector Functions and Space Curves
How to identify and graph them.
Copyright © Cengage Learning. All rights reserved.
Section 17.1 Parameterized Curves
Chapter 6: Analytic Geometry
11.7 – Parametric Equations
10.4 Parametric Equations Parametric Equations of a Plane Curve
Chapter 6: Analytic Geometry
8.6 – Parametric Equations and Graphs
9.5 Parametric Equations.
Drawing Graphs The parabola x Example y
Intro to Conic Sections
Prerequisites for Calculus
Chapter 10 Conic Sections.
16.2: Line Integrals 16.3: The Fundamental Theorem for Line Integrals
Presentation transcript:

Drawing Curves Lecture 9 Mon, Sep 15, 2003

Drawing Functions If f(x) is a function, then thanks to the vertical-line test, for each value of x, there is at most one value of y on the graph of f(x). Therefore, we may sample points along the x-axis, compute the y-coordinates on the curve, and then draw the graph.

Drawing Functions For example, we may write the following. float dx = (xmax – mxin)/(numPts – 1); glBegin(GL_LINE_STRIP); for (float x = xmin; x <= xmax; x += dx); glVertex2f(x, f(x)); glEnd();

Drawing Functions Is it better to compute f(x) in real time? Or should we store the function values in an array? for (int i = 0; i < numPts; i++) { xcoord[i] = x; ycoord[i] = f(x); x += dx; } // Later glBegin(GL_LINE_STRIP); for (int i = 0; i < numPts; i++) glVertex2f(xcoord[i], ycoord[i]); glEnd();

Drawing Functions What if we want to draw many functions? If we choose to store them, how do we store them?

Drawing Functions What if we wanted to draw a circle? The circle fails the vertical line test. We could draw two semicircles. f 1 (x) =  (r 2 – x 2 ) f 2 (x) = -  (r 2 – x 2 ) Are there any problems with this? Is there a better way?

Curves in the Plane We generally think of curves in the plane as being described by equations in x and y Line: y = 3x + 5 Parabola: y = 2x 2 – 10 Circle: x 2 + y 2 = 100 Ellipse: x 2 + 2y 2 = 100 However, it is often easier to describe curves parametrically.

Parametric Curves To parameterize a curve, we define both x and y as functions of a parameter t. x = x(t) y = y(t) The parameter t may be unrestricted or it may be restricted to some range a  t  b.

Parameterizing Lines The line through two points A and B can be parameterized as x(t) = A.x + (B.x – A.x)t y(t) = A.y + (B.y – A.y)t We may write this as in the vector form P = A + (B – A)t What point do we get when t = 0? t = 1? t = ½?

Line Segments and Rays The line segment AB is given by x = A.x + (B.x – A.x)t y = A.y + (B.y – A.y)t 0  t  1 The ray AB is given by the same, except t  0 What about the ray BA?

Parameterizing Circles and Arcs The circle with center at C and radius r can be parameterized as x(t) = C.x + r cos(t) y(t) = C.y + r sin(t) 0  t  2  We get an arc if we restrict t further. For example, suppose 0  t   /2.

Parameterizing Ovals To parameterize an oval (ellipse) with axis 2a in the x-direction and axis 2b in the y-direction, let x(t) = a cos(t) y(t) = b sin(t) 0  t  2 

Other Curves Many interesting curves are possible. What is the shape of the following curve? x(t) = sin(t) y(t) = sin(2t) 0  t  2  How about x(t) = (t – 1) 2 y(t) = t(t – 2) 0  t  2.

Parametric Curves in 3D Three-dimensional curves are similar except there is also a z-coordinate given by z(t).

The Helix A helix of radius 1 is given by x(t) = cos(t) y(t) = sin(t) z(t) = t 0  t  2 