NURBS Drawing Week 5, Lecture 10



Similar documents
NURBS Drawing Week 5, Lecture 10

NURBS Drawing Week 5, Lecture 10

Computer Graphics CS 543 Lecture 12 (Part 1) Curves. Prof Emmanuel Agu. Computer Science Dept. Worcester Polytechnic Institute (WPI)

Introduction Week 1, Lecture 1

Geometric Modelling & Curves

How To Use Design Mentor

MA 323 Geometric Modelling Course Notes: Day 02 Model Construction Problem

Essential Mathematics for Computer Graphics fast

PYTHAGOREAN TRIPLES KEITH CONRAD

B2.53-R3: COMPUTER GRAPHICS. NOTE: 1. There are TWO PARTS in this Module/Paper. PART ONE contains FOUR questions and PART TWO contains FIVE questions.

CSE 167: Lecture 13: Bézier Curves. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011

We can display an object on a monitor screen in three different computer-model forms: Wireframe model Surface Model Solid model

Algebra 2 Chapter 1 Vocabulary. identity - A statement that equates two equivalent expressions.

Conjectures. Chapter 2. Chapter 3

Geometry Enduring Understandings Students will understand 1. that all circles are similar.

New York State Student Learning Objective: Regents Geometry

Determine whether the following lines intersect, are parallel, or skew. L 1 : x = 6t y = 1 + 9t z = 3t. x = 1 + 2s y = 4 3s z = s

BEZIER CURVES AND SURFACES

39 Symmetry of Plane Figures

4. How many integers between 2004 and 4002 are perfect squares?

Chapter 6 Notes: Circles

Section 9-1. Basic Terms: Tangents, Arcs and Chords Homework Pages : 1-18

Solutions to Homework 10

Chapters 6 and 7 Notes: Circles, Locus and Concurrence

arxiv: v1 [math.dg] 24 Apr 2014

TWO-DIMENSIONAL TRANSFORMATION

Solutions to old Exam 1 problems

Outline. Quantizing Intensities. Achromatic Light. Optical Illusion. Quantizing Intensities. CS 430/585 Computer Graphics I

Definitions, Postulates and Theorems

GEOMETRY COMMON CORE STANDARDS

DEFINITIONS. Perpendicular Two lines are called perpendicular if they form a right angle.

Angles that are between parallel lines, but on opposite sides of a transversal.

L 2 : x = s + 1, y = s, z = 4s Suppose that C has coordinates (x, y, z). Then from the vector equality AC = BD, one has

Advanced Math Study Guide

Introduction Week 1, Lecture 1

ME 111: Engineering Drawing

Computer Graphics. Geometric Modeling. Page 1. Copyright Gotsman, Elber, Barequet, Karni, Sheffer Computer Science - Technion. An Example.

2.3 WINDOW-TO-VIEWPORT COORDINATE TRANSFORMATION

Computer Animation: Art, Science and Criticism

Figure 2.1: Center of mass of four points.

x 2 + y 2 = 1 y 1 = x 2 + 2x y = x 2 + 2x + 1

Computer Aided Design (CAD)

Introduction to CATIA V5

1 Solution of Homework

Geometric description of the cross product of the vectors u and v. The cross product of two vectors is a vector! u x v is perpendicular to u and v

Heron s Formula. Key Words: Triangle, area, Heron s formula, angle bisectors, incenter

Gymnázium, Brno, Slovanské nám. 7, SCHEME OF WORK Mathematics SCHEME OF WORK. cz

Unit 2 - Triangles. Equilateral Triangles

5.1 Midsegment Theorem and Coordinate Proof

CENTER OF GRAVITY, CENTER OF MASS AND CENTROID OF A BODY

ME 111: Engineering Drawing

Computer Aided Design (CAD)

CHAPTER 8, GEOMETRY. 4. A circular cylinder has a circumference of 33 in. Use 22 as the approximate value of π and find the radius of this cylinder.

The Geometry of Piles of Salt Thinking Deeply About Simple Things

CIRCLE COORDINATE GEOMETRY

61. Pascal s Hexagon Theorem.

ME 111: Engineering Drawing

Identifying second degree equations

Lecture 2: Homogeneous Coordinates, Lines and Conics

Content. Chapter 4 Functions Basic concepts on real functions 62. Credits 11

GEOMETRY CONCEPT MAP. Suggested Sequence:

Biggar High School Mathematics Department. National 5 Learning Intentions & Success Criteria: Assessing My Progress

Vector Notation: AB represents the vector from point A to point B on a graph. The vector can be computed by B A.

Lecture 1: Systems of Linear Equations

Lecture L17 - Orbit Transfers and Interplanetary Trajectories

Visualizing Triangle Centers Using Geogebra

Math 531, Exam 1 Information.

WORK SCHEDULE: MATHEMATICS 2007

alternate interior angles

Astromechanics Two-Body Problem (Cont)

Name Class. Date Section. Test Form A Chapter 11. Chapter 11 Test Bank 155

Selected practice exam solutions (part 5, item 2) (MAT 360)

Algebra 1 Course Title

SIMSON S THEOREM MARY RIEGEL

Dear Accelerated Pre-Calculus Student:

Week 1 Chapter 1: Fundamentals of Geometry. Week 2 Chapter 1: Fundamentals of Geometry. Week 3 Chapter 1: Fundamentals of Geometry Chapter 1 Test

The University of the State of New York REGENTS HIGH SCHOOL EXAMINATION MATHEMATICS B. Tuesday, August 16, :30 to 11:30 a.m.

11.1. Objectives. Component Form of a Vector. Component Form of a Vector. Component Form of a Vector. Vectors and the Geometry of Space

South Carolina College- and Career-Ready (SCCCR) Pre-Calculus

TABLE OF CONTENTS. INTRODUCTION... 5 Advance Concrete... 5 Where to find information?... 6 INSTALLATION... 7 STARTING ADVANCE CONCRETE...

Geometry. Higher Mathematics Courses 69. Geometry

Computational Geometry. Lecture 1: Introduction and Convex Hulls

How To Draw In Autocad

HIGH SCHOOL: GEOMETRY (Page 1 of 4)

Prentice Hall Mathematics: Algebra Correlated to: Utah Core Curriculum for Math, Intermediate Algebra (Secondary)

2.1 Three Dimensional Curves and Surfaces

Volumes of Revolution

A matrix method for degree-raising of B-spline curves *

LEAVING CERT DCG SCHEME OF WORK

Curriculum Map by Block Geometry Mapping for Math Block Testing August 20 to August 24 Review concepts from previous grades.

Chapter 5: Distributed Forces; Centroids and Centers of Gravity

Modeling Curves and Surfaces

NEW YORK STATE TEACHER CERTIFICATION EXAMINATIONS

Triangulation by Ear Clipping

Chapter 8 Integers 8.1 Addition and Subtraction

42 CHAPTER 1. VECTORS AND THE GEOMETRY OF SPACE. Figure 1.18: Parabola y = 2x Brief review of Conic Sections

Chapter 17. Orthogonal Matrices and Symmetries of Space

Monash University Clayton s School of Information Technology CSE3313 Computer Graphics Sample Exam Questions 2007

Curve Fitting with Maple

CHAPTER 1 Splines and B-splines an Introduction

Transcription:

CS 430/536 Computer Graphics I NURBS Drawing Week 5, Lecture 10 David Breen, William Regli and Maxim Peysakhov Geometric and Intelligent Computing Laboratory Department of Computer Science Drexel University http://gicl.cs.drexel.edu Outline Conic Sections via NURBS Knot insertion algorithm The de Boor s algorithm for B-Splines for NURBS Oslo Algorithm Barycentric Coordinates Discussion of homework #3 1 Conic Sections via NURBS Conic Sections via NURBS Obtained via projection of the 3D parabola onto a plane Note: 3D Case: rational curve is a 4D object D Case: rational curve is a 3D object assign w to each control point 3 Define the curve with three control points Weights of first/last control points are 1 For center control point w<1 gives an ellipse w>1 gives a hyperbola w=1 gives a parabola Knot vector is {0.0, 0.0,0.0, 1.0, 1.0, 1.0} 4 Conic Sections via NURBS: A Circular Arc The two sides of the control polygon are of equal length The chord connecting the first and last control points meets each leg at an angle q equal to half the angular extent of the desired arc (for instance, 30 for a 60 arc The weight of the inner control point is equal to the cosine of q Knot vector is {0.0, 0.0, 0.0, 1.0, 1.0, 1.0} 5 Conic Sections via NURBS: A Circle What if we need an arc of >180? Idea: Use multiple 90 or 10 arcs B0 = B6 = - stitch them together with knots Example: 3 arcs of 10 { 0.866,0.5,1} B = {- 1.73, 1,0.5} B = { 0, 1,1 } B = { 1.73, 1,0.5} 1 - B 5 = { 0,,0.5} - 0,0,0,1,1,,,3,3,3 B = 4 { 0.866,0.5,1} 3-6 1

