200 likes | 500 Views
Curves and Surfaces. Dr. Aree Ali Mohammed Assistant Professor 2013-2014 3 rd Stage aree.ali@univsul.net. Goals. How do we draw curves and surfaces? We need smooth curves and surfaces in many applications: model real world objects computer-aided design (CAD) high quality fonts
E N D
Curves and Surfaces Dr. Aree Ali Mohammed Assistant Professor 2013-2014 3rd Stage aree.ali@univsul.net University of Sulaimani - School of Science - Computer Dept.
Goals • How do we draw curves and surfaces? • We need smooth curves and surfaces in many applications: • model real world objects • computer-aided design (CAD) • high quality fonts • data plots • artists sketches • Draw fractal lines, curves and surfaces University of Sulaimani - School of Science - Computer Dept.
Curve Generation I • True curve DDA • Approximated Interpolation • Circular Arc Generation using DDA Algorithm • Uses differential equation of the curve University of Sulaimani - School of Science - Computer Dept.
Curve Generation II • Drawbacks: • Need more information than endpoints. • Ability to scale a picture is limited. • New clipping algo is required. • Complex for airplane wings, cars and human faces. • - Advantage: • Very smooth University of Sulaimani - School of Science - Computer Dept.
Interpolation - Drawing curves using approximation methods Find suitable mathematical expression for the known curve (Polynomial, trigonometric and exponential) to approximate the curve University of Sulaimani - School of Science - Computer Dept.
Spline Representation • To produce a smooth curve through a designated set of points (control points) flexible strip is used (Spline). University of Sulaimani - School of Science - Computer Dept.
Parametric Equation • A (2-D) parametric curve is expressed as: • A pair of (mathematical) functions: P(t) = ( x(t), y(t) ). • In 3-D, we add a third function for z. • And an interval of legal values for t: [a,b]. • t is called the parameter. • Example: x(t) = t2–2t, y(t) = t–1, t in [0,3]. y t = 3 (end) (t2–2t, t–1) x t = 0 (start) University of Sulaimani - School of Science - Computer Dept.
Bezier Curves I • French mathematician • Used to construct curves and surfaces • Determined by defining polygon • Useful for curve and surface design • Easy to implement • Available in CAD system and various graphic packages • Cubic Bezier curve is used to avoid no. of calculations • Always passes through the first and last control points • Designed curve follows the shape of the defining polygon • Invariant under an affine transformation University of Sulaimani - School of Science - Computer Dept.
Bezier Curves II Example: construct the Bezier curve of order 3 and with 4 polygon vertices A(1,1), B(2,3), C(4,3) and D(6,4). University of Sulaimani - School of Science - Computer Dept.
2D Bezier Curves University of Sulaimani - School of Science - Computer Dept.
3D Bezier Curves University of Sulaimani - School of Science - Computer Dept.
Bezier Surfaces University of Sulaimani - School of Science - Computer Dept.
Bézier Surface Properties • boundary curves • lie on surface • boundary curves • defined by • boundary polygons
Bézier Surface Properties • Nice, intuitive method for creating surfaces • Variable display resolution • Minimal storage
Bézier Surface Multiple patches connected smoothly Conditions on control netsimilar to curves … difficult to do manually