Question: Split and Average (Geometry Smoothing) Background: What is Split and Average? In this problem we start with a closed polyline (a loop) given by N
Split and Average (Geometry Smoothing) Background: What is "Split and Average"? In this problem we start with a closed polyline (a loop) given by N points P 0 = {(x0, y0), (x1, y1), . . . , (xN 1, yN 1)}, where indices are taken modulo N (so point 1 is the last point and N is the first). We repeatedly apply two simple operationssplit and averageto smooth the shape. This toy model is a gentle introduction to iterative refinement, circular (wraparound) indexing, and writing small, testable functions. Split (insert midpoints): Given a 1D sequence p = (p0, . . . , pN 1), the split step creates a new sequence S(z) of length 2N by inserting midpoints between consecutive entries: s2i = pi, s2i+1 = 1 2 (pi + pi+1), i = 0, . . . , N 1, with pN p0 (wraparound). We apply this separately to the x and y coordinates, so the vertex count doubles each time. Average (local smoothing): Given a sequence s = (s0, . . . , sM 1) of length M , choose a weight vector w = (w1, w2, w3) with w1 + w2 + w3 = 1. The
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
