Previous | Next --- Slide 27 of 47
Back to Lecture Thumbnails
gpu

I'm having a hard time understanding why dependency flows from the top left down toward the bottom right. Isn't each node computed as the average of the N,W,S,E nodes? At first glance, this seems to imply that dependency comes from all cardinal directions around the pixel.

I think my misunderstanding comes from this being a single iteration of the algorithm, however I'm not able to pinpoint it much further.

orz

@gpu Some explanation might help: - Each node is the average of the N,W,S,E nodes. - To get such a solution, we need repeat the average calculation for several times to reach some convergence: a node will be used to calculate for the average for another node and then later updated. - To use the iterative algorithm, we need to sweep over the grids one by one. The exact order does not really matter but it should be fixed. In the code on the previous side, it is fixed to flow from the top left. - Then, the order decides the dependencies: for each node, which of the neighbors should be already updated in this-time sweep when calculating the average? The E and S are used the values from the previous round.

SebL

The idea is similar to the chessboard approach mentioned later. The average is iteratively calculated using N, W, S, E and itself, but only N and W are updated in the same loop. The value updates are accumulated for a tolerance threshold.

viklassic

I was in the same boat as @gpu but reading through these explanations I want to see if I've understood this correctly. The term "dependencies" here doesn't refer to the fact that the computation depends on the 4 cardinal directions but rather that in the particular approach where the iterating is done first to last row and first to last column, the N and W points necessarily must be computed before the current point. So the N and W points are dependencies in that their calculation must be done first otherwise the algorithm doesn't match up with the way the for loops were set up.

Please log in to leave a comment.