0% found this document useful (0 votes)
965 views

Module 5_Physics of animation (1)

BPHYS102-BPHYS202JAN24
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
965 views

Module 5_Physics of animation (1)

BPHYS102-BPHYS202JAN24
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 58

Module 5

Application of Physics in
Computing

Physics of Animation
Physics of Animation
• Taxonomy of physics based animation
methods
• Frames, Frames per Second
• Size and Scale
• Weight and Strength
• Motion and Timing in Animations
• Constant Force and Acceleration
• The Odd rule,
• Odd-rule Scenarios
• Motion Graphs
• Examples of Character Animation:
• Jumping
• Parts of Jump
• Jump Magnification
• Stop Time
• Walking: Strides and Steps
• Walk Timing
Physics of Animation
• Animation: It is a technique of
making images to run in sequential
order at a certain rate to create the
illusion of playing an video .
• It is a technique of creating videos
based on illusion & creativity to make
the audience understand the
story/sequence/ topic of interest.
Taxonomy of Physics-based
animation methods

• Kinematics - Study of motion of object


without consideration the cause for motion.
Ex: velocity, acceleration, distance etc.

• Dynamics - Study of motion of object by


consideration the cause for motion ie,. mass
and forces are taken into consideration.
Ex: Newtons laws of motion, lows of
conservation of momentum and energy etc.
Sub Types
• Forward Motion: If an object knows only its
initial position but not the final position
during its movement. Such motion is called
Forward Motion. Ex: a ball thrown in free
space
• Backward or Reverse Motion: If an object
knows both its initial and final position during
its movement. Such motion is called Reverse
Motion. Ex: Motion of planets around the sun
Size and Scale
• The size and scale of characters play an
important role in animating a story.

• Scaling helps to fit the size on the display to


create the realist effect of different sizes of the
character.
• Some characters will be named based on their
body type/size, activities, abilities etc. (For
Ex: Cartoon characters like Mootu Patlu).
• We often equate large characters with weight
& strength (For Ex: Hulk) and smaller
characters with ability and speed (For Ex:
Character of Jerry in cartoon Tom & Jerry).
• Scale is defined as the ration of
animation size to the actual size. In
Animation, Scale is also represented in
pixels per unit length
𝐴𝑛𝑖𝑚𝑎𝑡𝑒𝑑 𝑆𝑖𝑧𝑒
𝑆𝑐𝑎𝑙𝑒 =
𝐴𝑐𝑡𝑢𝑎𝑙 𝑆𝑖𝑧𝑒

General Examples:
• Superman-height and bulging biceps
• Incredible Hulk-body types
• Monsters – Large and scary
• Antman - small in size,
• Fairies-small and beautiful
Weight and Strength
• Body weight is proportional to
volume.
• The abilities of muscles and bones,
however, increase by area because their
abilities depend more on cross-sectional
area than volume. Therefore increase a
muscle or bone’s strength, you need to
increase its cross sectional area.
• increase in volume of a character
increases the weight of the character in
animating video.
Frames & Frames per second (FPS)
Frames: A frame is a single image in a
sequence of pictures. A frame contains the
image to be displayed at a unique time in the
animation.
Frame per second: No. of frames displayed in
one second for smooth movement of effect is
called frame rate.
• In general, one second of a video is
comprised of 24 or 30 frames per second
also known as FPS.
• In India, we are using 24 FPS as a standard
whereas UK & European countries using 25
FPS and US using 30 FPS as standard.
Motion: Line Of Action & Path Of Action
line of action :It is a line along with the part of the character
body moves. Individual poses have a line of action, which
indicates the visual flow of action at that single image.
Generally line of action takes C, Reverse C and S shape in
animation to create more realistic effect.
Path of action :It is the path along which the object or
character moves. The path of action generally refers to the
object’s motion in space.
Timing & spacing
• Timing in animation refers to the duration taken to
complete the action.
• Timing tells how many frames has to be accommodated
from starting point to end point of an animated video for
better visual effect.
• Timing gives the perception of weight of the object ie.,
heavier object moves slowly and lighter object move faster
for better animated effect.
• Animators work with very small intervals of time; most
motion sequences can be measured in seconds or
fractions of seconds.
Fast Slow
Spacing: it is the distance an
object moves with in a defined time
for that action. It is also the
distance between the two frames in
an action.
Spacing decides the speed of action
ie., if more the spacing between the
frames, more will be the speed of
the character and spacing between
the frames is lesser for slow
movement of the character.
Linear motion
• Linear motion refers to motion in a straight line.
• An object moving with linear motion might speed
up, slow down or move with a constant speed but it
will follows a linear path.
• A heavy ball rolling on a table, a stone dropped
from certain height to ground are the examples
of linear motion.
Uniform motion
• It is a type of motion with constant velocity
and therefore no acceleration or deceleration.
• In uniform motion timing and spacing
between the frames remain same through out
the motion.
• ie., in uniform motion the distance between
the frames is the same through out the
period of motion.
• The longer the distance between frames, the
higher the speed (Timing).
• and shorter is the distance between frames,
the smaller will be the speed(Timing).
Non-uniform motion
• It is a type of motion with varying
velocity and therefore acceleration or
deceleration also varies with time.
• In non-uniform motion timing and
spacing between the frames changes
through out the motion.
• ie.,The distance between the frames
varies through out the period of motion.
• Based on the distance between the
frames and timing, non uniform motion
is classified into 3 types.
Different cases in non uniform
motion
Easy Ease: It is a motion where the character Start slowly than
becomes fast and finally stops slowly.
• Here the distance between the frames will increase gradually
and go for its maximum and then the distance decreases
slowly to its minimum

