1 Exercise-03 Course: Geometric Modelling and Visualization

1
Exercise-03
Course: Geometric Modelling and Visualization
Exercise 1:
In the figure below a 2D Cartesian grid is shown. It has a constant spacing of 1 between adjacent grid
points along either axis. The origin of this grid is at (1, 1). A continuous scalar function f was sampled
at the grid vertices. At vertices marked with a filled dot the scalar value of f is 1, at vertices marked
with a non-filled dot the scalar value of f is 0.
a) (6 points) For the center vertex in this grid, approximate
πœ•π‘“ πœ•2 𝑓
πœ•2 𝑓
,
and πœ•π‘₯πœ•π‘¦ using solely central
πœ•π‘₯ πœ•π‘₯ 2
differences.
b) (3 points) In the figure, illustrate the curve 𝑓(π‘₯, 𝑦) = 0.3 using bi-linear cell-wise
interpolation.
c) (6 points) Compute the gradient at the point (5.5, 5.5) analytically using the bi-linear
interpolation function in the interior of the respective cell.
2
d) (4 points) Illustrate an example where the mid-point decider cannot be used to decide which
contour-points along the edges of a quadrilateral cell should be connected in the marching
squares algorithm. For this example, draw into the following figure the scalar values at the
cell vertices and the exact iso-contours for which the mid-point decider cannot decide the
connectivity. You should exclude the case where the same value is given at all vertices.
e) (4 points) Given is the following triangulation. Draw into this triangulation all points where
the barycentric coordinate of these points with respect to the vertex X is equal to 0.5 in any
of the triangles.
3
Exercise 2:
a) In Figure 1, a 2D Cartesian grid is shown. It has a constant spacing of 1 between adjacent grid
points along either axis. The origin of this grid is at (1, 1). A second grid is shown, which
consists of one triangle with vertices at (4.5, 5.5), (5.5, 7.5), (6.5, 5.5) and one quadrilateral
with vertices (4.5, 3.5), (4.5, 5.5), (6.5, 5.5), (6.5, 3.5). At the vertices of the second grid,
scalar values are given. These values are equal to 1 at vertices marked with a filled circle and
0 at vertices marked with a non-filled circle.
Figure 1
1. (4 points) Compute the barycentric coordinates of the points (5.5,5.5) and (5.5,3.5) with
respect to the triangle.
2. (3 points) Determine the coefficients a, b, c of the linear function
𝑓 (π‘₯, 𝑦) = π‘Ž + 𝑏 βˆ™ π‘₯ + 𝑐 βˆ™ 𝑦 that interpolates the scalar values at the triangle vertices.
3. (5 points) For the quadrilateral, determine the coefficients a, b, c, d of the bi-linear
interpolation function 𝑓(π‘₯, 𝑦) = π‘Ž + 𝑏 βˆ™ π‘₯ + 𝑐 βˆ™ 𝑦 + 𝑑 βˆ™ π‘₯ βˆ™ 𝑦 in the interior of that
quadrilateral.