CS408 Animation Software Design

Sample Exam Questions

The following questions are provided as an aid to studying for the midterm exam in CS408. In general, these questions will NOT appear on the exam, but they are somewhat representative of the types of questions that will be asked. The marks for the questions indicate the number of marks such a question would be assigned if it appeared on a 50 minute exam marked out of 50 marks or a three-hour exam marked out of 180 marks.

Note: In the following questions, vectors are typically written horizontally with a superscripted “T” (indicating “transpose”) rather than vertically. You can use either form in your answers.

Some trigonometry formulas that may be of use:

Right angle triangles:

Sum of angles:

IGNORE QUESTIONS IN GREEN

IGNORE QUESTIONS IN GREEN

1. (10 marks) [Text, Section 1.1-1.2]

Define or explain the following terms:

(a) computer animation

(b) persistence of vision

(c) playback rate

(d) sampling rate

(e) thaumatrope

(f) zoetrope

(g) multiplane camera

(h) stop-motion animation

(i) squash and stretch

(j) slow in and slow out

2. (9 marks) [Text, Section 1.3]

Define or explain the following terms:

(a) sequence

(b) shot

(c) frame

(d) storyboard

(e) key frame

(f) inbetweening

(g) linear editing

(h) nonlinear editing

(i) rendering

3. (4 marks) [Text, Section 1.2 plus thinking]

Explain how the function of Disney’s multiplane camera could be simulated with computerized techniques.

4. (9 marks) [On-line notes]

One method of creating an animation is to write a program in a standard programming language and call graphics library functions as needed to create the animation. Describe three other methods of creating animations, giving an advantage and a disadvantage of each approach.

5. (10 marks) [On-line notes]

What is the gulf of evaluation? For an animation software package that you are familiar with, describe three features of the software that help bridge the gulf of evaluation, and explain why in each case.

6. (10 marks) [On-line notes]

What is the gulf of execution? For an animation software package that you are familiar with, describe three features of the software that help bridge the gulf of execution, and explain why in each case.

7. (4 marks) [On-line notes]

Give two examples of features an animation software package that you are familiar with that promote opportunistic behavior. Discuss their advantages and disadvantages.

8. (6 marks) Describe an interface to a particle system in an animation system that you are familiar with.

8A. (6 marks) Describe how you would use Maya (or similar animation system) to create a particle system representing blue bubbles emerging through a small hole in a wall. Mention at least 3 parameters that you would set.

8C. (6 marks) Describe how a rectangular solid with dimensions 4 x 5 x 10 can be created in Maya (or similar animation system), oriented at a 45 degree angle between the positive X and positive Y axis, with one end touching the origin.

8D. (6 marks) Describe how a sphere can be created using Maya (or similar animation system) and moved from location (0, 0, 0) to (10, 20, 30) over a period of 2 seconds at 30 frames per second.

9. (5 marks) Describe five types of manipulations that you can perform on a human figure in an animation system that you are familiar with.

10. (5 marks) List and briefly describe 5 of the 11 principles of animation.

PARTICLE SYSTEMS

58. (4 marks) List four types of phenomena that might be modeled in an animation using particle systems. Describe the particles used in each case.

59. (10 marks) Describe the basic model for a particle system and its five major components.

60. (4 marks) What is a stochastic process? Describe one use of a stochastic process in an animation system.

61. (4 marks) Identify four properties that particles might have in a particle system.

62. (20 marks) Using particles with velocity and three other properties, write pseudocode or a code segment to generate 2t particles at time step t. Have all four properties change in each time step. Use comments to describe how each property is changing.

63. (20 marks) Using code or pseudo-code write a function/constructor to initialize a particle system and another function to update it for the passing of time. The particle system should be initialized with a mean of 100 particles, uniformly distributed in the range 80 to 120 particles. The lifetimes of the particles should be a mean of 6 seconds, uniformly distributed in the range 4 to 8 seconds. The initial positions should be chosen randomly in the rectangular volume from (-100, -100, -100) to (100, 100, 100). The velocity of a particle should be initialized with a mean velocity of 10 units per second, uniformly distributed from 5 to 15 units per second. If a particle disappears, it should be replaced immediately with a new particle with random properties. Assume a random number generator function is available. Describe the range and type of values it returns.

Hint for exam preparation: see ParticleGenerator code on Notes website.

11A. (7 marks) What steps need to be done in order to read in a BMP file?

11B. (7 marks) What steps need to be done in order to read in a OBJ file?

