Applied Physics for CSE-Module 5
Applied Physics for CSE-Module 5
Module 5
APPLICATIONS OF PHYSICS IN COMPUTING
Physics of Animation
Lecture-1
Taxonomy of physics based animation methods, Frames, Frames per Second, Size
and Scale, Weight and Strength.
Animation
Animation is a method of photographing successive drawings or models to create an
illusion of movement in a sequence. Since our eyes can only retain an image for approx.
( ⅒)th of a second, when multiple images appear in fast succession, the brain blends them
into a single moving image.
Animation is the process of displaying still images in a rapid sequence to create the
illusion of movement.
In traditional animation, pictures are drawn or painted on transparent celluloid sheets to be
photographed. But today most animated movies are made with computer generated
imagery or CGI.
Important Terminology:
Frames
A frame is a single image in a sequence of pictures. Each frame is a still image. When
frames are shown at a fast enough rate, our brains blend them together into a
continuous moving image.
Size:
In animation, size refers to the dimensions of an object or character within the
animated environment. It’s a fundamental property that can greatly influence the
perception and interaction of the character or object. For instance, the size of a
character can dictates their perceived age, strength, or role within a story. Similarly,
the size of an object can determine how it’s used within the scene. A large rock might
serve as an obstacle for a character, while a small pebble could be easily picked up
and thrown. Adjusting the size of characters or objects is a common technique in
Scale
Scale in animation refers to the relative size of different elements in a scene. It is the
ratio of animation size to the actual size of the object. It’s about the relationship
between objects and characters and their environment. For instance, a character might
be drawn larger to show importance or smaller to show distance. Scale can also be
used to create visual effects or illusions. Understanding and manipulating scale is
crucial in animation to create believable environments and to guide the viewer’s
focus.
Review Questions
1. What is animation?
2. What are kinematics and dynamics?
3. What are Frames & FPS in animation?
4. What are size & scale in animation?
5. What is proportionate scaling?
6. What is weight in animation?
Lecture 2
Motion and Timing in Animations, Constant Force and Acceleration.
Path of action: Motion has a path of action, which indicates the path along which the
object or character moves. The path of action refers to the object’s motion in space.
Timing Tools
In animation, timing of action consists of placing objects or characters in particular
locations at specific frames to give the illusion of motion. When you increase the number
of objects between two extreme objects, the action will be slow and run for a longer time;
and when the number of objects in between the extremes is fewer, the action will be faster
and would take less time. This way, timing plays a very crucial role in establishing a
character’s nature, personality, mood and emotion.
Slow-in (ease in): It is the process in which the object is slowing down, often in
preparation for stopping. In this, spacing between the objects in the frames are decreased.
For example, a ball rolling up an incline is slowing down.
Slow-out (ease out): It is the process in which the object is speeding up, often from a
still position. In this, spacing between the objects in the frames are increased.
For example, a ball rolling down an incline or dropping straight down is slowing out, as it
goes from a still position or slow speed to a fast speed.
Review Questions
1. Which are the different types of motion in animation?
2. What is line of action?
3. What is path of action?
4. What is timing in animation?
5. What are linear motion and uniform motion timing?
6. What are slow-in and slow-out ?
Lecture 3
The Odd rule, Odd-rule Scenarios, Motion Graphs
For deceleration, the multiples start at a higher odd number and decrease, for example 7, 5,
3, 1.
Base distance: base distance is the smallest distance traveled between two frames in the
sequence. For a slow-out, this is the distance between the first two frames and for a slow-
in, it’s the distance between the last two frames. This base distance, is used in all Odd Rule
calculations.
If we are calculating the distance for a large number of frames, chart like this isn’t
practical, one can figure out the odd number multiplier for consecutive frames with this
formula:
Odd number multiplier for consecutive frames = ((current frame # – 1) × 2) – 1
In the charts above, note that the distances in the last column are squared numbers: 1=12,
4 = 22, 9 = 32, 16 = 42, and so on. One of the benefits of the Odd Rule is one can calculate
the total distance traveled from the start point to the current frame with the following
formula:
Multiplier for distance from first frame to current frame = (current frame # – 1)2
Using the base distance, one can calculate the distances between each frame.
If one adds up the distances traveled, one will find that they add up to exactly 0.4m.
One feature of the Odd Rule is that the base distance is always half the difference between
any two adjacent distances.
To find the base distance, one can simply calculate:
(0.5m – 0.35m)/2 = 0.07m
To figure out how many frames are in the slow-in, divide the first distance by the base
distance to find out which odd number it corresponds to.
0.5/0.07 = 7
This means the first distance corresponds to 7 in the 7, 5, 3, 1 sequence, making the
sequence four frames long. Now we can work back the other way, multiplying the base
distance by odd numbers to get the distances for the rest of the slow- in frames.
Motion Graphs
A motion graph plots an object’s position against time. It is also called as position-time
graph or x-t graph. If one is using animation software, understanding and using motion
graphs is a key skill in animating anything beyond the simplest of motions. If one is
drawing the animation, drawing motion graphs before animating can help one to visualize
the motion. One will need to understand the types of lines in a motion graph and what they
represent in terms of visible motion. one can also look at motion graphs to get a better
understanding of any difficulties one is having with the timing or action.
Uniform motion: For uniform motion the graph is a straight line. The higher the speed,
the steeper the curve. When an object is stationary the motion curve is a flat horizontal
line.
Acceleration: Graphs of accelerating motion always show a curve. The more the curve
bends, the more the object is accelerating.
Review Questions
1. What is Odd rule in animation?
2. How to place the frames when base distance is known and speeding-up?
3. How to place the frames when base distance is known and slowing down?
4. How to find base distance when total distance and no. of frames are known?
5. How to find no. of frames when first key distance is known and slowing down?
6. What are nature of the curve for stationary, uniform, acceleration and deceleration
motion?
Lecture 4
Examples of Character Animation: Jumping, Parts of Jump, Jump
magnification, Stop Time, Walking: Strides and Steps, Walk Timing.
t = 0.5
Jump time at 30fps = 0. 5 * 30 = 15 frames
Jump Magnification
The jump magnification (JM) is the ratio of the jump height to the push height.
𝐽𝑢𝑚𝑝 𝐻𝑒𝑖𝑔ℎ𝑡
𝐽𝑀 =
𝑃𝑢𝑠ℎ 𝐻𝑒𝑖𝑔ℎ𝑡
It is also defined as the ratio of jump time and push time. It is used to calculate the push
timing and stop timing.
𝐽𝑢𝑚𝑝 𝑇𝑖𝑚𝑒
𝐽𝑀 =
𝑃𝑢𝑠ℎ 𝑇𝑖𝑚𝑒
Jump Magnification is in fact an exact ratio that tells one how much the character has to
accelerate against gravity to get into the air. The JM, besides being the ratio of jump-to-
push vertical height and time, is also the ratio of push-to-jump vertical acceleration. it is
given by
𝑃𝑢𝑠ℎ 𝐴𝑐𝑐𝑒𝑙𝑒𝑟𝑎𝑡𝑖𝑜𝑛
𝐽𝑀 =
𝐽𝑢𝑚𝑝 𝐴𝑐𝑐𝑒𝑙𝑒𝑟𝑎𝑡𝑖𝑜𝑛
The magnitude of jump acceleration is always equal to gravitational acceleration g
𝑃𝑢𝑠ℎ 𝐴𝑐𝑐𝑒𝑙𝑒𝑟𝑎𝑡𝑖𝑜𝑛
𝐽𝑀 =
𝑔
Push Time
The JM also gives you the ratio of the jump time to the push time.
JM = Jump Time/Push Time
Working a little algebra, we can express the equation in a way that directly calculates the
push time:
Push Time = Jump Time/JM
Example:
JM = 3
Jump Time: 15 frames
Push Time = 15/3 = 5 frames
Landing
The forces on landing are similar to takeoff. If the landing has faster timing, the forces
will be larger than for a longer timing.
Stop Time
The stop height is often a bit larger than the push height, but the timing of the push and
stop are the same. Therefore we can write
Push Height/Push Frames = Stop Height/Stop Frames
This can also be expressed as:
Push Height/Push Time = Stop Height/Stop Time
Stop Time = (Push Time × Stop Height)/Push Height
Example:
Push Time: 5 frames
Push Height: 0.4m
Stop Height: 0.5m
Stop Time = (5 * 0.5) / 0.4 = 6 frames
Walking
Animation of walking needs the knowledge of basics of mechanics. The ability to animate
walk cycles is one of the most important skills a character animator needs to master.
Gait is the timing of the motion for each foot, including how long each foot is on the
ground or in the air. During a walk, the number of feet the character has on the ground
changes from one foot (single support) to two feet (double support) and then back to one
foot. You can plot the time each foot is on the ground to see the single and double support
times over time. A normal walking gait ranges from 1/ 3 to 2/3 of a second per step, with
1/2 second being average.
Walk Timing
Walking is sometimes called “controlled falling.” Right after you move past the passing
position, your body’s center of gravity is no longer over your base of support, and you
begin to tip. Your passing leg moves forward to stop the fall, creating your next step. Then
the cycle begins again.
The horizontal timing for between the four walk poses is not uniform. The CG slows in
going from the contact to passing position, then slows out from passing to contact. The CG
also rises and falls, rising to the highest position during passing and the lowest during
contact. The head is in the highest position during passing.
Review Questions
1. What are parts of jump?
2. What are Jump time and Push time?
3. What is jump magnification?
4. What are expressions for jump time and stop time.?
5. What is stride length?
6. What is step length?
7. What is Gait?
Lecture 5
Poisson Distribution
A Poisson distribution is a discrete probability distribution. It gives the probability of an
event happening a certain number of times (k) within a given interval of time or space.
The Poisson distribution has only one parameter, λ (lambda), which is the mean number of
events.
A Poisson distribution can be represented visually as a graph of the probability mass
function. A probability mass function is a function that describes a discrete probability
distribution.
The probability mass function of the Poisson distribution is:
𝜆𝑘 𝑒 −
𝑓(𝑘: 𝜆) = 𝑃(𝑋 = 𝑘) =
𝑘!
Where:
X is a random variable following a Poisson distribution
k is the number of times an event occurs
P(X: k) is the probability that an event will occur k times
e is Euler’s constant (approximately 2.718)
is the average number of times an event occurs
! is the factorial function.
The Poisson distribution may be used in the design of experiments such as scattering
experiments where a small number of events are seen.
.
Example of probability for Poisson distributions
On a particular river, overflow floods occur once every 100 years on average. Calculate
the probability of k = 0, 1, 2, 3, 4, 5, or 6 overflow floods in a 100 year interval, assuming
the Poisson model is appropriate.
Because the average event rate is one overflow flood per 100 years, λ = 1.
𝜆𝑘 𝑒 −𝜆
𝑓 (𝑘: 𝜆) = 𝑃(𝑋: 𝑘) =
𝑘!
𝜆𝑘 𝑒 −𝜆 1𝑘 𝑒 −1
P(k overflow floods in 100 years) = =
𝑘! 𝑘!
𝜆𝑘 𝑒 −𝜆 10 𝑒 −1 𝑒 −1
P(k = 0 overflow floods in 100 years) = = = 0.368
𝑘! 0! 1
𝜆𝑘 𝑒 −𝜆 11 𝑒 −1 𝑒 −1
P(k =1 overflow floods in 100 years) = = = 0.368
𝑘! 1! 1
𝜆𝑘 𝑒 −𝜆 12 𝑒 −1 𝑒 −1
P(k = 2 overflow floods in 100 years) = = = 0.184
𝑘! 2! 2
Modeling the Probability for Proton Decay
The Poisson distribution can be applied to model the probability for proton decay. The
experimental search for Proton Decay was undertaken because of the implications of the
Grand unification Theories. The lower bound for the mean life time of proton is now
proposed to be on the order of τ = 1033 Years. The probability for observing a proton decay
can be estimated from the nature of particle decay and the application of Poisson
distribution. The number of protons N can be modeled by the decay equation
𝑁 = 𝑁𝑜 𝑒 −𝜆𝑡 -------(1)
Review Questions
1. What is inferential statistics?
2. What is descriptive statistics?
3. What is Poisson distribution?
4. Give example for Poisson distribution?
5. What is the mean life of proton?
6. Give Decay equation for proton
BPHYS102/202 Module 5 Science &Humanities (Physics),CEC, Mangalore)
23
Lecture 6
Normal Distributions (Bell Curves), Monte Carlo Method: Determination of Value of
pi
Monte-Carlo Method
The Monte Carlo method is a statistical technique that allows for numerical solutions to
problems that may be difficult to solve analytically. It involves performing a large
number of random simulations to obtain numerical results. The name of the method
comes from the Monte Carlo Casino in Monaco where the games of chance (roulette,
dice, slot machines) exhibit random behavior.
The Monte Carlo method is used in a wide variety of fields, including physics,
engineering, statistics, and finance. It’s particularly useful for evaluating complex
systems with many variables, and for studying stochastic (random) processes.
Monte Carlo methods vary, but tend to follow a particular pattern:
1. Define a domain of possible inputs.
2. Generate inputs randomly from a probability distribution over the domain.
3. Perform a deterministic computation on the inputs.
4. Aggregate the results.
Determination of value of π.
Consider a quadrant of circle inscribed in a square with side length 1. The area of the
square is 1, and the area of the quarter-circle is π/4 (it is one quarter of a circle with radius
1). Therefore ratio of their areas is π/ 4.
In this procedure the domain of inputs is the square that circumscribes the quadrant. We
generate random inputs by scattering grains over the square then perform a computation
on each input (test whether it falls within the quadrant). Aggregating the results yields our
final result, the approximation of π.
Review Questions
1. Why normal distribution is also known as bell curve?
2. What is standard deviation?
3. Give examples for normal distribution?
4. What is Monte-Carlo method?
5. What are the pattern of Monte-Carlo method?
6. How to find the value of pi using Monte-Carlo method?
Module 5
Question Bank
1. Discuss timing in linear motion, uniform motion, slow in and slow out.
3. Illustrate the odd rule and odd rule multiplier with a suitable example.
6. Elucidate the importance of size and scale and weight and strength in animation.
7. Mention the general pattern of Monte-Carlo method and hence determine the
value of
8. Describe the calculation of push time and stop time with examples.
9. Discuss Poisson distribution and modelling the probability for proton decay.
10. Define the frame and show the importance of frame per second in animation.