2. The following pseudo-code represents the pattern adjustment process of the Plushie system.
Pseudo-code
1
2
3
4
5
6
7
B
9
10
11
12
13
14
15
16
while(true){
}
apply simulation (mesh);
foreach(vertex v in mesh seam){
}
Vector2 p project_to_screen(v);
Vector2 q get_corresponding stroke_position (v);
double displacement Vector2.dot_product(get_screen_space_normal (p), Vector2.subtract(q,p)); .
Vertex20[] vs get_corresponding pattern_vs(v);
vs[0].translate( Vector2.multiply( vs[0].normal, displacement));
vs[1].translate( Vector2.multiply( vs[1].normal, displacement));
update_rest_lengthes (mesh);
}

Select all missing elements in this code

Respuesta :

109318

Answer:

Step-by-step explanation:

It seems like there are a few issues with the provided pseudo-code. Here's a revised version with corrected syntax:

pseudo

Copy code

1  while (true) {

2      apply_simulation(mesh);

3      foreach (vertex v in mesh.seam) {

4          Vector2 p = project_to_screen(v);

5          Vector2 q = get_corresponding_stroke_position(v);

6          double displacement = Vector2.dot_product(get_screen_space_normal(p), Vector2.subtract(q, p));

7          Vertex20[] vs = get_corresponding_pattern_vs(v);

8          vs[0].translate(Vector2.multiply(vs[0].normal, displacement));

9          vs[1].translate(Vector2.multiply(vs[1].normal, displacement));

10         update_rest_lengths(mesh);

11     }

12 }

I've added missing semicolons at the end of lines, corrected the spelling of get_corresponding_stroke_position on line 5, and adjusted the formatting for better readability. Please note that the corrected version assumes the existence of appropriate functions and classes (e.g., apply_simulation, project_to_screen, get_corresponding_stroke_position, get_screen_space_normal, translate, update_rest_lengths) that are not explicitly provided in the pseudo-code.