Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Computer Graphics and Virtual Reality
1. Explain morphing and warping mechanism. 10M
Answer:
Morphing:
1. Morphing is a way of smoothly transforming one shape to another shape.
2. Animator has to provide first and last images respectively.
3. Intermediate images are computed from source and destination images using
interpolation or some other mathematical formulas.
4. Main techniques for computing intermediate frames are mesh morphing and field
morphing.
5. Morphing is carried out in two steps cross dissolving and warping.
6. Cross dissolving: Cross dissolving changes the color of image at each pixel.
7. Warping: Warping is generally used to change the shape of object.
8. 2D morphing is suitable for online morphing.
9. 3D morphing is suitable for offline morphing.
Warping:
1. Image warping is the process of digitally manipulating an image such that any shapes
portrayed in the image have been significantly distorted.
2. Warping may be used for correcting image distortion as well as for creative purposes.
3. Warping maps one shape to another shape.
4. Warping distort the shape of source image and gradually converts it into destination
image.
5. The mesh warping algorithm relates features with non-uniform mesh in the source
and destination image.
6. The algorithm accepts a source image, a destination image and two 2D arrays of
coordinates.
7. The first array S, specifies the coordinates of control points in the source image.
8. The second array D, specifies their corresponding positions in the destination image.
2. 9. Both S and D must have the same dimensions in order to establish a one-to-one
correspondence.
10. Mesh warping:
Homogeneous coordinates. 5M
Answer:
1. System of coordinates that are used in projective geometry is called as
homogeneous coordinates.
2. The purpose of using homogeneous coordinates is to capture the concept of infinity.
3. The purpose is to show how we can use more general matrices than the ones
involved in the three basic functions (translate, scale and rotate) in OpenGL.
4. A coordinate system that algebraically treats all points in the projective plane equally
is known as homogeneous coordinate system.
5. Homogeneous coordinates are widely used in computer graphics.
6. In homogeneous coordinate system we can represent the point by three numbers
instead of two numbers.
7. Homogeneous coordinates representation system allows us to write all the geometric
transformation equations in matrix multiplication form.
8. Basic transformation operation matrix using homogeneous coordinate are,
a) Translation b) Rotation c) Scaling
9. Homogeneous coordinates for translation matrix:
4. Text clipping. 5M
Answer:
1. Text clipping is similar to line and polygon clipping.
2. Instead of clipping line and polygon it clips text.
3. Text clipping clips part of the text or entire text which is lies outside the window
boundary.
4. Text clipping is carried out in three ways: Various techniques are used to provide text
clipping in a computer graphics. It depends on the methods used to generate characters
and the requirements of a particular application.
a) All or none string clipping
b) All or none character clipping
c) Individual character clipping
5. Simplest way to carry out text clipping is all or none string clipping.
6. In text clipping, we compare the bounding box of string with boundaries of clipping
window.
7. Choice of text clipping technique depends on application and type of character
generation method.
8. All or none string clipping:
It clips entire text string even if only single character is outside the window boundary.
5. In all or none string clipping method, either we keep the entire string or we reject entire
string based on the clipping window. As shown in the above figure, STRING2 is entirely
inside the clipping window so we keep it and STRING1 being only partially inside the
window, we reject.
9. All or none character clipping:
It clips only those characters of strings which are not completely inside window.
This clipping method is based on characters rather than entire string. In this method if
the string is entirely inside the clipping window, then we keep it. If it is partially outside
the window, then one can reject only the portion of the string being outside
If the character is on the boundary of the clipping window, then we discard that entire
character and keep the rest string.
6. 10. Individual character clipping:
It clips the part of character which is outside clipping window.
This clipping method is based on characters rather than the entire string. In this method
if the string is entirely inside the clipping window, then we keep it. If it is partially outside
the window, then one can reject only the portion of string being outside.
If the character is on the boundary of the clipping window, then we discard only that
portion of character that is outside of the clipping window.
Various application of VR 5M
Answer:
Applications of virtual reality:
1. Arts and Entertainment:
i. Training and Entertainment are the driving force to virtual reality system.
ii. Many video games are designed using concept of virtual reality.
iii. Static art can be translated in dynamic art through virtual reality immersion and
interactivity.
iv. Use of virtual reality in art can lead to improvement of imagination and
consumption of art.
2. Education:
i. Images are better understood than speech or text, so virtual reality is useful in
educational field.
7. ii. Virtual reality provides immersive interactive environment for teaching learning
process.
iii. Virtual reality learning allows huge number of students to interact with each other
in 3D environment.
iv. Concepts can be easily explained with the help of simulations, diagrams,
animations etc created with Virtual reality tools.
3. Medicine and surgery:
i. Healthcare is one of the biggest adopter of Virtual reality system.
ii. Virtual reality technology helps to train doctors to improve their surgical skills.
iii. It allows healthcare professional to learn new things without creating any danger
to patient by carrying out experiments on virtual patient.
iv. Medical professional can take advantage of Virtual reality model technology to
understand the motion analysis, physical therapy and rehabilitation.
4. Military:
i. Military equipments are very expensive. Training a troop with actual equipments
would be very costly. Models are designed to train soldiers.
ii. Training soldiers for combat operation is very risky and costly, so virtual smart
weapons and remotely piloted vehicles are were developed.
iii. Person can be trained using virtual model of weapons any number of time.
iv. Such models are easily upgradable and they do not need to be transported.
5. Manufacturing and Architecture:
i. Another useful application area of Virtual reality is in architecture.
ii. User can feel as he is walking in an actual building and he can change the actual
design if he finds fault in virtual design.
iii. Architectural design can be combined with HMD’s, sound and 3D design.
iv. Appearance of 3D objects designed in CAD systems are given realistic look by
embedding texture, shadow and light sources into the scene.
Explain even odd method for inside test for polygon. 5M
1. Even odd method is used to determine whether a given point is inside a polygon or
outside a polygon.
2. In this technique, we will count the edge crossing along the line from any point (x,y) to
the infinity.
3. If the number of interactions is odd, then the point (x,y) is said to be an interior point
i.e. the point (x,y) is inside the polygon.
8. 4. If the number of interactions is even, then the point (x,y) is said to be an exterior point
i.e. the point (x,y) is outside the polygon.
5. Diagram:
6. Draw a line from point (x,y) intersecting all the edges of polygon as shown in figure.
7. From the above figure, we can see that from the point (x,y), the number of interaction
point on the left side is 5 and on the right side is 3.
8. From the both ends, the number of interaction point is odd, so the point (x,y) is
considered within the object.
9. In the above example, if the number of interaction point is even, then the point (x,y)
will be exterior point.
10. Even odd method is very simple.
Derive the DDA line drawing algorithm. Take suitable example and draw a
line between two points. 10M
DDA line drawing algorithm:
Digital differential analyzer (DDA) is simple line scan converting algorithm.
In this algorithm, horizontal or vertical displacement is set to unit interval and
corresponding displacement for other direction is calculated using slope.
Let’s consider that ∆x and ∆y are displacement in x and y direction respectively.
Value of x and y coordinates on k+1 location is given by,
New value = Old value + Displacement
9. 𝑥(𝑘+1) = 𝑥 𝑘 + ∆ 𝑥
𝑦(𝑘+1) = 𝑦 𝑘 + ∆ 𝑦
Slope of line is given by,
𝑚 =
∆𝑦
∆𝑥
=
𝑦2 − 𝑦1
𝑥2 − 𝑥1
Case-I: slope is less than 1 (|m|<1)
∆x=unit interval=1
𝑚 =
∆𝑦
∆𝑥
=
∆y
1
= ∆y
∆y=m
Coordinate value for next pixel is given as,
𝑥(𝑘+1) = 𝑥 𝑘 + ∆ 𝑥= 𝑥 𝑘 + 1
𝑦(𝑘+1) = 𝑦 𝑘 + ∆ 𝑦= 𝑦 𝑘 + 𝑚
Case-II: slope is greater than 1 (|M|>1)
∆y=unit interval=1
𝑚 =
∆𝑦
∆𝑥
=
1
∆x
∆x=1/m
Coordinate value for next pixel is given as,
𝑥(𝑘+1) = 𝑥 𝑘 + ∆ 𝑥= 𝑥 𝑘 +
1
𝑚
𝑦(𝑘+1) = 𝑦 𝑘 + ∆ 𝑦= 𝑦 𝑘 + 1
Case-III: slope is 1 (|m|=1)
∆x=∆y=1
𝑚 =
∆𝑦
∆𝑥
=
1
1
= 1
Coordinate value for next pixel is given as,
10. 𝑥(𝑘+1) = 𝑥 𝑘 + ∆ 𝑥= 𝑥 𝑘 + 1
𝑦(𝑘+1) = 𝑦 𝑘 + ∆ 𝑦= 𝑦 𝑘 + 1
In all above cases if line is processed from right to left, in that case value of x and y
decreases in every iteration.
So ∆x and ∆y are set to -1.
Algorithm:
Algorithm DDA_LINE(x1,y1,x2,y2)
dx←x2-x1
dy←y2-y1
x←x1
y←y1
m←dy/dx
if abs(m)<1 then
num_of_pixels←abs(dx)
else
num_of_pixels←abs(dy)
end
∆x←dx/num_of_pixels
∆y←dy/num_of_pixels
putPixel(x,y)
for x←x1 to x2 do
x←x+∆x
y←y+∆y
putPixel(x,Round(y))
end
11. Example:
A=(0,0) and B=(4,6)
1) initial to final
A(0,0) to B(4,6)
x1=0, y1=0, x2=4, y2=6
2) ∆x=|x2-x1|=4-0=4
∆y=|y2-y1|=6-0=6
3) ∆x≥∆y
Length=∆x else length=∆y
Length=∆y=6
4) calculate new ∆x and ∆y:
∆x=∆x/length=4/6=0.67
∆y=∆y/length=6/6=1
5) x=x1+0.5*sign(∆x)
=0+0.5*(1)
=0.5
y=y1+0.5*sign(∆y)
=0+0.5*(1)
=0.5
6) while(i≤6)
{
x=x+∆x
y=y+∆y
plot(x,y)
i=i+1;
13. Explain parallel and perspective projections. 5M
Parallel projection:
1. In this projection, the lines of projection are parallel to each other.
2. Center of projection is at infinite distance in parallel projection.
3. The projection of the vertex is the point of intersection in parallel projection.
4. Parallel projection preserves relative proportion of object.
5. Types of parallel projection:
i. Orthographic projection ii. Oblique projection
6. Diagram:
14. Perspective projection:
1. In this projection, the lines of projection are not parallel to each other.
2. In perspective projection center of projection is at finite distance.
3. Perspective projection produces realistic view but it does not preserve relative
proportion of object.
4. Depth information is preserved in this type of projection.
5. Types of perspective projection:
i. Single point projection
ii. Two point projection
iii. Three point projection
6. Diagram: