View by Category

Loading...

PPT – Curves PowerPoint presentation | free to download - id: 3f83f1-YWQwN

The Adobe Flash plugin is needed to view this content

About This Presentation

Write a Comment

User Comments (0)

Transcript and Presenter's Notes

Curves

First of all

- You may ask yourselves What did those papers

have to do with computer graphics? - Valid question
- Answer I thought they were cool, unique

applications of computer graphics - This week were looking at scan conversion of

curves

Interpolation

- Bresenhams line drawing algorithm is nothing

more than a form of interpolation - Given two points, find the location of points in

between them - The function (in this case its a line) must pass

through the given points, by definition

Interpolation Usage

- We used Bresenham line drawing (interpolation) to

scan convert a symbolic representation of a line

to a rasterized line - Other applications exist
- Computing calendar years are leap years (believe

it or not) - Line Drawing, Leap Years, and Euclid, Harris and

Reingold, ACM Computing Surveys, Vol. 36, No. 1,

March 2004, pp. 66-80 - Path planning for key frame animation

Key Frame Animation

- Key frames are infrequent scenes that capture the

essential flow of an animation - Think of them as the endpoints of a line
- In between frames (tweens) may be generated by

interpolating between two key frames - Think of these as the points drawn by the

Bresenham algorithm

Approximation

- Another possibility for generating tweens is to

specify tie-points that guide the generation of

the intermediate path points but the path does

not pass through the tie-points - This technique is called approximation or curve

fitting

Curves

- Well look at two techniques for generating

curves (to be used as either paths or drawn

objects) - Interpolation
- Approximation
- Well also see that interpolation is very

restrictive when considering parametric curves - Approximation is a much better approach

Parametric Curves

- Recall the parametric line equations
- The parameter t is used to map out a set of (x,

y) pairs that represent the line

Parametric Curves

- In the case of a curve the parametric function is

of the form - Q(u) (x(u), y(u), z(u)) in 3 dimensions
- The derivative of Q(u) is of the form
- Q(u) (x(u), y(u), z(u))
- Significance of the derivative?
- It is the tangent vector at a given point (u) on

the curve

Derivative

Parametric Curves

- In the case of object drawing, u is a spatial

parameter (like t was for the line) - In the case of key frame animation, u is a

temporal parameter - In both cases Q(0) is the start of the curve and

Q(1) is the end, as was the case for the

parametric line

Parametric Curves

- Curvature
- Curvature k 1/ ?
- The higher the curvature, the more the curve

bends at the given point

Parametric Curves

- From calculus, a function f is continuous at a

value x0 if - In laymans terms this means that we can draw the

curve without ever lifting our pen from the

drawing surface - f(x) is continuous over an interval (a,b) if it

is continuous for every point in the interval - We call this C0 continuity

Parametric Curves

Continuous over (a,b) C0

Continuous over (a,b) C0

Parametric Curves

- From calculus, a functions derivative f is

continuous at a value x0 if - In laymans terms this means that there are no

sharp changes in direction - f(x) is continuous over an interval (a,b) if it

is continuous for every point in the interval - We call this C1 (tangential) continuity

Parametric Curves

Continuous derivative over (a,b) C1

Discontinuous derivative over (a,b) not C1

Parametric Curves

- When we need to join two curves at a single point

we can guarantee C1 continuity across the joint - For the case when we cant make one continuous

curve - Just make sure that the tangents of the two

curves at the join are of equal length and

direction - If the tangents at the joint are of identical

direction but differing lengths (change in

curvature) then we have G1 continuity

Lagrange Polynomials

- To generate a function that passes through every

specified point, the type of function depends on

the number of specified points - Two points ? linear function
- Three points ? quadratic function
- Four points ? cubic function
- Generating such functions makes use of Lagrange

polynomials

Lagrange Polynomials

- The general form is (n is the number of points)
- Lets look at an example

Lagrange Polynomials

- For two points P0 and P1
- For the starting point (t00) and ending point

(t11)

Lagrange Polynomials

- For three points P0 , P1 , and P2
- And it only gets worse for larger numbers of