12A. (5 marks) Discuss 5 issues related to timeline control? Use examples.

12B. Assuming the existence of a function GetTime() that gives the current time in milliseconds, give pseudocode showing how to control the display of images (frames) so that they are not shown too quickly and so that frames get dropped if they are running too slowly.

13. (15 marks) How is the 2D rotation matrix derived? Start from a point (x,y) that is rotated to give another point (x’,y’).

14. (4 marks)

Perform the following vector operations:

(a) [7 3]T + [9 5] T

(b) [7 3]T - [4 5] T

(c) [7 6 3]T - [4 5 11] T

(d) [3 2 3]T ● [4 5 1] T (dot product)

15. (4 marks)

Represent each of the following operations, including the results, on a Cartesian graph (normal x-y coordinates):

(a) [2 3]T + [1 2] T

(b) [3 2]T - [4 5] T

16. (4 marks) The cross product of two vectors U and V is computed using the following formula:

Compute the cross product for U = [2 3 0]T and V = [1 4 0]T. Show your work.

17. (6 marks) Tell whether or not the following curves have positional continuity (0 order), tangential continuity (1st order), and/or curvature continuity (2nd order). (6 marks)

18. (11 marks) Animation software packages typically offer the ability to store an animation in “native binary format.”

(a) (1 mark) What is “native binary format”?

(b) (10 marks) Suppose a 2-D animation system contained only rectangles, ovals, and curved paths as primitives. Explain in some detail from a programmer’s viewpoint how the state of an animation would be stored in native binary format and later reloaded. What information would be needed for each type of primitive object?

19. (10 marks) Suppose a 2-D animation system is based on behavioral animation. A particle system is one type of a behavioral animation subsystem. Give two other types of behavioral animation subsystems and explain how each would be stored in native binary format.

20. (5 marks) What is an animation language? Give the name of an animation language. Give several lines of code of a program written in a (real or hypothetical) animation language and explain what they mean with comments.

21. (2 marks) Give one advantage and one disadvantage of using an animation language as the principal interface to an animation system.

22. (2 marks) Given the following points, linearly interpolate a mid-point between them. Show your work.

a. (4,5) and (7, 8)

b. (10.3, 2.5) and (3.2, 5.4)

22B. Assuming a structure K has been constructed containing all information needed about key frames to allow intermediate frames to be calculated using linear interpolation. Assume there is only one object and it has m attributes (A0, A1, …, Am-1).

(a)(6 marks) Draw a diagram of the structure K and label/explain the parts.

(b)(10 marks) Give an algorithm for interpolating the values for all attributes at some frame f between frame 0 and frame F -1 (the last frame of the animation).

22C. For another question about key frame animation: do question 1 of assignment 3.

23. (3 marks)

Given the following points, draw the line(s) derived using uniform B-spline approximation, assuming the points are ordered from left to right.

24. (4 marks) Given the following equations, show how to derive the matrix for the uniform B-spline curve:

25. (4 marks) What four points are needed to draw a Hermite curve and why?

26. (10 marks) [not relevant for 2015-10]Describe how the Bezier matrix is derived.

27. (10 marks) [not relevant for 2015-10]In code or pseudocode, write the steps that would need to be taken to draw a Bezier curve given the beginning, end, and control points.

28. (2 marks) [not relevant for 2015-10]Why were Catmull-Rom (catrom) curves developed?

29. (6 Marks) Without looking at the functions themselves, can you tell which set of basis functions corresponds to Hermite curves, which corresponds to cubic Bezier curves, and which corresponds to cubic B-splines? How can you tell? (think about their corresponding matrices)

30. (4 marks) Discuss two different ways of computing arc length and explain why they were developed.

31. (10 marks) Given the following curve,

The (x, y) values for the graph shown above are (from left to right) (0, 5), (1, 6), (2, 3), (3, 2), (4, 1).

Here are some relevant formulas:

i = (int)(u/distance between entries)

L = ArcLength[i] + (GivenValue – Value[i])/(Value[i+1]-Value[i]) * (ArcLength[i+1] – ArcLength[i])

L = G(i) + (u – u(i))/(u(i+1)-u(i)) * (G(i+1) – G(i))

Use the forward differencing method to fill in the following table:

Index (i) / u(i) / Curve(u(i)) / Linear Segment Length / Arc Length
G
0 / 0.0 / (0.0, 5.0)
1 / 0.25 / (1.0, 6.0)
2 / 0.50 / (2.0, 3.0)
3 / 0.75 / (3.0, 2.0)
4 / 1.00 / (4.0, 1.0)

and linearly interpolate the arc length (L) at a given value of u = 0.60.

32. Repeat the previous question with u = 0.80.

33. (15 marks) Suppose the only objects in an animation system are a rectangle R and a curve C, where C is defined in terms of points P0, P1, …, Pm-1. Give pseudocode for moving the rectangle along the curve. State any assumptions.

33B (10 marks) Repeat question 33 assuming that the Rectangle should move at uniform speed along the curve (if you already assumed that then ignore this question).

34. (6 marks) When moving an object along a curve, how can the animation system control the speed of the object or make it constant?

35. (5 marks) Discuss the concepts of ease-in/ease-out and constant acceleration with reference to moving an object along a curve.

35B (8 marks) Repeat question 33B, assuming that the Rectangle should speed up for 1/3 of the time, travel at a uniform speed for one third of the time, and slow down for 1/3 of the time. The first and last thirds correspond to the sinusoidal ease function.

35C (8 marks) Repeat question 35B assuming the speed is described by a parabolic ease function, i.e., uniform increase in speed for 1/3 of the time, constant speed for 1/3 of the time, and uniform decrease in speed for 1/3 of the time.

36. (5 marks) How does the Frenet Frame work for an object following a path?

37. (5 marks) If a Frenet Frame is used for a camera following a curve, why might we not want the camera to point straight ahead? Describe two alternative points to aim and give an advantage of each.

38. (6 marks) Explain how you can smooth a path using the 2D curve defined with the points (1,4), (1,6), (2,7), (3,8), and (4,9). State any assumptions.

39. (15 marks) Given the following image,

warp the object using the formulas:

for k < 0

for k ≥ 0

with k = 1, n = 2, and vertex a as the seed vertex, assuming that vertex a is warped from location (3, 3) to location (3, 4). Show all calculations and re-draw the final image.

40. (18 marks) 2D Grid Deformation

Formulas:

Pu0 = (1 – u) ∙ P00 + u ∙ P10

Pu1 = (1 – u) ∙ P01 + u ∙ P11

Puv = (1 – v) ∙ Pu0 + v ∙ Pu1

Given vertex a in the global space,

and deformation the cell containing a, which is at [4.6 2.5]T,

[NOTE: connecting lines should be straight, but no time to re-draw figure]

and assuming that a translation to local space is not necessary, calculate a’s new position in the global space. Show all steps.

41. (6 marks)

Compare and contrast 2D grid deformation and Free-Form Deformation (FFD).

42.NEW QUESTION Consider the starting position of the following objects, and their desired end position and orientation as part of the pictured hierarchical model. You may make the following assumptions:

  • All objects are perfectly symmetrical.
  • Objects are defined with their point of rotation at the origin.
  • Objects are defined in their default neutral orientation relative to their parent limb.
  • No scaling of any object is required (all local models have the correct final sizes).

Starting Positions:

Hierarchical Object Tree:

Final Configuration of Object (picture may not be to scale):

(Hint imagine that the point half way along the top of object 0 is labelled (15, 18); sorry no time to change diagram now.)

Given this information, perform the following:

(a) determine all the transformations that are required for the object tree (specify the angle of rotation for R transformations and the 2D translation for T transformations).

(b) not required for 201510: construct all of the matrices that appear in the object tree

(c) show the multiplication of transformations that is needed to to transform the point (5.0, 2.2) on object 2.1 to world coordinates

(d) not required for 201510: use the appropriate matrices to calculate the transformation of the point (5.0, 2.2) on object 2.1 to world coordinates.

