100% found this document useful (1 vote)
268 views

22 Scheme Physics For Cse Module 5 Notes

This document contains module notes on the physics of animation for a computer science course. It discusses key topics like the taxonomy of physics-based animation methods, important terminology used in animation like frames and frame rate, concepts of motion and timing in animations, and examples of character animation techniques. The notes provide foundations for understanding physics principles behind animation and simulation.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
268 views

22 Scheme Physics For Cse Module 5 Notes

This document contains module notes on the physics of animation for a computer science course. It discusses key topics like the taxonomy of physics-based animation methods, important terminology used in animation like frames and frame rate, concepts of motion and timing in animations, and examples of character animation techniques. The notes provide foundations for understanding physics principles behind animation and simulation.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 32

AMC ENGINEERING COLLEGE

DEPARTMENT OF PHYSICS

Module 5 Notes

Applications of Physics in Computing

I/II SEMESTER Physics for CSE Stream


Subject code: BPHYS102/202
This page was intentionally left blank.
Contents

1 Physics of Animation 5
1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.2 Taxonomy of Physics-based Animation Methods . . . . . . . . . . . . . . . . 5
1.3 Important Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.3.1 Frames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.3.2 Frame rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.3.3 Size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.3.4 Scale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.3.5 Strength and Weight . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.3.6 Proportions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.4 Motion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.4.1 Motion Lines and Paths . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.4.2 Motion Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.5 Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.5.1 Acceleration Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.5.2 Odd Rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.5.3 Worked Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
1.5.4 Odd Rule Scenarios . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.5.5 Worked Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
1.6 Examples of Character Animation . . . . . . . . . . . . . . . . . . . . . . . . 16
1.6.1 Jumping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
1.6.2 Worked Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
1.6.3 Walking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
1.7 Model and Previous Year Questions . . . . . . . . . . . . . . . . . . . . . . . 23
1.8 Numericals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

2 Statistical Physics for Computing 25


2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
2.2 Types of statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
2.2.1 Descriptive Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
2.2.2 Inferential Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
2.2.3 Descriptive vs. Inferential Statistics . . . . . . . . . . . . . . . . . . . 27
2.3 Poisson Distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
2.3.1 Worked Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
2.3.2 Modeling the probability for proton decay . . . . . . . . . . . . . . . . 29
2.4 Normal Distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
2.5 Monte Carlo Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
2.5.1 Determination of value of pi . . . . . . . . . . . . . . . . . . . . . . . . 31
2.6 Model and Previous Year Questions . . . . . . . . . . . . . . . . . . . . . . . 32

3
CONTENTS

2.7 Numericals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

Department of Physics 4 Physics for CSE Stream Notes


AMC Engineering College BPHYS102/202
Bengaluru-560083 Prof. Nithin Manju
Chapter 1

Physics of Animation

Syllabus
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. Numerical Problems.

1.1 Introduction
Animation is a technique that involves capturing consecutive images, whether they’re draw-
ings, models, or puppets, in a sequence to generate the perception of motion. Our eyes retain
an image for about a tenth of a second, and when multiple images are presented quickly one
after another, our brain merges them into a single fluid image. Thus, animation is essen-
tially the art of manipulating these still images at a high speed to fabricate the illusion of
movement.

1.2 Taxonomy of Physics-based Animation Methods


The field of physics-based animation and simulation is a fascinating area that can be broadly
divided into two main categories:

1. Kinematics: This involves the study of motion without taking into account the aspects
of mass or forces. It’s purely about the movement and the path that an object follows.

2. Dynamics: This is a more comprehensive study of motion, where both mass and forces
are taken into consideration. It’s not just about the movement, but also about the ’why’
behind it - what forces are causing the object to move and how does its mass affect this
motion.

Each of these categories can further be broken down into two subgroups:

ˆ Inverse: This involves studying motion when we know the starting and ending points,
but not necessarily the path or the forces involved. For instance, consider a robot arm.
We might know where the arm starts (the shoulder joint) and where we want it to end

5
1.3. IMPORTANT TERMINOLOGY

up (holding a cup). But we need to figure out how to get it there - what path should
it take, what forces need to be applied at the joints. This is where inverse kinematics
and dynamics come in, helping us compute the motion ”backwards”.

ˆ Forward: This is the study of motion when we only know the starting point and the
forces acting on the object. The goal here is to predict where these forces will move
the object. Going back to our robot arm example, we might know the starting position
of the arm and the forces being applied at the joints. Using forward kinematics and
dynamics, we can predict where the arm will end up.

These concepts form the foundation of physics-based animation and simulation, providing
the tools to create realistic and accurate movements in animated objects. As we delve deeper
into this field, we’ll explore these concepts in more detail and see how they’re applied in
various scenarios.

1.3 Important Terminology


1.3.1 Frames
Frames refers to the individual images that make up a sequence of animation. Each frame
is a still image, and when they are displayed in quick succession, they create the illusion
of movement. This is based on a characteristic of human vision known as persistence of
vision, which causes the eye and brain to retain images for a fraction of a second after they
disappear. When frames are shown at a fast enough rate, our brains blend them together
into a continuous moving image.

1.3.2 Frame rate


Frame rate, also known as frames per second (FPS), is the frequency at which these frames
are displayed. It is a crucial aspect of animation as it directly impacts the smoothness and
realism of the motion being depicted. A higher frame rate means more frames are displayed
per second, resulting in smoother and more fluid motion.
Common frame rates include 24 FPS (standard for film), 30 FPS (standard for TV), and
60 FPS (common in high-end video games). However, the choice of frame rate can depend
on various factors including the medium of animation, the desired visual effect, and technical
considerations.

1.3.3 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 dictate 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 boulder 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 animation to create visual interest or to emphasize certain
elements within a scene.

Department of Physics 6 Physics for CSE Stream Notes


AMC Engineering College BPHYS102/202
Bengaluru-560083 Prof. Nithin Manju
1.3. IMPORTANT TERMINOLOGY

1.3.4 Scale
Scale in animation refers to the relative size of different elements in a scene. 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. For example, forced perspective is a technique that
uses scale to make an object appear further away or closer than it actually is. This can
be used to create depth in a 2D animation or to exaggerate 3D space. Understanding and
manipulating scale is crucial in animation to create believable environments and to guide the
viewer’s focus.

