Javier Gonzalez-Sanchez | SER431 | Fall 2018 | 3 jgs Hermite Curves We want curves that fit together smoothly. To accomplish this, we would like to specify a curve by providing: § The 2 end points, and § The 2 tangents vectors (first derivatives at these endpoints)
Javier Gonzalez-Sanchez | SER431 | Fall 2018 | 6 jgs Hermite Curves P(t)=(2t3-3t2+1)P0 + (2t3+3t2)P1 + (t3-2t2+t)T1 + (t3-t2)T2 Where t is 0 <= t < = 1
Javier Gonzalez-Sanchez | SER431 | Fall 2018 | 7 jgs Hermite Curves Examples § All tangent vector magnitudes are equal, but the direction of the left tangent vector varies.
Javier Gonzalez-Sanchez | SER431 | Fall 2018 | 8 jgs Hermite Curves Examples § The set of Hermite curves that have the same values for the endpoints P0 and P1, tangent vectors R0 and R1 of the same direction, but with different magnitudes for R0. The magnitude of R1 remains fixed.
Javier Gonzalez-Sanchez | SER431 | Fall 2018 | 16 jgs Definition § Corner cutting algorithm § Generate a curve by successive refinement of a control polygon (a set of control points)
Javier Gonzalez-Sanchez | SER431 | Fall 2018 | 17 jgs Method § Given a control polygon {P0, P1, P2, …, Pn} § Refine it by generating a new sequence of control point as {Q0, R0, Q1, R1, …, Qn-1, Rn-1} Where each pair Qi, Ri are to be at a ratio of ¼ and ¾ between the end points of the line segment Pi Pi+1 Qi=3/4Pi + 1/4Pi+1 Ri=1/4Pi + 3/4Pi+1
Javier Gonzalez-Sanchez | SER431 | Fall 2018 | 21 jgs Step 1 class Point { public: float x, y, z; Point() { x = 0; y = 0; z = 0; } Point(const float a, const float b, const float c) { x = a; y = b; z = c; } Point(const Point& p) { x = p.x; y = p.y; z = p.z; } }; std::vector Points;
jgs SER431 Advanced Graphics Javier Gonzalez-Sanchez [email protected] Fall 2018 Disclaimer. These slides can only be used as study material for the class SER431 at ASU. They cannot be distributed or used for another purpose.