Conic Sections via NURBS Knot Insertion Example: 4 arcs of 90 { } B 3 = -1,1, { } B 1 = 1,1, Issue: More control points mean more control How do we add more points and keep same curve? { } B 5 = -1,-1, { } B 7 = 1,-1, 7 8 Knot Insertion Basic Approach Decide where we d like to tweak the curve Add a new knot Find affected d-1 control points Replace it with d new control points Example: New knot at u=.6 9 Knot Insertion Given: n+1 control points (P 0, P 1,..., P n, a knot vector of m+1 knots U = { u 0, u1,..., u m } and a degree d B- spline curve C(u. Insert a new knot t into the knot vector without changing the shape of the curve. If t lies in knot span [u k, u k+1, only the basis functions for (P k, P k-d are non-zero. Find d new control points Q k on edge P k-1 P k, Q k-1 on edge P k- P k-1,..., and Q k-d+1 on edge P k-d P k-d+1 All other control points are unchanged. Note that d-1 control points of the original control polyline are removed and replaced with d new control points. 10 See http://www.cs.mtu.edu/~shene/courses/cs361/notes/spline/b-spline/single-insertion.html Knot Insertion Algorithm Create new control point Q j = (1 a j P j-1 + a j P j Where a is defined as a j = t - u j u j +d - u j Properties of Knot Insertion Increasing the multiplicity of a knot decreases the number of non-zero basis functions at this knot At a knot of multiplicity d, there will be only one non-zero basis function Corresponding point on the curve p(u is affected by exactly one control point p i In fact p(u is p i! See http://www.cs.mtu.edu/~shene/courses/cs361/notes/spline/b-spline/single-insertion.html 11 1

Generalization of de Casteljau's algorithm It provides a fast and numerically stable way for finding a point on a B-spline curve Observation: if a knot u is inserted d times to a B-spline, then p(u is the point on the curve. Idea: We just simply insert u d times and the last point is p(u! See http://www.cs.mtu.edu/~shene/courses/cs361/notes/spline/b-spline/de-boor.html 13 14 15 16 17 18 3

De Boor s Algorithm If u lies in [u k,u k+1 and u!= u k, let h = d If u = u k and u k is a knot of multiplicity s, let h = d s Copy the affected control points p k-s, p k-s-1,..., p k-d+1, p k-d to a new array and rename them as p k-s,0, p k-s-1,0,..., p k-d+1,0 for r := 1 to h do for i := k-d+r to k-s do { Let a i,r = (u - u i / ( u i+d-r+1 - u i Let p i,r = (1 - a i,r p i-1,r-1 + a i,r p i,r-1 } p k-s,d-s is the point p(u. De Boor s Algorithm (cont for u := 0 to u max do { for r := 1 to h do for i := k-p+r to k-s do { Let a i,r = (u - u i / ( u i+p-r+1 - u i Let p i,r = (1 - a i,r p i-1,r-1 + a i,r p i,r-1 } p k-s,p-s is the point p(u. } 19 1 Example of de Boor s Algorithm Degree 3 B-spline curve (i.e., d = 3 Defined by seven control points p 0,..., p 6 And knot vector: u = 0.4 a 4,1 = (u - u 4 / ( u 4+3 - u 4 = 0. a 3,1 = (u - u 3 / ( u 3+3 - u 3 = 8/15 = 0.53 a,1 = (u - u / ( u +3 - u = 0.8 p 4,1 = (1 - a 4,1 p 3,0 + a 4,1 p 4,0 = 0.8p 3,0 + 0.p 4,0 p 3,1 = (1 - a 3,1 p,0 + a 3,1 p 3,0 = 0.47p,0 + 0.53p 3,0 p,1 = (1 - a,1 p 1,0 + a,1 p,0 = 0.p 1,0 + 0.8p,0 a 4, = (u - u 4 / (u 4+3-1 - u 4 = 0.3 a 3, = (u - u 3 / (u 3+3-1 - u 3 = 0.8 p 4, = (1 - a 4, p 3,1 + a 4, p 4,1 = 0.7p 3,1 + 0.3p 4,1 p 3, = (1 - a 3, p,1 + a 3, p 3,1 = 0.p,1 + 0.8p 3,1 a 4,3 = (u - u 4 / (u 4+3- - u 4 = 0.6 p 4,3 = (1 - a 4,3 p 3, + a 4,3 p 4, = 0.4p 3, + 0.6p 4, u 0 = u 1 = u = u 3 u 4 u 5 u 6 u 7 = u 8 = u 9 = u 10 0 0.5 0.5 0.75 1 Similar but Different De Casteljau's: Dividing points are computed with a pair of numbers (1 - u and u that never change Can be used for curve subdivision Uses all control points De Boor's These pairs of numbers are different and depend on the column number and control point number Intermediate control points are not sufficient d+1 affected control points are involved in the computation 3 De Boor s: Curves Oslo Algorithm A subdivision algorithm for B-splines, the basic idea: Take the curve with m+1 control points P 0 to P m Insert a knot in any point (0.5 maybe? As a result you will have new points P k and P k Take curves with m+1 control points P 0 P k, P k P m-1 and P 1 P k, P k P m Apply procedure recursively on each part 5 Animated by Max Peysakhov @ Drexel University 6 4

Oslo Algorithm 7 Barycentric Coordinates By Ceva's Theorem: For any point K inside the triangle ABC Consider the existence of masses w A, w B, and w C, placed at the vertices of the triangle Their center of gravity (barycenter will coincide with the point K. A, w A August Ferdinand Moebius (1790-1868 defined (187 w A, w B, and w C as the barycentric coordinates of K K A B + w C C B, w B K 8 C, w C Recorded from: http://heim.ifi.uio.no/~trondbre/osloalgapp.html http://www.cut-the-knot.org/triangle/barycenter.shtml Properties of Barycentric Coordinates Not unique Can be generalized to negative masses Can be made unique by setting w A + w C = 1 w A = 0 for points on BC w B = 0 for points on AC w C = 0 on AB B, w B A, w A K C, w C Area Ta: (b-p x (c-p / 9 30 http://www.cut-the-knot.org/triangle/barycenter.shtml Calculating the Weights Calculating Weights (cont. Given vertices A, B, C and Centroid K What are the weights, w A, w B, w C? x K x A x B + w C x C Solve for w A and w B w A = (x B (y C - y K - (x C - x K (y B (x A (y B - (x B (y A y K y A y B + w C y C Substitute w C = 1 - w A - w B x K x A x B + (1- w A - w B x C y K y A y B + (1- w A - w B y C w B = (x A (y C - y K - (x C - x K (y A (x B (y A - (x A (y B w C = 1 - w A - w B 33 34 5

Onto Bézier Surfaces B-spline Surfaces NURBS Surfaces Faceting, Subdivision, Tessellation 3D Objects Programming assignment 3 Input PostScript-like file containing polygons Output B/W XPM Implement viewports Use Sutherland-Hodgman intersection for polygon clipping Implement scanline polygon filling. (You can not use flood filling algorithms 38 39 6