points - Suffice it to say, this isnt the most optimum

way to draw curves - Too many operations per point
- Too complex if the artist decides to change the

curve - But you could do it

A Better Way

- The problem with Lagrange polynomials lies in the

fact that we try to make the curve pass through

all of the specified points - A better way is to specify points that control

how the curve passes from one point to the next - We do so by specifying a cubic function

controlled by four points - The four points are called boundary conditions

Hermite Boundary Conditions

- Two points
- Two tangent vectors
- Two of the points are interpreted as vectors off

of the other two points

Cubic Functions

- Generalized form
- Derivative
- Our goal is to solve these equations in closed

form so that we can generate a series of points

on the curve

Cubic Functions

- There are four unknown values in the equation
- a, b, c, and D (remember, a, b, c, and D are

vectors in x, y, z so there is actually a set of

3 equations) - We need to use these equations to generate values

of x, y, and z along the curve - We can generate a closed form solution (solve the

equations for x, y, and z) since we have four

known boundary conditions - u 0 ? Q(0) P0 and Q(0) P0
- u 1 ? Q(1) P1 and Q(1) P1

Solution of Equations

- Go to the white board

Implementation

- So, all you have to do to generate a curve is to

implement this vector (x, y, z) equation - by stepping 0 u 1
- P0, P1, P0 and P1 are vectors in x, y, z so

there are really 12 coefficients to be computed

and youll be implementing 3 equations for Q(u)

Implementation

- Note that youll have to estimate the step size

for u or(any ideas?) - use your Bresenham code to draw short straight

lines between the points you generate on the

curve (to fill gaps) - There is no trick (that Im aware of) comparable

to the Bresenham approach

Bezier Curves

- Similar derivation to Hermite
- Different boundary conditions
- Bezier uses 2 endpoints and 2 control points

(rather than 2 endpoints and 2 slopes)

Bezier Curves

Implementation

- So, all you have to do to generate a curve is to

implement this vector (x, y, z) equation - by stepping 0 u 1
- P0, P1, P2 and P3 are vectors in x, y, z so there

are really 12 coefficients to be computed and

youll be implementing 3 equations for Q(u)

Bezier example

Hermite vs. Bezier

- Hermite is easy to control continuity at the

endpoints when joining multiple curves to create

a path - But difficult to control the internal shape of

the curve - Bezier is easy to control the internal shape of

the curve - But a little more (not much) difficult to control

continuity at the endpoints when joining multiple

curves to create a path - Bottom line is, when creating a path you have to

be very selective about endpoints and adjacent

control points (Bezier) or tangent slopes

(Hermite)

Result

- Go to the demo program
- My code generates a Hermite curve that is of C1

continuity - As I generate new segments along the curve I join

them by keeping the adjoining tangent vectors

equal

Homework

- Implement Bezier and Hermite curve drawing
- Parameters should be control points and brush

width - Create a video sequence to show in class
- Demonstrate Bezier and Hermite curves of various

control points and brush widths - Be creative
- Due date Next week Turn in
- Video to be shown in class
- All program listings
- Grading will be on completeness (following

instructions) and timeliness (late projects will

be docked 10 per week)

About PowerShow.com

PowerShow.com is a leading presentation/slideshow sharing website. Whether your application is business, how-to, education, medicine, school, church, sales, marketing, online training or just for fun, PowerShow.com is a great resource. And, best of all, most of its cool features are free and easy to use.

You can use PowerShow.com to find and download example online PowerPoint ppt presentations on just about any topic you can imagine so you can learn how to improve your own slides and presentations for free. Or use it to find and download high-quality how-to PowerPoint ppt presentations with illustrated or animated slides that will teach you how to do something new, also for free. Or use it to upload your own PowerPoint slides so you can share them with your teachers, class, students, bosses, employees, customers, potential investors or the world. Or use it to create really cool photo slideshows - with 2D and 3D transitions, animation, and your choice of music - that you can share with your Facebook friends or Google+ circles. That's all free as well!

