You are on page 1of 15

Computer Graphics

SHREEYASH PRATISHTHAN’S
SHREEYASH POLYTECHNIC,CHH.SAMBHAJINAGAR
2023-24
Computer Graphics
On

“Rain Drop Animation And Observation ”

Submitted in partial fulfillment for ‘I’ Scheme 3rd semester of


Diploma in
COMPUTER ENGINEERING
By
1) Om Aghade

2) Anurag Band

3) Akash Bhamare

4 Om Chaudhari

Under the guidance of


Prof. P.S.Brahmane
In Pursuit of Excellence

Maharashtra State Board of Technical Education, Mumbai


1 (Autonomous) (ISO-9001-2008) (ISO/IEC 27001:2013)
Computer Graphics

Maharashtra State Board of


Technical Education, Mumbai

Certificate of Completion

This is to certify that Mr. Om .E. Aghade has successfully completed his/her Micro-Project entitled "
Rain Drop Animation And Observation " in the Course/Subject of " Computer Graphics “in the
Third semester during his/her tenure of completing the Diploma in Computer Engineering from
Shreeyash Polytechnic institute with institute code 1092.

Prof. P.S. Brahmane Prof. A.C. Naik


(Guide) (H.O.D)

Prof. S.S..Khandagale
(Principal)

2
Computer Graphics

Acknowledgement
It gives us immense pleasure to present the Micro-Project named “Rain Drop Animation
And Observation” as prescribed in the curriculum. It is a matter of great pleasure to our deep
sense of gratitude to Prof.S.S.Khandagale the Principal of Shreeyash
Polytechnic,Chh.Sambhajinagar, for his inspiration. We special thanks to Prof. P.S.Brahmane
for her encouragement.

We wish to express our profound thanks to Prof. P.S.Brahmane our guide for his
continuous support and guidance.

Yours Obediently

Om .E. Aghade
SY CO A1

ROLL NO: 02

3
Computer Graphics

INDEX
Sr. No Content Page No
1 Introduction 1
2 Rain Animation 2
3 Scheduled & Non-Scheduled Banks 3
4 Rain Drop Effect 4
5 Realistic Rain Animation 5
6 File:Realistic
7 Does Rain Melt Snow 11
8 Program 5
8 Output 5

4
Computer Graphics

Introduction
Clouds are made of water droplets. Within a cloud, water droplets
condense onto one another, causing the droplets to grow. When these water
droplets get too heavy to stay suspended in the cloud, they fall to Earth as
rain.This will guide you in making a realistic rain animation with Synfig. Be
sure to have a look at the gallery below to see videos exploiting this
technique from which this tutorial is born!
This tutorial is not "advanced" as in "difficult", but it requires that you
are familiar with the Synfig interface and tools, as these will not be covered
here. Start with the more basic tutorials and keep an eye on the Manual if
you are not familiar with terms such as "Blend Method" or "Group". The
duration of this tutorial is estimated between 30 and 50 minutes for an
average Synfig user.
Rain and snow are key elements in the Earth's water cycle, which is
vital to all life on Earth. Rainfall is the main way that the water in the skies
comes down to Earth, where it fills our lakes and rivers, recharges the
underground aquifers, and provides drinks to plants and animals.

❖ RAIN ANIMATION

Rain Animations tutorial will guide you in making a realistic rain


animation with Synfig.
Be sure to have a look at the gallery below to see videos exploiting this
technique from which this tutorial is born!

This tutorial is not "advanced" as in "difficult", but it requires that you are
familiar with the Synfig interface and tools, as these will not be covered
here. Start with the more basic tutorials and keep an eye on the Manual if
you are not familiar with terms such as "Blend Method" or "Group". The
duration of this tutorial is estimated between 30 and 50 minutes for an
average Synfig user.

For alternative set-ups, additional settings, variants and more, kindly refer
to the
The basic idea of the technique we'll be using is inspired from the tutorial
"Fire in Photoshop", by Eros:

5
Computer Graphics

A vertically moving background, filled with black & white clouds (i.e.:
noise). The light areas will become bright, yellow flames, and the dark ones
will become red-ish flames.
a fixed mask to darken the top of the fire, hence extinguishing the flames
(i.e: a black & white vertical gradient)
an orange color layer to turn on the heat
You can optionally download the File:Realistic rain tutorial.sifz, available
under Creative Commons (by nc sa).

❖ RAIN DROP EFFECT

A rain drop falls on Earth's surface with a constant velocity. The weight
of the falling drop is balanced by the sum of the buoyant force and the force
of friction ( or viscosity ) of air. Thus, the net force on the drop is zero, so it
moves with a constant velocity and hence, is in equilibrium.
Hail: frozen raindrops. Hail is a large frozen raindrop produced by intense
thunderstorms, where snow and rain can coexist in the central updraft. As
the snowflakes fall, liquid water freezes onto them forming ice pellets that
will continue to grow as more and more droplets are accumulated.
Sleet. Sleet is the name given to the precipitation of snow and water mixed
together.
If the temperature is below freezing, that is below 32 degrees Fahrenheit,
then it will not melt the snow. Instead, the rain will create a layer of ice on
top of the snow. If temperatures are above freezing, then the rain will melt
the snow because the water droplets will be warmer than the snowflakes

Hands in knitted mittens with a heart made of snow on a winter day

Near the end of winter, you might start to see rain showers instead of snow
showers.

This might make you wonder if the rain will finally melt the snow.

Considering that rain and snow are two sides of the same coin, it’s
understandable if you’re unsure.

Here’s what you need to know about whether or not rain melts snow.

6
Computer Graphics

• Does Rain Melt Snow

Melted cute snowman in puddle

Yes, rain does sometimes melt snow.

It depends on the temperature of the air at that moment.

For example, if the temperature remains above freezing that is above 32


degrees Fahrenheit then the rain will melt the snow.

If the temperature is below freezing that is below 32 degrees Fahrenheit


then it will not melt the snow.

Instead, the rain will create a layer of ice on top of the snow.

If temperatures are above freezing, then the rain will melt the snow because
the water droplets will be warmer than the snowflakes.

When the snow gets exposed to warm temperatures, it melts and turns from
a solid state into a liquid state.

Additionally, if the temperature is warm but gets colder, then the snow
might melt at first, but then refreeze into ice.

That’s why getting a rainstorm during winter can sometimes be dangerous.

It can make everything slick with ice.

Rain can melt snow but only when the temperature is above freezing

7
Computer Graphics

• How Does Rain Melt Snow

Snow and rain outside the


window

Rain melts snow in a few ways.

The first is that it brings a warmer temperature to the snow.

If the air is warm, then the rain is also going to be warmer.

That’s why rain during the summer feels warm versus rain during the winter
that feels cold.

Since its warm, it melts the snow by disrupting the ice crystals.

They lose their conformation and turn into water.

Another way that rain melts snow is that it gets into air pockets.

This is especially common in plowed snow.

When plows push snow to the curbs, you’re usually left with big mounds of
snow along the road.
Considering that rain and snow are two sides of the same coin, it’s
understandable if you’re unsure.

Here’s what you need to know about whether or not rain melts snow.

8
Computer Graphics

❖ RELISTIC RAIN ANIMATION


This tutorial will guide you in making a realistic rain animation with
Synfig. Be sure to have a look at the gallery below to see videos exploiting
this technique from which this tutorial is born!

This tutorial is not "advanced" as in "difficult", but it requires that you are
familiar with the Synfig interface and tools, as these will not be covered
here. Start with the more basic tutorials and keep an eye on the Manual if
You are not familiar with terms such as "Blend Method" or "Group". The
duration of this tutorial is estimated between 30 and 50 minutes for an
average Synfig user.

For alternative set-ups, additional settings, variants and more, kindly


refer to the talk page.

The basic idea of the technique we'll be using is inspired from the tutorial
"Fire in Photoshop", by Eros:

9
Computer Graphics

❖ FILE:REALISTIC
A vertically moving background, filled with black & white clouds
(i.e.: noise). The light areas will become bright, yellow flames, and the dark
ones will become red-ish flames.
a fixed mask to darken the top of the fire, hence extinguishing the flames
(i.e: a black & white vertical gradient)
an orange color layer to turn on the heat
You can optionally download the File:Realistic rain tutorial.sifz, available
under Creative Commons (by nc sa).
On top of crTestObject, add a new Noise Gradient Layer, name it gr-
nsSlowRain and set these values/parameters for a first kind of rain:

Amount to 0.4 [or less if you want clearer skies]


Blend Method to Staight
RandomNoise Seed to 123456789
Size to 0.5,17
Inperpolation to Spline
Super Sampling --> flag it
Now group the gr-nsSlowRain layer and name it enSlowRain and convert:

Origin to Linear
change then the Slope parameter that appear:

Slope to 0,-10
2. Well, now select the enSlowRain and duplicate it naming the new
encapsulation layer to enRain and its gradient layer inside gr-nsRain.

Change the parameters of the two layers as follow: For enRain

10
Computer Graphics

❖ SOURCE CODE

#include<conio.h>
#include<stdio.h>
#include<graphics.h>
void displayMan(int x,int y)
{
circle(x,y,10); //face
line(x,y+10,x,y+30); //neck
line(x,y+30,x-20,y+40); //left hand
line(x,y+30,x+20,y+40); //right hand
line(x+20,y+40,x+30,y+30);
line(x,y+30,x,y+70); //body
line(x+30,y+30,x+30,y-90); //umbrella
{
pieslice(x+30,y-30,0,180,55);
}
void drawCloud(int z,int y)
{
int r=50;
arc(z,y,45,135,r);
arc(z+50,y,45,135,r);
arc(z+100,y,45,135,r);
arc(z,y,135,225,r);
arc(z+50,y,135+90,225+90,r);
arc(z,y,135+90,225+90,r);
arc(z+100,y,135+90,225+90,r);
arc(z+100,y,315,45,r);
}
void main()
{
int gd=DETECT, gm,i,d=0,x=50,y=340,z=50,shouldMove=1;
int rx,ry;
initgraph(&gd,&gm,"C:\\TURBOC3\\BGI");
while(!kbhit())
{
cleardevice();
displayMan(x,340);

11
Computer Graphics

drawCloud(z,60);
line(0,430,639,430);
for(i=0;i<500;i++)

rx=rand()%639;
ry=rand()%439;
if(rx>=(x-40)&&rx<=(x+110))
if(ry>=(y-50)&&ry<=479)
continue;
line(rx-10,ry+10,rx,ry);
6
}
//legs
if(shouldMove)
{
if(d<20)
d+=4;
else
shouldMove=0;
line(x,y+70,x-d,y+90);
line(x,y+70,x+d,y+90);
}
else
{
if(d>0)
d-=4;
else
shouldMove=1;
line(x,y+70,x-d,y+90);
line(x,y+70,x+d,y+90);
}
delay(200);
x=(x+10)%639;
}
getch();
}

12
Computer Graphics

❖ OUTPUT

13
Computer Graphics

❖ CONCLUSION

In this micro project we studied about computer graphics to generate rain drop
animation. We spend our 5 days to complete this project. First we are selecting the
project and we choose this project because this project is unique and interesting.
In this project our group member starts to make source code. After 2 days of searching
and research we successfully write a code and we complete this project.
We use Google and other web sites to complete this project. There are many errors
are found in this source code so we use Google to resolve the errors.
Hence we complete this project with help of group member and guidance of our
subject teacher.

❖ Reference

• www.geeksforgeeks.org
• www.programiz.com
• www.W3School.com

14
Computer Graphics

15

You might also like