Easy Ease In (Slow in): It is a motion where the character


starts fast and stops slowly.
Here the distance between the frames decreases slowly to its
minimum.

Easy Ease Out (Slow out): It is a motion where starts slowly


and stops fast.
• Here the distance between the frames will increase gradually
to its maximum.
linear, Easy ease, Easy ease in
and Easy ease out cases of animation
The ODD rule
The
• The Odd Rule is a multiplying system in which the distance
Odd Rule
travelled between successive frame is obtained by multiplying
the base distance with odd numbers like 1,3,5,7……etc.,
during acceleration and by multiplying the base distance with
…….,7,5,3,1 etc., during deceleration motion.
• Base distance : the smallest distance travelled between two
frames in the sequence is called the base distance.
• For a slow-out motion it is the distance between the first two
frame.
• For a slow-in motion it is the distance between the last two
frames.
For a slow-out The distance between the first two frames is the base distance =1

Rocket speeding up using the Odd Rule.


For a slow-in motion The distance between the last two frames is the base distance
=1

Sled coming to a stop using the Odd Rule


Problems
1. Given the base distance 0.5 cm for the slow out.
Calculate the distance between the frames
a) #4 and #5
b) #1 and #7
Using odd rule multipliers

2. Given the base distance 1 cm for the slow in.


Calculate the distance between the frames
a) #2 and #3
b) #1 and #4
Using odd rule multipliers
3. While animating a speed up car, the
total distance travelled over 6 frames
is 25m. Calculate the base distance

4. A slowing in object in an animation


has a first frame distance 0.5m and
first slow in frame 0.35m. Calculate
the base distance and the number of
frames in sequence.
Character Animation : Jumping
A jump is an action where, the character’s
feet leave the ground at some time and the
entire body is in the air. A jump action
includes 4 steps:
• Crouch
• Takeoff
• In the air and
• Landing
Parts of Jump
• Crouch: A squatting pose taken as
preparation for jumping.
• Takeoff: Character pushes up fast and
straightens legs with feet still on the
ground.
The distance from the character’s center of
gravity (CG) in the crouch position to the CG
in the takeoff position is called the push
height.
The amount of time taken by a character to
reach from crouch position to takeoff
position is called the push time.
• In the air: Both the character’s feet are off the
ground, and the character’s moves in a parabolic
arc as any free-falling body. First it reaches its
maximum height called apex are in the air
position.
• Then the character falls back to the ground at
the same rate at which it rose.
• The distance from the character’s center of
gravity (CG) in the takeoff position to the CG in
the apex position is called the jump height.
• The amount of time taken by a character to
reach from takeoff position to apex position is
called the jump time.
• Landing: It is a pose where the character
touches the ground and bends knees to
return to a crouch position.
• The distance from the character’s center of
gravity (CG) in the take down position to the
CG in the landing position is called the stop
height.
• The amount of time taken by a character to
reach from take down position to landing
position is called the stop time.
• The stop height is not always exactly the
same as the push height.
Jump Magnification and
Acceleration
• Jump Magnification is an exact ratio that
tells how much the character has to
accelerate against gravity to get into
the air.