(Hint: for parts (a) and (b), you will need 9 transformations/matrices; for part (c) and (d) you will need (matrix) multiplication with the vector (5.0, 2.2) on the right hand side; for parts (c) and (d), (5.0, 2.2) is in the location coordinate system of object 2.1.

43-46. Need more questions on Hierarchical Kinematic Models

47. (15 marks) NEW QUESTION Use the cosine rule () to determine the joint angles needed to solve the following simple inverse kinematics problem. Be sure to check that the desired position is within reach first.

48-52. Need more questions on Inverse Kinematics

53. (5 marks)

Describe the update cycle an animated object goes through in rigid body simulation.

54. (10 marks)

Given a ball approaching a surface,

and a surface normal, N = [0, 1]T, with a dampening factor, k, of 0.7, use the kinematic method for rigid body simulation in animation to calculate the velocity of the ball leaving the surface.

A relevant formula:

54B. (6 marks) If at time t, a ball is about to collide with a smooth, flat surface at velocity v(t) = [0.3, -0.7]T and the normal vector of the surface is N = [0.0, 1.0]T, calculate the velocity of the ball at time t + 1 using the kinematic method. Use a dampening factor, k, of 0.8. A relevant formula is:

55. (6 marks) Given a ball approaching a surface,

with the mass of the ball being 1.5kg and a spring constant of 0.5, calculate the velocity of the ball leaving the surface using the penalty method.

Some formulas:

F = -kd

a = F/m

56. What process is involved in the impulse force method?

57 (6 marks) How can you tell whether a ball with radius r velocity v(t) at position p(t) will collide with a surface, such as the floor at Y = 0, during the time interval between time t and time t + 1? Include pseudocode or formulas in your answer.

64. (4 marks) What is emergent behavior? Describe one place in an animation system where emergent behavior might occur.

65. (5 marks) What are the two main tendencies in flock behavior? Describe a method for resolving conflicts between these two tendencies.

66. (5 marks) Explain local control versus global control with respect to modeling flock behavior. Give one advantage of each type of control.

67. (4 marks) Flocking behavior has been described as needing an O(n2) algorithm. Give an example of a phenomenon relevant to flocking that requires an O(n2) algorithm and explain why.

68. (10 marks) Using a 2D model, explain how a moving goose G with radius r1 can detect a potential collision with a stationary circular hive H of radius r2 if the goose’s current velocity is described by vector V. Assume goose G is currently at point P and the center of hive H is at point C. Use a diagram in your explanation.

69. (15 marks) Assuming a 2D model, use the formulas given below to determine whether a moving mosquito M with negligible radius can detect a potential collision with a stationary circular granary G of radius 4 if object M’s current velocity is described by vector V = [1, 3]T. Assume M is currently at point P = [1, 3]T and the center of object H is a point C = [7, 9]T. Show your work.

Here are some formulas relevant to flocking behavior:

70. (3 marks) Explain the issues related to splitting and rejoining when discussing flock behavior.

PLANTS

71. (8 marks) Given the following L-system, give the current string and draw the corresponding tree for each of the first 3 iterations.

Axiom: A

Rules: A  FF

F  F[+F][-F]F

Angle: 45

72. (10 marks) Given the following parametric L-system, show the current string for each of the first 5 iterations.

Axiom: A(3)B(1,2)

Rules: A(x): x<5  A(x+2)f+F

A(x): x>=5  F

B(x,y): y<=3  A(x+y)B(0, 2y)[-F]F

B(x,y): y>3  B(x+1, y-x)F[+F]

72B. Given the following L-system, give the current string and draw the corresponding tree for each of the first 2 iterations (not including the axiom). Hint for exam preparation: do not draw just the F. The first drawing is after one substitution.

Axiom: F

Rules: F F[+F]F-F

Angle: 30

72C. Give a bracketed L-system that will produce the three plants shown below in its first three iterations. The first two branches leave the trunk at a 30 angle from the trunk Hint for exam preparation: specify the axiom, the rule(s), and the angle. Hint for exam preparation: By default, assume the vocabulary includes at least F = forward while drawing, + = turn left, - = turn right, f = forward without drawing. Hint: write down a possible grammar and then draw the first two iterations.

72D. Given the following stochastic L-system, give the current string and draw the corresponding tree for each of the first 2 iterations (not including the axiom). Assume on the first iteration the first rule is always selected and on the second iteration the second rule is always selected.

Axiom: F

Rules: F0.5F[+F]F

F0.5 F[-F]F

Angle: 45

72E. Given the following timed L-system, give the current string for each of the first 10 iterations. Assume that only the F terminal symbol causes drawing to occur and that nonterminal symbols such as A, B, C, and D are simply skipped when drawing. Draw the first two different trees that appear and state which iteration they appear for.

Axiom: A

Rules: A B

B BC [t+3]

C -FD [t+2]

D +F [t+2]

Angle: 45

SIMULATING GASEOUS PHENOMENA

73. (6 marks) Identify and briefly describe the three main approaches used to model gas.

74. (10 marks) Explain how the grid-based method of animating gases works. Make sure to include a description of the circumstances under which the density of a cell is increased and decreased. How is the appearance of a cell determined?

74B (10 marks) Give code or pseudo-code to show how the outflow of gases works in a 2D grid-based animation model. Draw a diagram and mark it with the variables used for a typical cell of gases flowing to the maximum number of possible output cells.