For a small fee you can get the industry's best online privacy or publicly promote your presentations and slide shows with top rankings. But aside from that it's free. We'll even convert your presentations and slide shows into the universal Flash format with all their original multimedia glory, including animation, 2D and 3D transition effects, embedded music or other audio, or even video embedded in slides. All for free. Most of the presentations and slideshows on PowerShow.com are free to view, many are even free to download. (You can choose whether to allow people to download your original PowerPoint presentations and photo slideshows for a fee or free or not at all.) Check out PowerShow.com today - for FREE. There is truly something for everyone!

You can use PowerShow.com to find and download example online PowerPoint ppt presentations on just about any topic you can imagine so you can learn how to improve your own slides and presentations for free. Or use it to find and download high-quality how-to PowerPoint ppt presentations with illustrated or animated slides that will teach you how to do something new, also for free. Or use it to upload your own PowerPoint slides so you can share them with your teachers, class, students, bosses, employees, customers, potential investors or the world. Or use it to create really cool photo slideshows - with 2D and 3D transitions, animation, and your choice of music - that you can share with your Facebook friends or Google+ circles. That's all free as well!

For a small fee you can get the industry's best online privacy or publicly promote your presentations and slide shows with top rankings. But aside from that it's free. We'll even convert your presentations and slide shows into the universal Flash format with all their original multimedia glory, including animation, 2D and 3D transition effects, embedded music or other audio, or even video embedded in slides. All for free. Most of the presentations and slideshows on PowerShow.com are free to view, many are even free to download. (You can choose whether to allow people to download your original PowerPoint presentations and photo slideshows for a fee or free or not at all.) Check out PowerShow.com today - for FREE. There is truly something for everyone!

presentations for free. Or use it to find and download high-quality how-to PowerPoint ppt presentations with illustrated or animated slides that will teach you how to do something new, also for free. Or use it to upload your own PowerPoint slides so you can share them with your teachers, class, students, bosses, employees, customers, potential investors or the world. Or use it to create really cool photo slideshows - with 2D and 3D transitions, animation, and your choice of music - that you can share with your Facebook friends or Google+ circles. That's all free as well!

For a small fee you can get the industry's best online privacy or publicly promote your presentations and slide shows with top rankings. But aside from that it's free. We'll even convert your presentations and slide shows into the universal Flash format with all their original multimedia glory, including animation, 2D and 3D transition effects, embedded music or other audio, or even video embedded in slides. All for free. Most of the presentations and slideshows on PowerShow.com are free to view, many are even free to download. (You can choose whether to allow people to download your original PowerPoint presentations and photo slideshows for a fee or free or not at all.) Check out PowerShow.com today - for FREE. There is truly something for everyone!

For a small fee you can get the industry's best online privacy or publicly promote your presentations and slide shows with top rankings. But aside from that it's free. We'll even convert your presentations and slide shows into the universal Flash format with all their original multimedia glory, including animation, 2D and 3D transition effects, embedded music or other audio, or even video embedded in slides. All for free. Most of the presentations and slideshows on PowerShow.com are free to view, many are even free to download. (You can choose whether to allow people to download your original PowerPoint presentations and photo slideshows for a fee or free or not at all.) Check out PowerShow.com today - for FREE. There is truly something for everyone!

Recommended

«

/ »

Page of

«

/ »

Promoted Presentations

Related Presentations

Page of

CrystalGraphics Sales Tel: (800) 394-0700 x 1 or Send an email

Home About Us Terms and Conditions Privacy Policy Contact Us Send Us Feedback

Copyright 2017 CrystalGraphics, Inc. — All rights Reserved. PowerShow.com is a trademark of CrystalGraphics, Inc.

Copyright 2017 CrystalGraphics, Inc. — All rights Reserved. PowerShow.com is a trademark of CrystalGraphics, Inc.

The PowerPoint PPT presentation: "Curves" is the property of its rightful owner.

Do you have PowerPoint slides to share? If so, share your PPT presentation slides online with PowerShow.com. It's FREE!

Committed to assisting Callutheran University and other schools with their online training by sharing educational presentations for free