JM
Calculation Of Push Time And Stop Time

Push Height Stop Height


=
Push Time Stop Time

Push Height Stop Height


=
Push Frames Stop Frames

𝐏𝐮𝐬𝐡 𝐓𝐢𝐦𝐞 × 𝐒𝐭𝐨𝐩 𝐇𝐞𝐢𝐠𝐡𝐭


𝐒𝐭𝐨𝐩 𝐓𝐢𝐦𝐞 =
𝐏𝐮𝐬𝐡 𝐇𝐞𝐢𝐠𝐡𝐭

𝐏𝐮𝐬𝐡 𝐇𝐞𝐢𝐠𝐡𝐭 × 𝐒𝐭𝐨𝐩 𝐓𝐢𝐦𝐞


Push 𝐓𝐢𝐦𝐞 =
𝐒𝐭𝐨𝐩 𝐇𝐞𝐢𝐠𝐡𝐭
Walking
Walking consists of a series of poses
1. Passing: it is a pose in which One of the foot in contact with ground and
the other foot is lifted forward in air for movement.
2. Step: It is a pose where foot in air is about to contact with ground and foot
in ground is about to lift into air to continue movement.
3. Contact: Both the feet completed one step movement and are just enough
to make contact with ground.
4. Lift: The later foot now lifts in air to continue motion such that the former
step is in contact with ground.
Stride length and Step length
• A step is one step with one foot.
• A stride is two steps one with each foot.
• Step length: distance from the front position of one foot to the front
position of the other foot.
• Stride length: stride is the distance traveled by a character such
that each foot completes one step and stride length is twice the step
length.

• Gait is the timing of the motion for each step. It is the


sum of how long a foot in the ground and in the air.
• Normal walking: 2 steps per second
• Brisk walking: 4 steps per second
• Running: greater the 6 steps per second.
Problems on Jumping Action
Problem 1: In the case of Jump action, push height
is 0.5m and Jump magnification is 5. Calculate the
jump height and push acceleration. Given gravitation
acceleration = 10m/s2
Solution:
Given: Push height = 0.5m
Jump magnification = 5
Gravitation acceleration = 10m/s2
WKT,
𝐽𝑢𝑚𝑝 𝐻𝑒𝑖𝑔𝑕𝑡 (𝐽𝐻)
𝐽𝑢𝑚𝑝 𝑀𝑎𝑔𝑛𝑖𝑓𝑖𝑐𝑎𝑡𝑖𝑜𝑛 𝐽𝑀 =
𝑃𝑢𝑠𝑕 𝐻𝑒𝑖𝑔𝑕𝑡 (𝑃𝐻)
𝐽𝑢𝑚𝑝 𝐻𝑒𝑖𝑔𝑕𝑡 𝐽𝐻 = 𝐽𝑢𝑚𝑝 𝑀𝑎𝑔𝑛𝑖𝑓𝑖𝑐𝑎𝑡𝑖𝑜𝑛 𝐽𝑀 × 𝑃𝑢𝑠𝑕 𝐻𝑒𝑖𝑔𝑕𝑡 (𝑃𝐻)
Therefore, Jump Height (JH) = 5 x 0.5m = 2.5m

𝑃𝑢𝑠𝑕 𝐴𝑐𝑐𝑒𝑙𝑒𝑟𝑎𝑡𝑖𝑜𝑛
𝐽𝑢𝑚𝑝 𝑀𝑎𝑔𝑛𝑖𝑓𝑖𝑐𝑎𝑡𝑖𝑜𝑛 𝐽𝑀 =
𝐺𝑟𝑎𝑣𝑖𝑡𝑎𝑡𝑖𝑜𝑛 𝐴𝑐𝑐𝑒𝑙𝑒𝑟𝑎𝑡𝑖𝑜𝑛
𝑃𝑢𝑠𝑕 𝐴𝑐𝑐𝑒𝑙𝑒𝑟𝑎𝑡𝑖𝑜𝑛 = 𝐽𝑢𝑚𝑝 𝑀𝑎𝑔𝑛𝑖𝑓𝑖𝑐𝑎𝑡𝑖𝑜𝑛 × 𝐺𝑟𝑎𝑣𝑖𝑡𝑎𝑡𝑖𝑜𝑛 𝑎𝑐𝑐𝑒𝑙𝑒𝑟𝑎𝑡𝑖𝑜𝑛

Therefore, Push Acceleration = 5 x 10 m/s2 = 50 m/s2


Problem 2: In the case of Jump action, push time is 5
frames, push height is 0.4m and stop height is 0.5m.
Calculate stop time. Calculate push time and stop time in
second if the frame rate is 30fps.
Solution:
Given: Push height =0.4m,
Stop height =0.5m
Push time = 5 frames
Frame Rate = 30 frames per second (fps)

𝑃𝑢𝑠𝑕 𝑕𝑒𝑖𝑔𝑕𝑡 𝑆𝑡𝑜𝑝 𝑕𝑒𝑖𝑔𝑕𝑡


=
𝑃𝑢𝑠𝑕 𝑡𝑖𝑚𝑒 𝑆𝑡𝑜𝑝 𝑡𝑖𝑚𝑒

𝑃𝑢𝑠𝑕 𝑡𝑖𝑚𝑒 × 𝑆𝑡𝑜𝑝 𝑕𝑒𝑖𝑔𝑕𝑡


𝑆𝑡𝑜𝑝 𝑡𝑖𝑚𝑒 =
𝑃𝑢𝑠𝑕 𝑕𝑒𝑖𝑔𝑕𝑡

5 𝐹𝑟𝑎𝑚𝑒𝑠 × 0.5 𝑚
𝑆𝑡𝑜𝑝 𝑡𝑖𝑚𝑒 = = 6.3 𝐹𝑟𝑎𝑚𝑒𝑠 ≈ 6 𝐹𝑟𝑎𝑚𝑒𝑠
0.4 𝑚

𝟔 𝐅𝐫𝐚𝐦𝐞𝐬
Therefore, Stop time in second = = 0.2 second
𝟑𝟎 𝐟𝐩𝐬

𝟓 𝐅𝐫𝐚𝐦𝐞𝐬
Similarly, Push time in second = = 0.16 second
𝟑𝟎 𝐟𝐩𝐬
Questions from Model Paper
1. Elucidate the importance of size & scale and weight and
strength in animations. – 8 marks
2. Sketch and explain the motion graphs for linear, easy
ease, easy ease in and easy ease out cases of animation. –
8 marks
3. A slowing-in object in an animation has a first frame
distance 0.5m and the first slow in frame 0.35m. Calculate
the base distance and the number of frames in sequence.
– 5 marks
4. Discuss timing in Linear motion, Uniform motion, slow in
and slow out. – 8 marks
5. Illustrate the odd rule and odd rule multipliers with a
suitable example. – 6 marks
6. Describe Jumping and parts of jump. – 8 marks
7. Describe the calculation of Push Time and Stop Time with
Examples – 6 marks
Statistical Physics for Computing

• Descriptive Statistics
• Inferential Statistics
• Poisson Distribution
• Normal Distribution
• Monte Carlo Simulation Method
Statistical physics is a branch of physics that
evolved from a foundation of statistical
mechanics, which uses methods of
probability theory and statistics,
particularly the mathematical tools for dealing
with large populations and approximations, in
solving physical problems.

Descriptive statistics: The term “descriptive


statistics” refers to summarizing and
organizing the characteristics of a data set.
A data set is a collection of responses or
observations from a sample or entire
population
• Inferential Statistics is a method that
allows us to use information collected
from a sample to make decisions,
predictions, or inferences from a
population.
Methods of inferential statistics:
• Estimation of parameters
• Testing of hypothesis
Difference b/w Descriptive & Inferential Statistics

