Unit V: Curves, Fractals, and Animation
1. Curves
Introduction
Curves are continuous and smooth flowing lines without sharp angles. They are used in
computer graphics to model and render shapes such as fonts, paths, and complex objects.
Interpolation vs. Approximation
• Interpolation: The curve passes through all the given data points.
• Approximation: The curve approximates the data points but does not necessarily pass
through them.
Feature Interpolation Approximation
Curve passes through points? Yes No
Complexity Higher Lower
Stability May oscillate More stable
Diagram Interpolation, Approximation:
Interpolation Approximation
● ●
/ \ /
/ \ /
● ● vs. ● —— ●
/ \ /
● ● ●
Spline Interpolation Methods
a. Hermite Interpolation
• Hermite curves use position and tangent vectors at endpoints.
Defined by four control parameters: two endpoints and their tangents.
• Equation:
P(t) = h1(t)P0 + h2(t)P1 + h3(t)T0 + h4(t)T1
where hi(t) are Hermite basis functions.
Diagram Hermit Curve:
P0 ——→ T0 .......... Hermite Curve .......... ←—— P1 ←—— T1
(Position & Tangent defined at endpoints)
b. Bézier Curves
• Defined by control points; curve shape depends on their positions.
• For n+1 control points, the Bézier curve is:
B(t) = ∑i=o to n Pi*Bi,n(t)
where Bi,n(t) are Bernstein polynomials.
• Properties:
o Curve starts at P0 and ends at Pn
o Lies within the convex hull of control points
Diagram Bezier Curve:
Control Points: P0, P1, P2, P3
P1 P2
●-------●
/ \
/ \
● ●
P0 P3
Curve follows a smooth path influenced by control points.
c. B-Splines (Basis Splines)
• Generalization of Bézier curves.
• Use basis functions defined over a knot vector.
• Properties:
o Local control (changing one point affects only part of the curve)
o Do not necessarily pass through control points
o Useful for smooth and complex shapes
Diagram B-Spline Curve:
Multiple control points:
P0 P1 P2 P3 P4 P5
●----●----●----●----●----●
Curve only influenced by a few nearby points (local control).
2. Fractals
Introduction
Fractals are infinitely complex patterns that are self-similar across scales. Used in modeling
natural objects (mountains, coastlines, clouds).
Classification
• Geometric Fractals: Defined using geometric rules (e.g., Koch Curve).
• Random Fractals: Created using stochastic processes.
• Deterministic Fractals: Built using fixed recursive rules.
• Iterated Function Systems (IFS): Apply transformations repeatedly.
Fractal Dimension
• Not necessarily an integer.
• Measures the complexity or "roughness".
• Box-counting dimension:
D = lim ϵ->0 [log N(ϵ)/log (1/ ϵ)]
where N(ϵ) = number of boxes of size ϵ\epsilonϵ needed to cover the object.
Fractal Dimension and Surfaces
• Fractal dimension helps represent natural surfaces like terrain, clouds, etc.
• Provides realistic rendering of complex surfaces.
Hilbert Curve
• Space-filling curve.
• Passes through every point in a square grid without crossing itself.
• Useful in data mapping and image processing.
Diagram Hilbert Curve:
┌──-─┐
│ │
│ ┌─┘
│ │
└─┘
Koch Curve
• Created by recursively replacing a line segment with a pattern.
• After each iteration, the number of segments increases.
• It has an infinite perimeter but encloses a finite area.
Diagram Koch Curve:
Iteration 0: ──────
Iteration 1: ─┐ ┌─
└──┘
3. Animation
Basics of Animation
• Simulation of movement by displaying a sequence of frames.
• Involves frame rate, timing, and persistence of vision.
Types of Animation
• 2D Animation
• 3D Animation
• Traditional Animation (hand-drawn)
• Computer Animation
• Stop Motion
Principles of Animation (Disney's 12 Principles)
1. Squash and Stretch
2. Anticipation
3. Staging
4. Straight Ahead vs. Pose to Pose
5. Follow Through and Overlapping Action
6. Slow In and Slow Out
7. Arcs
8. Secondary Action
9. Timing
10. Exaggeration
11. Solid Drawing
12. Appeal
Design of Animation Sequences
• Plan with storyboards
• Use key frames to define important positions
• Use in-between frames (tweening) to create smooth transitions
Animation Languages
• Used to script and control animations.
• Examples: ActionScript, MEL (Maya Embedded Language), JavaScript (Web
Animations).
Key Frame Animation
• Important frames are specified (start and end).
• Intermediate frames are interpolated.
Keyframes: ●
Interpolated Frames: -
Time →
●---●--------●----●
K1 T1 K2 K3
Morphing
• Smooth transformation from one shape/image to another.
• Used in character transitions or scene changes.
Diagram Morphing:
Image A Intermediate Image B
:) → :-| → :(
Smooth transformation between two shapes/images.
Motion Specification
• Describes how objects move.
• Can be defined using:
o Mathematical equations
o Scripting
o Path-based motion
Comparison: Types of Animation:
Type Description Example
2D Animation Flat images in 2D space Cartoons
3D Animation Objects in 3D space Pixar movies
Traditional Frame-by-frame hand-drawn Classic Disney films
Computer Animation Created using software CGI in games and films
Stop Motion Real objects, frame-by-frame Claymation
Methods of Controlling Animation
• Script-based Control: Using programming/scripting languages.
• Parameterized Control: Using parameters like speed, direction, time.
• Constraint-based Control: Ensures motion satisfies physical or logical constraints.
• Keyframe Control: Manually specifying key states.
• Behavioral Animation: Autonomous character behavior (AI-driven).
• Physics-based Animation: Simulates physical laws like gravity, friction.
1. Frame-by-Frame Animation Techniques
Definition:
• In frame-by-frame animation, each frame is drawn individually to create motion.
• This method is also known as traditional animation or cel animation.
Techniques:
1. Traditional Hand-Drawn Animation:
o Used in classic Disney movies.
o Drawings are done on paper or transparent sheets (cels).
2. Digital Frame-by-Frame Animation:
o Same process done using software like Adobe Animate, Toon Boom Harmony.
3. Stop Motion:
o Real-world objects are moved slightly and photographed frame-by-frame.
o Examples: Claymation, Puppet Animation.
2. Real-Time Animation Techniques
Definition:
• Real-time animation refers to generating and displaying animation immediately during
interaction, often in response to user input or program behavior.
• Common in video games, VR/AR, and interactive simulations.
Techniques:
1. Skeletal Animation:
o Character models are controlled using an internal "skeleton" or rig.
o Animation is applied to bones, affecting the mesh in real time.
2. Motion Capture (MoCap):
o Real human movement is captured and applied to digital characters in real time.
o Often used in games and film.
3. Procedural Animation:
o Movement is generated algorithmically (e.g., ragdoll physics, crowd simulation).
4. Behavioral Animation:
o Characters behave autonomously using AI, making real-time decisions.
Comparison table:
Feature Frame-by-Frame Animation Real-Time Animation
Method Manual drawing of each frame Computed live based on user/program input
Interactivity Non-interactive Interactive
Storage High (each frame stored separately) Lower (uses models and logic)
Flexibility Limited (static sequence) High (can adapt to input)
Used in Films, cartoons, 2D animations Games, simulations, VR/AR