1.3.5 Strength and Weight


Strength refers to the ability of a character or object to exert force or withstand pressure.
It’s a crucial aspect that can influence a character’s actions, interactions, and the overall
narrative of the story. For instance, a character with high strength might be able to lift
heavy objects, break through barriers, or overpower adversaries.
Weight in animation refers to the perceived heaviness of a character or object, which is
influenced by the force of gravity acting upon it. It affects how a character or object moves,
interacts with its environment, and even how it sounds. For example, a heavy character
might move more slowly, make louder footsteps, and have a harder time getting up if they
fall.

1.3.6 Proportions

(a) Cube with size doubled (b) Doubling or tripling area

Figure 1.1: Scaling

In the realm of animation, scaling a character isn’t as simple as uniformly adjusting its
size. This can be understood by considering a cube (see figure 1.1a). If you double the size
of a cube, its height increases by a factor of 2, its surface area (which scales with the square
of its size) increases by a factor of 4, and its volume (which scales with the cube of its size)
increases by a factor of 8. This principle holds true for any three-dimensional character or
object, regardless of its shape.
When you uniformly scale a character, certain aspects of its body will scale as area
(squares), while others will scale as volume (cubes). Body weight, for instance, is proportional
to volume. However, the strength of muscles and bones, which depends more on cross-
sectional area than volume, increases
√ by area. So to double a muscle’s strength, you
√ would
need to increase its width by 2. To triple the strength, multiply the width by 3. Refer
to figure 1.1b.
Since strength increases by squares and weight increases by cubes, the proportion of a
character’s weight that it can lift doesn’t scale proportionally with its size. For example,
consider a human man who is 6 feet tall, weighs 180 pounds, and can lift 90 pounds, or half

Department of Physics 7 Physics for CSE Stream Notes


AMC Engineering College BPHYS102/202
Bengaluru-560083 Prof. Nithin Manju
1.4. MOTION

his body weight. If you double his body size, his weight increases eight-fold, but he can only
lift four times more weight. Although he gains strength, he loses agility because he weighs
more than eight times his original weight.
If we triple the man’s size, he becomes 18 feet tall, weighs 27 times more, and can lift
9 times more weight than normal. However, he can now lift only about 17% of his body
weight, which is roughly the weight of one of his legs. If you want a man who’s three times
the normal height to be able to lift the same percentage of his body weight as a normal-sized
man, you would need to scale up his bones and muscles to be 27 times stronger. Since bones
and muscles scale in strength√by cross-sectional area, you would need to multiply the normal
muscle and bone widths by 27, or about five times. The result is a character with muscles
five times larger in a body three times the normal size.

1.4 Motion
In animation, motion refers to the change in position of an object or character over time. It’s
a fundamental aspect that brings life to static images. There are several types of motion in
animation:

1. Linear Motion: This is the simplest type of motion, where an object moves in a straight
line from one point to another.

2. Non-linear Motion: This involves motion along a curved path. It’s typically used for
more complex movements, such as a ball bouncing or a bird flying. The most common
types of non-linear motion are circular, parabolic, and wave.

3. Periodic Motion: This type of motion repeats in a cycle. Examples include a swinging
pendulum or a character walking or running.

4. Random Motion: This involves unpredictable movement, often used to simulate chaotic
scenes like leaves blowing in the wind or a crowd of people.

5. Rigid Body Motion: This involves the movement of solid objects that don’t deform
when they move. Examples include the movement of cars or other mechanical objects.

6. Deformable Body Motion: This involves objects that change shape as they move, such
as a character’s facial expressions or a flag waving in the wind.

1.4.1 Motion Lines and Paths

Figure 1.2: Line of Action Figure 1.3: Path of Action

Department of Physics 8 Physics for CSE Stream Notes


AMC Engineering College BPHYS102/202
Bengaluru-560083 Prof. Nithin Manju
1.4. MOTION

Each individual drawing or pose in an animation sequence has what’s known as a line of
action. This line serves as a visual guide to the flow of action within that particular frame
(see figure 1.2). On the other hand, the term path of action is used to describe the trajectory
along which an object or character moves throughout the animation sequence (see figure 1.3).
The path of action primarily illustrates the direction and route of the motion in space.
While it can provide some insight into the timing of the motion, its main purpose is not to
depict timing but rather to outline the course of the movement.

1.4.2 Motion Graphs

Figure 1.4: Motion Graph

Motion graphs are graphical representations of the movement of an object or character


over time. If you’re using animation software, understanding and using motion graphs is
a key skill in animating anything beyond the simplest of motions. If you’re drawing your
animation, drawing motion graphs before animating can help you visualize the motion.
On a motion graph, the time goes from left to right across the bottom of the graph, while
the object’s position is plotted vertically against time. Figure 1.4 illustrates a motion graph
of a ball falling from a height. The graph shows how the position of the ball changes over
time. The path of action is also indicated on the ball. Note that the curve in the graph does
not represent the physical path of the ball. It represent the ball’s motion through time. The
path of action is the actual path of the ball through space.
There are several types of motion graphs, including:

ˆ Position-Time Graphs: These show how the position of an object changes over time.
If the graph is a straight line, it indicates an object moving at constant speed. If the
graph curves, it indicates the object is accelerating; more the curve bends, more is the
acceleration. The slope of the graph at any point (accelerating or not) represents the
speed of the object at that moment; higher the slope, higher is the speed of the object.

ˆ Speed-Time Graphs: These show how the speed of an object changes over time. If the
graph is a straight line, it indicates an object moving at constant acceleration. The
slope of the graph at any point represents the acceleration of the object at that moment;
higher the slope, higher is the acceleration of the object.

ˆ Acceleration-Time Graphs: These show how the acceleration of an object changes over
time.

Department of Physics 9 Physics for CSE Stream Notes


AMC Engineering College BPHYS102/202
Bengaluru-560083 Prof. Nithin Manju
1.5. TIMING

(a) Linear Uniform Motion (b) Slow Out (c) Slow In

Figure 1.5: Types of motion