Sl No Descriptive Statistics Inferential Statistics

It gives information about raw data It makes inferences about the


1 which describes the data in some population using data drawn from
manner the population
It helps in organizing, analyzing,
It allows us to compare data, and
2 and to present data in a
make hypotheses and predictions.
meaningful manner.

It is used to explain the chance of


3 It is used to describe a situation
occurrence of an event

It explains already known data and


It attempts to reach the conclusion
4 is limited to a sample or population
about the population
having a small size.
It can be achieved with the help of
5 It can be achieved by probability
charts, graphs, tables, etc
Process is complex to do but we can
6 Process is simpler
decide a best sampling technique
7 Error involved is usually less Error involved is more
Poisson Distribution
• A Poisson distribution is a discrete probability distribution which gives the
probability of an event happening a certain number of times (k) within a given
interval of time or space.

• A Mathematical expression to find Poisson distribution of how many times an event


is likely to occur within an “x” period of time is given by

𝜆𝐾 𝑒 −𝜆
𝑃 𝑋=𝐾 =
𝐾!

Here k is the number of occurrences

λ is mean number of event


Problem 1: The number of particles emitted
randomly by a radio active sample obeys
Poisson distribution with λ =4.
Calculate P(x=0), P(x =1), P(x =2)

Solution:
Given : λ =4, K = 0,1,2
𝜆𝐾 𝑒 −𝜆
Formula: 𝑃 𝑋 = 𝐾 =
𝐾!
40 𝑒 −4
Therefore, 𝑃 𝑋 = 0 = = 0.0183
0!
41 𝑒 −4
𝑃 𝑋=1 = = 0.0732
1!
42 𝑒 −4
𝑃 𝑋=2 = = 0.1465
2!
Problem 2: At a place, volcanic eruption
occurs once in 100 years. Calculate the
probability at K = 0,1,2 assuming Poisson
Model.
Solution:
Given : λ =1, K = 0,1,2
𝜆𝐾 𝑒 −𝜆
Formula: 𝑃 𝑋 = 𝐾 =
𝐾!
10 𝑒 −1
Therefore, 𝑃 𝑋 = 0 = = 0.3678
0!
11 𝑒 −1
𝑃 𝑋=1 = = 0.3678
1!
12 𝑒 −1
𝑃 𝑋=2 = = 0.1839
2!
Modeling the Probability for Proton Decay
The probability of observing a proton decay can be estimated from the
nature of particle decay and the application of Poisson Statistics.
The number of protons N at time t in a radio active decay process can
be written according to decay equation as
𝑁(t) = 𝑁0 𝑒−𝜆𝑡 --------(1)
Where, 𝑁0 is the initial quantity of the element
λ is the radioactive decay constant
N(t) is quantity of the element after time t.
If the half life of proton is considered to
be 1033 years, then, the probability that
a proton will decay per year is given by
decay constant
0.693 0.693
𝜆= = ≈ 10−33 𝑦𝑒𝑎𝑟 −1
𝑇1/2 1033

Since, the decay constant is so small,


the exponential in (2) can be
approximated to 1-𝞴t.

Thus, 𝑁 = 𝑁𝑜𝑒−𝜆𝑡 = 𝑁𝑜 (1 − 𝜆𝑡) =𝑁𝑜 − 𝑁𝑜𝜆𝑡


• Proton decay has not been detected
experimentally till now probably because of
fact that the event is extremely rare.
• Assuming that λ = 3 observed decays per
year is mean, then the Poisson distribution
function tells us that the probability for
zero observations of decay is

𝜆𝐾 𝑒 −𝜆 30 𝑒 −3
𝑃 𝑋=𝐾 = = = 0.05
𝐾! 0!

This low probability for a null result suggests that the


