Compute the position of the car on the road, Computer Graphics

Assignment Help:

An animation demonstrates a car driving along a road that is given by a Bezier curve along with the subsequent control points: 

Xk

0

5

40

50

Yk

0

40

5

15

The animation finals 10 seconds and the key frames are to be calculated at 1 second intervals. Compute the position of the car on the road at the beginning of the 6th second of the animation.

Solution: By using similar process in the previous exercise we can compute the blending functions as:

1.   B03 = 3!/(0! x (3-0)!) u0(1 - u)(3-0) = 1u0(1 - u)3 = (1 - u)3

2.   B13 = 3!/(1! x (3-1)!) u1(1 - u)(3-1) = 3u1(1 - u)2 = 3u(1 - u)2

3.   B23 = 3!/(2! x (3-2)!) u2(1 - u)(3-2) = 3u2(1 - u)1 = 3u2(1 - u)

4.   B33 = 3!/(3! x (3-3)!) u3(1 - u)(3-3) = 1u3(1 - u)0 = u3

The function x(u) is equivalent to x(u) =   ∑xkBk; here k=0,1,2,3

x(u)       = ∑ xkBk =  x0B03   +   x1B13 + x2B23 +  x2B33

=  (0)(1  -  u)3    +  5  [3u(1  -  u)2]  +  40  [3u2(1  -  u)]  +  50  u3

= 15u(1 - u)2 + 120u2(1 - u) + 50u3

As the same y(u) = y0B03 + y1B13+ y2B23+  y2B33

=  (0)(1  -  u)3    +  40  [3u(1  -  u)2]  +  5  [3u2(1  -  u)]  +  15  u3

= 120u(1 - u)2 + 15u2(1 - u) + 15u3

At the beginning of the sixth second of the animation, that is, when u=0.6, we can utilize these equations to work out such x(0.6) = 29.52 and y(0.6) = 16.92.

The way of the car looks like as:

887_Compute the position of the car on the road.png


Related Discussions:- Compute the position of the car on the road

Gourand shading, This renders a polygon surface by linearly interpolating i...

This renders a polygon surface by linearly interpolating intensity values across the surface. Intensity values for each polygon are matched with the values of adjacent polygon alon

Deffrent, deffrent between vecgen algorithm and bresenham line algorithm in...

deffrent between vecgen algorithm and bresenham line algorithm in computer graphic

Test for checking disjoint polygons by using of min-max test, Test For chec...

Test For checking Disjoint Polygons by using of Min-max Test Test 1: For checking disjoint polygons by using of Min-max test. Assume that you have two polygons as P1 and

Write a c code for generating concentric circles, Write a C code for genera...

Write a C code for generating concentric circles.  Put the circle function circleMidpoint()in a for loop  as follows: for( int radius = MinRadius; radius circleMidpoint(i

Video controller, Video controller : A Fixed area of the system memory co...

Video controller : A Fixed area of the system memory controller for the frame buffer, and the video controller is given direct access to the frame – buffer memory, frame – buffer

Achieve a perspective projection on the plane of unit cube, Achieve a persp...

Achieve a perspective projection on the z = 0 plane of the unit cube, demonstrated in Figure (l) from the cop at E (0, 0, 10) upon the z-axis. Figure: I 01:  currently c

Composite transformation, program to prove 2 consecutive rotation & scaling...

program to prove 2 consecutive rotation & scaling are additive in nature

Calculate the gray level value for all the pixels, An 8x8 image f[i,j] has ...

An 8x8 image f[i,j] has gray levels given by the following equation: f [i , j]= ? i-j ? ; i,j=0,1,2,3,4,5,6,7. a. Calculate the gray level value for all the pixels in the 8x8

Multiple channels, Multiple Channels: As the 1990s, movie theatres have up...

Multiple Channels: As the 1990s, movie theatres have upgraded their sound systems to surround sound systems which carry more than two channels. The most well liked illustrations a

Hardware for computer animation, Hardware For Computer Animation It co...

Hardware For Computer Animation It comes in many shapes, sizes and abilities. Much hardware is specialized to do only specific tasks. Other types of hardware do a variety of t

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd