Brianna Lynn's Project 3

Project 3

Partner: Mauro Rubio

Bezier Splines

Reality Check 5

In this project, we used adaptive quadrature to solve equipartition, which is the division of an arbitrary path into equal length subpaths. This is a common problem found in computer aided modeling and manufacturing as they both require precise control of spatial position along a prescribed motion path. It is generally preferable to maintain a constant speed along the path so that the progress should be made along an equal length each second. These applications require the construstion of parametrized curves and surfaces to be navigated. The picture below shows a parametric path P={x(t),y(t)|0<t<1} where x(t)=.5+.3t+3.9t2-4.7t3 and y(t)=1.5+.3t+.9t2-2.7t3, which is a Bezier curve defined by the four points (.5,1.5),(.6,1.6),(2,2),(0,0). Using evenly spaced parameters t is t=0,.25,.5,.75,1, which clearly does not divide the arc length equally. Our goal is to divide the path into n equal lengths.

Step 1

Here we have to write a program in Matlab that uses adaptive quadrature to compute the arc length from t = 0 to t = T for a given T ≤ 1. For this we used Length = adapquad(fnew,0,T,tol0) with tol0 = 10-8. Step1 Code

Step 2

Problem 2 asks us to write a program in Matlab that for any input s between 0 and 1, finds the parameter t*(s) that is s of the way along the curve. This means that the arc length from t = 0 to t = t*(s) divided by the arc length from t = 0 to t = 1 should equal to s. We used the Bisection Method to locate the point t*(s) to three correct decimal places. Step2 Code

Step 3

Problem 3 asks us to equipartition the path shown in Figure 5.6 (pg 280) into n subpaths of equal lenght; we used n = 5 and n = 8. Step3 Code: n=5 and Step3 Code: n=8

Step 4

Here we replace the Bisection Method in Step 2 with Newton's Method, and repeated Steps 2 and 3.

Step4 Code

Step 5

In Step 5 we used Matlab's animation commands to demonstrate traveling along the path, first at the original parameter 0 ≤ t ≤ 1 speed and then at the constant speed given by t*(s) for 0 ≤ s ≤ 1. Step6 Code for uneven speed

Step6 Code for constant speed

Step 6

Here we experimented with equipartitioning a path of our choice into n segments. Here is the code for Step 6 project3step6.m.

We used the points (x1,y1)=(1,1),(x2,y2)=(1,3),(x3,y3)=(3,3),(x4,y4)=(2,2) to obtain our Bezier curve:

x(t) = 1+6*t2-15*t3

y(t) = 1+6*t-6*t2+t3

We partitioned the path using n=15

Brianna's Projects

Brianna's Homepage