proposed lifetime of 1033 years is too short.
Normal Distribution
• It is generally a bell shaped curve where the
top point of the curve represents the
most probable event out of all the series
data.
Characteristics: The Normal Curve is
1.Symmetrical - The symmetry about the ordinate
2.Unimodel - only one maximum point in the curve
3.Bilateral - The 50% area in left side and 50% of
the area lies to the right side
4.Matematical Model - This curve is used as a
measurement scale. The measurement unit of
this scale is ± 1σ (the unit standard deviation).
0 5 10 15 20 25 30
In normal distribution
68% of the data falls within one standard deviation of
the mean.
95% of the data falls within two standard deviations of
the mean.
99.7% of the data fall within three standard deviations
of the mean.
Monte-Carlo Method
• the Monte Carlo Method is also called
Monte Carlo Simulation or a multiple
probability simulation which is used to
analyze a big size data.

• It is a mathematical technique, which is


used to estimate the possible outcomes
of an uncertain event.
Steps involved in Monte Carlo
simulation are as follows
• Set up the predictive model, identifying both the
dependent variable to be predicted and the
independent variables that will drive the prediction.

• Specify probability distributions of the independent


variables.

• Run simulations repeatedly, generating random


values of the independent variables. Do this until
enough results are gathered to make up a
representative sample of the nearly infinite number of
possible combinations.
To determine the value of π using
Monte Carlo method
or
Estimation of Pi (π)

• Consider a circle with radius r and


imagine the circle is inscribed within a
square with side 2r (equal to the diameter
of circle)

• If we consider a random point inside the


square, the probability of this point is
inside the circle or inside a square.
• A simple way to compute this probability is to
find the ratio between the area of the circle and
area of square
𝐴𝑟𝑒𝑎 𝑜𝑓 𝐶𝑖𝑟𝑐𝑙𝑒 𝜋𝑟 2 𝜋
𝑃𝑟𝑜𝑏𝑎𝑏𝑖𝑙𝑖𝑡𝑦 = = =
𝐴𝑟𝑒𝑎 𝑜𝑓 𝑆𝑞𝑢𝑎𝑟𝑒 2𝑟 ×2𝑟 4

𝑃𝑟𝑜𝑏𝑎𝑏𝑖𝑙𝑖𝑡𝑦 =
𝑁𝑜 𝑜𝑓 𝑝𝑜𝑖𝑛𝑡𝑠 𝑔𝑒𝑛𝑒𝑟𝑎𝑡𝑒𝑑 𝑖𝑛𝑠𝑖𝑑𝑒 𝑡𝑕𝑒 𝑐𝑖𝑟𝑐𝑙𝑒 𝜋
=
𝑁𝑜 𝑜𝑓 𝑝𝑜𝑖𝑛𝑡𝑠 𝑔𝑒𝑛𝑒𝑟𝑎𝑡𝑒𝑑 𝑖𝑛𝑠𝑖𝑑𝑒 𝑡𝑕𝑒 𝑆𝑞𝑢𝑎𝑟𝑒 4

𝑵𝒐 𝒐𝒇 𝒑𝒐𝒊𝒏𝒕𝒔 𝒈𝒆𝒏𝒆𝒓𝒂𝒕𝒆𝒅 𝒊𝒏𝒔𝒊𝒅𝒆 𝒕𝒉𝒆 𝒄𝒊𝒓𝒄𝒍𝒆


Π =4x
𝑵𝒐 𝒐𝒇 𝒑𝒐𝒊𝒏𝒕𝒔 𝒈𝒆𝒏𝒆𝒓𝒂𝒕𝒆𝒅 𝒊𝒏𝒔𝒊𝒅𝒆 𝒕𝒉𝒆 𝑺𝒒𝒖𝒂𝒓𝒆
Monte Carlo simulation
1. Generate 2 random numbers between -1
and 1 in total 100 times (x and y).
2. Calculate x2 + y2.
– If the value is less than 1, the point will be
inside the circle
– If the value is greater than 1, the point will be
outside the circle.
3. Calculate the proportion of points inside the
circle and multiply it by four to approximate
the π value.
4. Repeat the experiment 1000 times, to get
different approximations to π
5. Calculate the average of the previous 1000
experiments to give a final value estimate.
Advantages of using Monte
Carlo method
1. Very useful mathematical technique
for analyzing the uncertain scenarios
2. Simple and easy to grasp
3. Various tools have embedded MC
simulation in different domains

You might also like