1.5 Timing
Timing in animation is a crucial aspect that determines when different frames are displayed
during an animation sequence. It controls the speed and rhythm of the motion, and can
greatly influence the perception of a character or object’s speed, weight, and personality.
Let’s delve into timing for different types of motion:

ˆ Linear Motion: This refers to motion in a straight line, always in the same direction.
An object moving with linear motion might speed up or slow down as it follows a linear
path. A heavy ball rolling on a table or incline is an example of linear motion. The
ball is rotating, but its center of gravity follows a linear path. See figure 1.5a.

ˆ Uniform Motion: This is a type of linear motion with constant speed and no acceleration
or deceleration. The distance the object moves between frames is the same over a period
of time. The longer the distance between frames, the higher the speed. Uniform motion
is the easiest to animate because the distance the object travels between frames is always
the same.

ˆ Acceleration: Acceleration refers to any increase in the speed or change in direction of


an object’s motion. In animation, acceleration is also called as slow-out or ease-out.
In terms of timing, slow-out usually involves gradually increasing the interval between
frames. This makes the object appear to move faster over time. 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. See figure 1.5b.

ˆ Deceleration: Deceleration is the opposite of acceleration - it involves a decrease in


speed or a change in direction that slows the object down. In animation, deceleration
is also called as slow-in or ease-in. The timing for slow-in typically involves gradually
decreasing the interval between frames, making the object appear to slow down. For
instance, a ball rolling up an incline is slowing in. See figure 1.5c.

1.5.1 Acceleration Timing


Timing for acceleration can be calculated very accurately when the net force being exerted
is constant. Let’s take a look at these forces and how you can use them to calculate the
animation’s timing.

Constant Forces
A constant force is a force that doesn’t vary over time. Examples of constant forces include:

ˆ Gravity pulling an object to the ground. See figure 1.6a.

Department of Physics 10 Physics for CSE Stream Notes


AMC Engineering College BPHYS102/202
Bengaluru-560083 Prof. Nithin Manju
1.5. TIMING

(a) Object falling due to gravity (b) Moving object facing friction

Figure 1.6: Examples of constant forces. Directions of net force (dotted arrow) and motion
(solid arrow) are shown.

ˆ Friction bringing an object to a stop. See figure 1.6b.

Forces Exerted by Characters


Forces exerted by people’s bodies are rarely constant throughout an entire motion. For the
purposes of animation, however, you can break the character motion into short time segments
and consider each of these segments to be responding to constant net force. This will make
it easier for you to calculate the timing for each individual segment. As an example, let’s
look at the push for a jump. The force a character exerts during the push is somewhat
constant, and the timing is very short (less than half a second). In such a case the timing
for a constant force is an excellent starting point, and in most cases will do the job as is. A
character walking and pushing a rock is not exerting a constant force throughout the entire
sequence, but during each short part of the walk cycle the net force could be considered to
be a diff erent constant value.

Constant Force and Acceleration


Constant forces result in constant acceleration (from Newton’s 2nd law). Because the accel-
eration is constant, we can figure out the timing for such sequences using a few principles of
physics. The resulting acceleration depends on the direction of the force and motion, if there
is any motion at all to begin with.

ˆ When constant net force is applied to an unmoving object, the result is acceleration.

ˆ When constant net force is applied to a moving object in the same direction as the
motion, the result is acceleration.

ˆ When constant net force is applied in the direction opposite the existing motion, the
result is deceleration.

Note that constant acceleration doesn’t mean constant speed. It’s quite the opposite!
Constant acceleration means the object is changing speed constantly.

1.5.2 Odd Rule


When acceleration is constant, you can use the Odd Rule to time your frames. With this
method, you calculate the distance the object moves between frames using a simple pattern

Department of Physics 11 Physics for CSE Stream Notes


AMC Engineering College BPHYS102/202
Bengaluru-560083 Prof. Nithin Manju
1.5. TIMING

of odd numbers. Between consecutive frames, the distance the object moves is a multiple of
an odd number.
For acceleration, the distance between frames increases by multiples of 1, 3, 5, 7, etc. See
figure 1.7.

Figure 1.7: Odd Rule for slow out

For deceleration, the multiples start at a higher odd number and decrease, for example
7, 5, 3, 1. See figure 1.8.

Figure 1.8: Odd Rule for slow in

The Odd Rule is a multiplying system based on the smallest distance traveled between
two frames in the sequence. For a slow-out, this is the distance between the first two frames;
for a slow-in, it’s the distance between the last two frames. This distance, the base distance,
is used in all Odd Rule calculations.

Odd Rule Multipliers

The Odd Rule in its simplest form, as described above, is just one way to use it. For example,
you can instead calculate the distance from the first frame to the current frame and use these
distances to place your object on specific frames.
If you add up all the consecutive frame multipliers up to a particular frame, you get the
multiple for the entire distance. For example, on frame 4, the consecutive multiples thus far
are 1, 3, and 5. If you add up these numbers you get 9, which is the multiplier for the entire
distance up to frame 4. So if x0 is the base distance,

Distance b/w first frame and this


Frame # Distance b/w consecutive frames
frame
1 n/a 0
2 1x0 1x0
3 3x0 4x0
4 5x0 9x0
5 7x0 16x0
6 9x0 25x0
7 11x0 36x0
8 13x0 49x0

Department of Physics 12 Physics for CSE Stream Notes


AMC Engineering College BPHYS102/202
Bengaluru-560083 Prof. Nithin Manju
1.5. TIMING

If you’re calculating the distance for a large number of frames and a chart like this isn’t
practical, you can figure out the odd number multiplier for consecutive frames with this
formula:

Odd number multiplier for consecutive frames = 2 × (frame # − 1) − 1

In the chart above, note that the distances in the last column are squared numbers:
4 = 22 , 9 = 32 , 16 = 42 , and so on. One of the benefits of the Odd Rule is you 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

When setting your frames, you can use either the consecutive frame multipliers or total
distance multipliers. Choose the one that’s easiest for you to use for your animated sequence.

1.5.3 Worked Examples

Q 1. Given the base distance 0.5 cm for slow out, calculate the distance between the frames
(a) #4 and #5, (b) #1 and #7 using odd rule multipliers.
Given:
x0 = 0.5 cm, and slow out animation
(a) odd number multiplier between frames #4 and #5 = 2 × (5 − 1) − 1 = 7
distance between frames #4 and #5 = 7 × x0 = 7 × 0.5 = 3.5 cm
(b) multiplier between frames #1 and #7 = (7 − 1)2 = 36
distance between frames #1 and #7 = 36 × x0 = 36 × 0.5 = 18 cm
(or)
We can draw a table to find out the distances. If the base distance x0 = 0.5 cm, then for
slow out

Distance b/w consecutive frames Distance b/w first frame and this
Frame #
(cm) frame (cm)
1 n/a 0
2 1x0 = 0.5 1x0 = 0.5
3 3x0 = 1.5 4x0 = 2.0
4 5x0 = 2.5 9x0 = 4.5
5 7x0 = 3.5 16x0 = 8.0
6 9x0 = 4.5 25x0 = 12.5
7 11x0 = 5.5 36x0 = 18.0

(a) distance between frames #4 and #5 = 3.5 cm


(b) distance between frames #1 and #7 = 18 cm
Q 2. Given the base distace 1 m for slow in, calculate the distance between the frames (a)
#2 and #3 (b) #1 and #4 using odd rule multipliers.

Department of Physics 13 Physics for CSE Stream Notes


AMC Engineering College BPHYS102/202
Bengaluru-560083 Prof. Nithin Manju
1.5. TIMING

Given:
x0 = 1 m, and slow in animation
For slow in, the total number of frames is required. Since it is not given explicitly, we
will take the highest frame number as the total number of frames, which in our case is 4.
The formulae we discussed previously are not applicable in the case of slow in. So we will
use a table to find the distances. If the base distance x0 = 1 m, then for slow in

Distance b/w consecutive frames Distance b/w last frame and this
Frame #
(m) frame (m)
4 n/a 0
3 1x0 = 1 1x0 = 1
2 3x0 = 3 4x0 = 4
1 5x0 = 5 9x0 = 9
(a) distance between frames #2 and #3 = 3 m
(b) distance between frames #1 and #4 = 9 m

1.5.4 Odd Rule Scenarios


Here are a few different scenarios for calculating the distance an object travels between frames
in a slow-in or slow-out.

Base Distance Known, Slow Out


If the object is speeding up, the first frame distance is the base distance. If you know the base
distance, figuring out the distance the object travels at each frame is pretty straightforward.
Just multiply the base distance by 3, 5, 7, etc. to get the distances between consecutive
frames, or use squares to multiply the base distance to get the total distance traveled on each
frame.

Base Distance Known, Slow In


Suppose you want an object to slow down, and you know the distance between the last two
frames before it stops. For slow-ins, the base distance is the distance between the last two
frames. The solution is to work backward, as if the object were speeding up in the opposite
direction. Working backward, multiply the base distance by 3, 5, 7, etc. to get the distances
between each previous frame in the sequence.

Total Distance and Number of Frames Known, Slow Out


If you know the total distance and the total number of frames, you can find the base distance
with this formula:
Total distance
Base distance =
(Last frame number − 1)2
Suppose you have an object moving with constant acceleration over 5 frames, and the
total distance traveled is 0.4 m. Using the formula above, we find the base distance.
0.4 m
Base distance =
(5 − 1)2
= 0.025 m

Department of Physics 14 Physics for CSE Stream Notes


AMC Engineering College BPHYS102/202
Bengaluru-560083 Prof. Nithin Manju
1.5. TIMING

Using the base distance, you can calculate the distances between each frame.

Frame # Consecutive frame multiplier Distance from previous frame


1 n/a 0
2 1 1 × 0.025 m = 0.025 m
3 3 3 × 0.025 m = 0.075 m
4 5 5 × 0.025 m = 0.125 m
5 7 7 × 0.025 m = 0.175 m

If you add up the distances traveled, you will find that they add up to exactly 0.4 m.

First Key Distance Known, Slow In

Suppose you have a moving object that you want to slow down, and you’ve set the first two
frames of the slow-in to give an idea of the pacing for the sequence. Note that you had one
frame already and now you add two more frames after that from where the slow in starts.
The first of these two new frames will be the first frame for the slow in but the second frame
for our calculations.

Figure 1.9: Example scenario

Suppose the distance between the original frame and the slow-in frame is 0.5 m and the
distance between the slow-in frame to the next frame is 0.35 m as shown in the figure 1.9
(this is also a known, important numerical). We will need to first find out the base distance
for this sequence (the distance between the last two frames since it is a slow-in). But we
don’t yet know how many frames will be part of this sequence. So we need to find out that
as well.
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, you can simply calculate:

0.5 m − 0.35 m
≈ 0.07 m
2

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 (rounding up to next integer, if
necessary).
0.5 m
≈7
0.07 m
This means the first distance corresponds to 7 in the 7, 5, 3, 1 sequence, making the
sequence four frames long (counting from the slow-in frame). Now you can work back the
other way, multiplying your base distance by odd numbers to get the distances for the rest
of the slow-in frames.

Department of Physics 15 Physics for CSE Stream Notes


AMC Engineering College BPHYS102/202
Bengaluru-560083 Prof. Nithin Manju
1.6. EXAMPLES OF CHARACTER ANIMATION

Frame # Consecutive frame multiplier Distance from previous frame


1 7 7 × 0.07 m ≈ 0.50 m
2 5 5 × 0.07 m = 0.35 m
3 3 3 × 0.07 m = 0.21 m
4 1 1 × 0.07 m = 0.07 m

Figure 1.10: Final result

1.5.5 Worked Examples

Q 1. While animating a speeding up car, the total distance travelled over 6 frames is 25 m.
Calculate the base distance.
Given:

Total frames = 6
Total distance = 25 m
Animation type: slow out

To find: Base distance x0 =?


We know that,
total distance 25
x0 = =
(total frames − 1)2 (6 − 1)2

x0 = 1 m

Q 2. A slowing-in object in an animation has a first frame distance 0.5 m and the first slow
in frame 0.35 m. Calculate the base distance and the number of frames in the sequence.
The solution to this question has already been discussed above.

1.6 Examples of Character Animation


1.6.1 Jumping
A jump is an action where the character’s entire body is in the air, and both the character’s
feet leave the ground at roughly the same time.

Parts of a jump
A jump can be divided into several distinct parts:

1. Crouch: A squatting pose taken as preparation for jumping. See figure 1.11a.

Department of Physics 16 Physics for CSE Stream Notes


AMC Engineering College BPHYS102/202
Bengaluru-560083 Prof. Nithin Manju
1.6. EXAMPLES OF CHARACTER ANIMATION

2. 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 to the CG when
the character’s feet are just about to leave the ground is called the push height (see
figure 1.11b). The amount of time (or number of frames) needed for the push is called
the push time.

3. In the air: Both the character’s feet are off the ground, and the character’s center of
gravity (CG) moves in a parabolic arc as any free-falling body would. First it reaches
an apex, and then falls back to the ground at the same rate at which it rose. The
height to which the character jumps, called the jump height, is measured from the CG
at takeoff to the CG at the apex of the jump (see figure 1.11c). The amount of time
the character is in the air from takeoff to apex is called the jump time. If the takeoff
pose and the landing pose are similar, then the jump height and jump time are about
the same going up as they are going down.

4. Landing: Character touches the ground and bends knees to return to a crouch. The
distance from the character’s CG when her feet hit to the ground to the point where the
character stops crouching is called the stop height (see figure 1.11d). The stop height
is not always exactly the same as the push height.

The path of action can be straight up in the air or over a horizontal distance. The latter
looks like as in figure 1.12.

Calculating jump actions


When working out the timing for a jump, you will need to first decide on the values for:

ˆ Jump height or jump time

ˆ Push height

ˆ Stop height

ˆ Horizontal distance the character will travel during the jump

ˆ Frame rate

From these factors, you can calculate the timing for the jump sequence.
When planning your jump animation, the most likely scenario is that you know the jump
height, expressed in the units you are using for your animation (e.g., inches or cm). Placement
and timing for frames while the character is in the air follow the same rules as any object
thrown into the air against gravity. The formula for calculating the time t the object takes
to cover a distance of h under gravity is given by:
s
2h
t=
g

where g is the acceleration due to gravity.


Suppose the jump height is 1.2 m. The time taken to cover this distance in the air (jump
time) is then s
2 × 1.2 m
Jump time = = 0.5 s
9.8 m/s2

Department of Physics 17 Physics for CSE Stream Notes


AMC Engineering College BPHYS102/202
Bengaluru-560083 Prof. Nithin Manju
1.6. EXAMPLES OF CHARACTER ANIMATION

(a) Crouch (b) Push Height

(c) Jump Height

(d) Stop Height

Figure 1.11: Parts of a Jump and the different heights

Figure 1.12: Path of action of a jump

Department of Physics 18 Physics for CSE Stream Notes


AMC Engineering College BPHYS102/202
Bengaluru-560083 Prof. Nithin Manju
1.6. EXAMPLES OF CHARACTER ANIMATION

We need to convert this to the number of frames required for the in-the-air sequence. To
do that, we multiply this with the frame rate for the sequence. Let’s take a frame rate of
30 fps for our example. So we have:

Jump frames = 30 × 0.5 = 15 frames

Note: It’s certainly possible for you to decide on the jump time first, and then use that
to figure out the jump height. In any case, before proceeding, you will need to have both
jump height and jump time in hand.

Jump Magnification
When calculating the remainder of the timing for the entire jump action (i.e., take-off and
landing), you can use a factor called jump magnification (JM). The JM can be used to
calculate the push timing and stop timing. The JM is the ratio of the jump height to the
push height.
Jump height
JM =
Push height
Since you already know the jump height and push height, you can calculate the JM. Then
you can use the JM to calculate other aspects of the jump.
For example, let’s say we take jump height = 1.2 m and push height = 0.3 m, then JM
will be
1.2 m
JM = =4
0.3 m
The JM, besides being the ratio of jump-to-push vertical height and time, is also the ratio
of push-to-jump vertical acceleration. Note that this is opposite the other ratios: while a
longer jump time means a shorter push time, a higher jump acceleration means a much, much
higher push acceleration. Knowing about this can help you make more informed decisions
about your push timing. To see how this works, let’s look at the formula for JM and relate
it to acceleration:
Jump height Jump time Push acceleration
JM = = =
Push height Push time Jump acceleration

The magnitude of jump acceleration is always equal to gravitational acceleration (or also
called acceleration due to gravity, g), with deceleration as the character rises and acceleration
as it falls.

Push Time
The JM also gives you the ratio of the jump time to the push time:

Jump time
JM =
Push time
So for our example, we can calculate the the push time by using

Jump time
Push time =
JM
0.5 s
=
4
= 0.125 s

Department of Physics 19 Physics for CSE Stream Notes


AMC Engineering College BPHYS102/202
Bengaluru-560083 Prof. Nithin Manju
1.6. EXAMPLES OF CHARACTER ANIMATION

Or in terms of frames, we have

Push frames = 30 × 0.125 ≈ 4 frames

During the push, the character accelerates upward from a zero velocity (in the crouch)
to a velocity sufficient to throw herself into the air. This means that we will need to use the
odd rule (constant acceleration) to decide the spacing for the frames.

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 in the sense that the CG moves the same distance per frame in the push
and stop. If the stop height is larger than the push height, you’ll just need more frames for
the stop than the push. This means that

Push height Stop height


=
Push frames Stop frames

This can also be expressed as

Push height Stop height


=
Push time Stop time
Push time
=⇒ Stop time = Stop height ×
Push height

For example, say, the stop height is 0.5 m and the other values are the same as before.
then the stop time will be
0.125 s
Stop time = 0.5 m ×
0.3 m
Stop time = 0.2 s

Converting this to frames, we get

Stop frames = 0.2 × 30 = 6 frames

During the landing, the character decelerates from the point-of-contact position to the
crouch position. This means that we will need to use the odd rule (constant deceleration) to
decide the spacing for the frames.

1.6.2 Worked Examples

Q 1. In a case of animating a jump the Push Height is 0.5 m and the JM is 5. Calulculate
the Jump Height and Push Acceleration. Given Gravitational Acceleration 10 ms−2
Given:

Push height = 0.5 m


JM = 5

To find:

Jump height = ?
Push acceleration = ?

Department of Physics 20 Physics for CSE Stream Notes


AMC Engineering College BPHYS102/202
Bengaluru-560083 Prof. Nithin Manju
1.6. EXAMPLES OF CHARACTER ANIMATION

First, we know that


Jump height
JM =
Push height
Jump height = JM × Push height = 5 × 0.5

Jump height = 2.5 m


Next, we know that
Push acceleration
JM =
Gravitational acceleration
Push acceleration = JM × Gravitational acceleration = 5 × 10

Push acceleration = 50 ms−2

Q 2. The jump animation is associated with a Push Time of 5 frames, Push Height 0.4 m
and Stop Height 0.5 m. Calculate the Stop time. Express the push time and stop time in
seconds if the animation is played at 30 fps.
Given:
Push time (in frames) = 5
Push height = 0.4 m
Stop height = 0.5 m
Frame rate = 30 fps
To find:
Stop time (in frames) = ?
Push time (in seconds) = ?
Stop time (in seconds) = ?
We know that
Push time (in frames)
Stop time (in frames) = Stop height ×
Push height
5
= 0.5 ×
0.4
Stop time (in frames) ≈ 6 frames
Then,
Stop time (in frames)
Stop time (in seconds) =
Frame rate
6
=
30
Stop time (in seconds) = 0.2 s
Finally,
Push time (in frames)
Push time (in seconds) =
Frame rate
5
=
30
Push time (in seconds) = 0.16 s

Department of Physics 21 Physics for CSE Stream Notes


AMC Engineering College BPHYS102/202
Bengaluru-560083 Prof. Nithin Manju
1.6. EXAMPLES OF CHARACTER ANIMATION

1.6.3 Walking
Walks feature all the basics of mechanics while including personality. The ability to animate
walk cycles is one of the most important skills a character animator needs to master.

Poses

Walking consists of a series of poses. The four basic poses for a single step are passing, step,
contact, and lift. In the passing pose, the free foot is passing by the opposite leg, and the
body is at its most upright. In the contact pose, the free foot has come forward just enough
to make contact with the ground. See figure 1.13. Passing and contact are the two that are
the most important to get right, as these poses include the most dynamic shifts for center of
gravity, limbs, and secondary motion.

Figure 1.13: Walk poses

Steps and strides

A step is one step with one foot. A stride is two


steps, one with each foot. Stride length is the distance
the character travels in a stride, measured from the
same part of the foot. Step and stride length indicate
lengthwise spacing for the feet during a walk. See
figure 1.14. Figure 1.14: Step and stride

Gait

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 as shown in figure 1.15.
In a normal walk, each foot is on the ground about 60% of the time. Both feet are on
the ground about 20% of the time. In the contact pose, both feet are in contact with the
ground. A normal walking gait ranges from 1/3 to 2/3 of a second per step, with 1/2 second
being average.

Department of Physics 22 Physics for CSE Stream Notes


AMC Engineering College BPHYS102/202
Bengaluru-560083 Prof. Nithin Manju
1.7. MODEL AND PREVIOUS YEAR QUESTIONS

Figure 1.15: Gait

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 center of
gravity (CG) slows in (decelerates) going from the contact to passing position, then slows
out (accelerates) 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.
To walk faster, you naturally increase both stride length and rate, and decrease the time
of double support. A fast walk has a stride rate of about 4 feet/sec. At 6 to 7 feet per second,
the movement transitions into a run.
Note: A slow walk played fast doesn’t look natural because it has a different rhythm than
a fast walk.

1.7 Model and Previous Year Questions

Q 1. Elucidate the importance of size and scale and weight and strength in animations.
Q 2. Discuss timing in Linear motion, Uniform motion, Slow in and Slow out.
Q 3. Discuss slow in and slow out with neat diagrams.
Q 4. Sketch and explain the motion graphs for linear, easy ease, easy ease in, and easy ease
out cases of animation.
Q 5. Illustrate the odd rule and odd rule multiplier with suitable example.
Q 6. Describe Jumping and parts of jumping in animation.

1.8 Numericals
The worked examples are the only standard numericals from this chapter.

Department of Physics 23 Physics for CSE Stream Notes


AMC Engineering College BPHYS102/202
Bengaluru-560083 Prof. Nithin Manju
This page was intentionally left blank.
Chapter 2

Statistical Physics for Computing

Syllabus
Statistical Physics for Computing
Descriptive statistics and inferential statistics, Poisson distribution and modeling the
probability of proton decay, Normal Distributions (Bell Curves), Monte Carlo Method:
Determination of Value of π. Numerical Problems.

2.1 Introduction
Statistical Physics for Computing is an interdisciplinary field that applies the principles of
statistical physics to computing. Statistical physics, which uses statistical methods to explain
the behavior of a large number of particles in a system, can be used to solve complex problems
in computing. This includes areas such as optimization, machine learning, and data analysis.
The approach is particularly useful for dealing with systems that involve a large number of
interacting components, randomness, or uncertainty.

2.2 Types of statistics


2.2.1 Descriptive Statistics
Descriptive statistics is a branch of statistics that summarizes, organizes, and presents data
in a meaningful way. It involves measures of central tendency, measures of variability, and
graphical representations.
Descriptive statistics can provide a quick overview of the data’s main features, such as
the overall frequency of each activity (distribution), the averages for each activity (central
tendency), and the spread of responses for each activity (variability). Descriptive statistics
are used to describe or summarize data, and there is no uncertainty as it deals with actual
data.
The main components of descriptive statistics are as follows:

Measures of Central Tendency


These provide a summary statistic that represents the center point or typical value of a
dataset. The most common measures of central tendency are:
ˆ Mean (average): The sum of all data points divided by the number of data points. For
example, the mean of 2, 3, and 4 is (2+3+4)/3 = 3.

25
2.2. TYPES OF STATISTICS

ˆ Median (middle value): The middle value when all data points are arranged in order.
For example, the median of 2, 3, and 4 is 3.

ˆ Mode (most frequent value): The value that appears most frequently in a data set. For
example, the mode of 2, 3, 3, and 4 is 3. Note that the mode is most often used for
non-numerical data.

Measures of Dispersion or Variability


These provide a summary statistic that represents the spread of values in a dataset. Common
measures of dispersion include:

ˆ Range: The difference between the highest and lowest values. For example, the range
of 2, 3, and 4 is 4-2 = 2.

ˆ Variance: The average of the squared differences from the mean. For example, the
variance of 2, 3, and 4 is ((2 − 3)2 + (3 − 3)2 + (4 − 3)2 )/3 = 2/3.

ˆ Standard Deviation: Thepsquare root of the variance. For example, the standard
deviation of 2, 3, and 4 is 2/3 ≈ 0.816.

ˆ Interquartile Range (IQR): The difference between the upper quartile (75th percentile)
and the lower quartile (25th percentile).

Graphical Representations
Data can be visually represented using various methods like bar graphs, histograms, pie
charts, box plots, and scatter plots. These visuals provide a clear, intuitive way to understand
the data.

Measures of Association
These measures provide insight into the relationships between variables in the dataset, such
as correlation and covariance.

2.2.2 Inferential Statistics


Inferential statistics is a branch of statistics that makes predictions or inferences about a
population based on a sample of data. It uses various analytical tests and tools to make
generalizations about a population.
Inferential statistics have two main uses: making estimates about populations using just
a sample of the population and testing hypotheses to draw conclusions about the population.
With inferential statistics, it’s important to use random and unbiased sampling methods.
If your sample isn’t representative of your population, then you can’t make valid statistical
inferences or generalize.
The main components of inferential statistics are as follows:

Hypothesis Testing
This is a method for testing a claim or hypothesis about a parameter in a population, using
data measured in a sample. For example, you might want to test the claim that the mean
age of all people in your city is 35 years.

Department of Physics 26 Physics for CSE Stream Notes


AMC Engineering College BPHYS102/202
Bengaluru-560083 Prof. Nithin Manju
2.3. POISSON DISTRIBUTION

Confidence Intervals
These are a range of values, derived from a data set, which is likely to contain the value
of an unknown population parameter. For example, a confidence interval might be used to
estimate the likely voter support for a political candidate in an upcoming election.

Regression Analysis
This is a statistical process for estimating the relationships among variables. For example,
it can be used to understand the relationship between advertising expenditure and sales
revenue.

2.2.3 Descriptive vs. Inferential Statistics

Criteria Descriptive Statistics Inferential Statistics


Makes predictions or inferences
Summarizes and organizes data
Objective about a population based on a
for easy understanding.
sample of data.
Works with a random sample
Works with the complete
Data Usage drawn from the entire
dataset.
population.
Uses measures of central Uses probability theory,
tendency, measures of hypothesis testing, confidence
Methods
variability, and graphical intervals, regression analysis,
representations. etc.
Uncertainty exists as it makes
No uncertainty as it deals with
Uncertainty predictions about a population
actual data.
based on a sample.
Aims to make predictions or
Aims to describe or summarize
Aim generalizations about a
data.
population based on a sample.

2.3 Poisson Distribution


The Poisson Distribution is a discrete probability distribution that expresses the probability
of a given number of events occurring in a fixed interval of time or space. These events occur
with a known constant mean rate and are independent of the time since the last event. The
Poisson distribution is often used to model the number of times an event occurs within a set
period of time or space.
The formula for the Poisson distribution function is given as:

e−m mk
P (X = k) =
k!
where X is a Poisson random variable which can take values of k = 0, 1, 2, . . . and m is a
known average rate of the event happening over some time interval. Note that the mean and
the variance of a Poisson distribution are both equal to m.

Department of Physics 27 Physics for CSE Stream Notes


AMC Engineering College BPHYS102/202
Bengaluru-560083 Prof. Nithin Manju
2.3. POISSON DISTRIBUTION

Note that in other textbooks or in exams, the average rate m is alternatively


denoted by λ.
The Poisson distribution is mostly used when the m parameter is small, i.e., the proba-
bility of a single event happening is small.
Let’s consider an example: Suppose a call center receives an average of 12 calls per hour.
This is a situation that can be modeled with a Poisson distribution. Here, m = 12 calls per
hour. If we want to find the probability of receiving exactly 15 calls in an hour, we can use
the Poisson distribution formula:

e−12 × 1215
P (X = 15) = = 0.0723
15!
This means the probability of exactly 15 calls occurring in a given hour at this call center
is 7.23%.

2.3.1 Worked Examples

Q 1. The number of particles emitted per second by a random radioactive source has a
poisson distribution with λ = 4. Calculate the probabilities P (X = 0), P (X = 1), P (X = 2).
Given:
λ=4
To find:
P (X = 0) =?
P (X = 1) =?
P (X = 2) =?
We know that
e−λ λk
P (X = k) =
k!
For k = 0, we have
e−4 40
P (X = 0) = = 0.018
0!
For k = 1, we have
e−4 41
P (X = 1) = = 0.073
1!
For k = 2, we have
e−4 42
P (X = 2) = = 0.146
2!
Q 2. On a particular place, volcanic erruption occurs once every 100 years on average.
Calculate the probability of k = 0, 1, and 2 volcanic erruption in a 100 year interval, assuming
the Poisson model is appropriate.
Given:
m = 1 (‘once’ every 100 years)
To find:
P (X = 0) =?
P (X = 1) =?
P (X = 2) =?

Department of Physics 28 Physics for CSE Stream Notes


AMC Engineering College BPHYS102/202
Bengaluru-560083 Prof. Nithin Manju
2.3. POISSON DISTRIBUTION

We know that
e−m mk
P (X = k) =
k!
For k = 0, we have
e−1 10
P (X = 0) = = 0.367
0!
For k = 1, we have
e−1 11
P (X = 1) = = 0.367
1!
For k = 2, we have
e−1 12
P (X = 2) = = 0.183
2!

2.3.2 Modeling the probability for proton decay


The Poisson distribution can be applied to model the probability for proton decay. Proton
decay is a hypothetical form of radioactive decay in which the proton decays into lighter
subatomic particles. The experimental search for proton decay has significant implications
for grand unification theories.
The lower bound for the lifetime (τ ) of a proton is currently projected to be on the order
of 1033 years. The aim is to test whether this number is accurate or not.
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 present at some
time t in a decay process can be modeled by the decay equation

N = N0 e−λt
where N0 is the initial number of protons, λ = 1/τ = 10−33 year−1 , called the decay constant,
is the probability that any given proton will decay in a year.
In the case of a proton, since the decay constant λ is extremely small, the exponential
e−λt can be replaced by the first two terms of its Taylor series expansion:

e−λt ≈ 1 − λt

So the decay equation can now be written as:

N = N0 (1 − λt) ≈ N0 − N0 λt

To get the number of protons that have decayed after some time, we can rearrange the
above to get
N0 − N = N0 λt
For a small sample, the observation of a proton decay is infinitesmal. But suppose we
consider the volume of protons present in the Super Kameokande neutrino detector in Japan.
The number of protons in the detector volume is reported to be N0 = 7.5 × 1033 protons. For
t = 1 year of observation, the number of expected proton decays is then

N0 − N = 7.5 × 1033 × 10−33 × 1


N0 − N = 7.5 protons

About 40% of the area around the detector tank is covered by photodetector tubes, and
if we take that to be the nominal efficiency of detection, we expect about 7.5 × 0.4 = 3
observations of proton decay events per year based on a 1033 year lifetime.

Department of Physics 29 Physics for CSE Stream Notes


AMC Engineering College BPHYS102/202
Bengaluru-560083 Prof. Nithin Manju
2.4. NORMAL DISTRIBUTION

But so far, experimentally, no convincing proton decay events have been observed. Pois-
son distribution provides a convenient means for assessing the implications of the absence of
these observations. If we presume that m = 3 observed decays per year is the mean (which
we have calculated above), then the Poisson distribution function tells us that the probability
for zero observations of a decay (k = 0) is
e−3 × 30
P (X = 0) = = 0.05
0!
The Poisson distribution is suggesting that there is only a 5% probability of no decay
happening in a year, which means there would be a 95% probability of some decay happening.
But experimentally, we have seen no decays yet. So this suggests that the proposed
lifetime of 1033 years is too short.
While this is not a realistic assessment of the probability of observations because there
are a number of possible pathways for decay, it serves to illustrate in principle how even a
non-observation can be used to refine a proposed lifetime.

2.4 Normal Distribution


The normal distribution, also known as the Gaussian distribution or the bell curve (named
because of the shape of the distribution, see figure 2.1), is a type of continuous probability
distribution for a real-valued random variable. It is one of the most important and widely
used statistical distributions in various fields such as natural and social sciences.

Figure 2.1: Normal distribution

The normal distribution is characterized by two parameters: the mean (µ) and the stan-
dard deviation (σ). The mean indicates where the bell curve is centered, and the standard
deviation determines the width of the bell curve.
Here’s the probability density function of a normal distribution:
1 (x−µ)2
P (X = x) = √ e− 2σ2
2πσ 2
where x is an outcome from the random variable X, µ is the mean of the distribution, σ is
the standard deviation of the distribution.

Department of Physics 30 Physics for CSE Stream Notes


AMC Engineering College BPHYS102/202
Bengaluru-560083 Prof. Nithin Manju
2.5. MONTE CARLO METHOD

Figure 2.2: Monte Carlo method for determining the value of π

The key properties of a normal distribution are:


1. Symmetry: A normal distribution is symmetric about the mean. This means that the
left and right halves of the distribution are mirror images of each other.
2. Mean, Median, Mode: In a normal distribution, the mean, median, and mode are all
equal and are located at the center of the distribution.
3. Empirical Rule: Approximately 68% of the data falls within one standard deviation
of the mean, 95% falls within two standard deviations, and 99.7% falls within three
standard deviations. This is often referred to as the ”68-95-99.7” rule.
4. Asymptotic: The tails of a normal distribution extend to infinity in both directions,
but they get closer and closer to the horizontal axis and theoretically never touch it.
5. Non-zero Everywhere: A normal distribution is non-zero everywhere on the real line.
The normal distribution is widely used because of the central limit theorem, which states
that the sum of many independent and identically distributed random variables tends toward
a normal distribution, even if the original variables themselves are not normally distributed.

2.5 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.

2.5.1 Determination of value of pi


One classic use of the Monte Carlo method is estimating the value of π. The following is a
step-by-step process on how you can do this:

Department of Physics 31 Physics for CSE Stream Notes


AMC Engineering College BPHYS102/202
Bengaluru-560083 Prof. Nithin Manju
2.6. MODEL AND PREVIOUS YEAR QUESTIONS

1. Create a square and a circle: Draw a square with side length 1, and inscribe a circle
within it with radius 1/2 as shown in figure 2.2. The exact value of π is defined as the
ratio of the circumference of the circle to its diameter, but we’re going to use the ratio
of the areas of the circle and the square.
2. Random Points: Generate a large number of random points of the form (x, y) within
the square using a random number generator. The coordinates of these points will be
between 0 and 1 for both the x and y axes.
3. Count the points: Determine the number of points that fall within the circle.
4. Estimate π: The ratio of the points inside the circle to the total number of points
generated will approximately equal the ratio of the areas of the circle and the square,
i.e.,
Points in circle Area of circle

Total points Area of square
But,
Area of circle π(1/2)2 π
= =
Area of square 12 4
So,
Points in circle π
=
Total points 4

Points in circle
=⇒ π = 4 ×
Total points
Remember, the Monte Carlo method provides an approximation, not an exact result.
The accuracy improves as the number of simulations or random samples increases. Figure
2.3 demonstrates this, where the values have been simulated using Python code.

Figure 2.3: Estimates of π for different sample sizes

2.6 Model and Previous Year Questions


Q 1. Distinguish between descriptive and inferential statistics.
Q 2. Discuss modeling the probability for proton decay.
Q 3. Discuss salient features of Normal distribution using Bell curves.
Q 4. Explain Poisson distribution and probability mass function with example.
Q 5. Write a note on Monte-Carlo method and discuss the determination of the value of π
using Monte-Carlo method.

2.7 Numericals
The worked examples are the only standard numericals from this chapter.

Department of Physics 32 Physics for CSE Stream Notes


AMC Engineering College BPHYS102/202
Bengaluru-560083 Prof. Nithin Manju

You might also like