Curve Fitting with Parametric Splines using the Artwork "The Girl with the Pearl Earring"
Summary
This activity focuses on curve fitting using parametric splines, a technique commonly used in numerical analysis to approximate complex curves. In this assignment, students are tasked with selecting a minimal number of points to define a curve, storing the coordinates in arrays, and constructing cubic splines in MATLAB. The goal is to iteratively refine the selected points to achieve the best possible fit with the fewest points, balancing accuracy with simplicity.
Learning Goals
In this activity, students explore spline interpolation, specifically cubic splines, to approximate complex curves with smooth transitions. They'll learn the process for fitting parametric splines with data points, a common method for real-world applications, and error minimization by selecting control points to maintain accuracy efficiently. The project reinforces MATLAB programming skills, including plotting and utilizing built-in functions for data analysis and modeling, and it emphasizes iterative refinement, helping students enhance their solutions.
Context for Use
This activity, Curve Fitting with Parametric Splines using "The Girl with the Pearl Earring", is designed for a numerical analysis or applied mathematics course usually taken by upper-level undergraduate students. Curve fitting usually comes early-to-mid semester, once students have a foundational grasp of MATLAB and interpolation techniques. Students should have a solid understanding of calculus, particularly concepts involving derivatives and curves, along with familiarity with basic linear algebra and interpolation methods. Some prior exposure to error minimization and approximation would also be beneficial, as these topics are central to the project's objectives.
Description and Teaching Materials
Students explore spline interpolation as a method to approximate complex curves by fitting points, using MATLAB to produce a sketch of The Girl with a Pearl Earring by Johannes Vermeer. With a grid-overlay outline of the artwork, they record a set of ordered (x, y) points, which they then input into MATLAB's spline functions to recreate the image. This project demonstrates how MATLAB constructs smooth curves from a carefully chosen set of control points, enabling students to model curves with precision. Through iterative refinement of point selection to minimize error, students develop key competencies in data analysis and MATLAB programming. By the end, students gain hands-on experience in curve fitting and visualization techniques, building both analytical and computational skills. More details are included in the following:
- Curve Fitting with Parametric Splines using the Artwork The Girl with the Pearl Earring.pdf (Acrobat (PDF) 180kB Oct29 24) - A pdf of the class handout.
- Girl_with_the_Pearl_Earing_Solution.mlx (MATLAB Live Script 101kB Oct29 24) - A live script with a single parametric spline that draws "The Girl with the Pearl Earring"
×
Teaching Notes and Tips
This is a classroom-based group activity that can also be extended into a week-long homework, depending on the course structure. It can be completed in small teams or individually.
Begin the class with a brief overview of parametric splines and their applications. Emphasize that areas with greater curvature require more points for accuracy, and note that it may take multiple iterations of selecting points to get a good fit. Divide students into small groups, assigning each group a specific curve from the drawing. Instruct students to iteratively refine their points to achieve precise curves. To enhance learning, consider having groups peer review each other's results. Conclude the session by plotting all curves together to create the final collaborative artwork.
Assessment
The project can be assessed using the following rubric.
Criteria:
3 - Meets Expectations, 2 - Approaching Expectations, 1 - Needs Improvement
Spline Accuracy
3 - The spline accurately represents the assigned curve, with smooth transitions and minimal errors.
2 - The spline captures the general shape of the curve but lacks some accuracy or smoothness.
1 - The spline is incomplete or does not resemble the assigned curve accurately.
Efficiency in Point Selection
3 - The points are selected efficiently, achieving accuracy with a minimal number of points.
2 - The point selection is adequate but could be more efficient, with unnecessary points in some areas.
1 - Excessive or poorly chosen points result in an inefficient or inaccurate representation of the curve.
Evidence of Iterative Refinement
3 - Multiple attempts at point selection are clearly documented, showing refinement and improvement.
2 - Some evidence of testing and refinement, though the process could be more thorough.
1- Little or no evidence of iterative refinement; point selection lacks optimization and testing.
Scoring Guide:
9 Points: Exceeds Expectations
6-8 Points: Meets Expectations
3-5 Points: Approaching Expectations
< 3 Points: Needs Improvement
References and Resources
Many undergraduate introductory numerical analysis or scientific computing textbooks cover curve fitting techniques and parametric splines. For the course in which this activity was developed, the textbook was:
Gladwell, I., Nagy, J. G., & Ferguson, W. (2011). Introduction to Scientific Computing using MATLAB. Lulu.