CS216
Chris Pollett
Apr 20, 2010
Initialize a list L of windows to consist of a single window that is the entire screen. For each window W in the current list L look for one of the following cases: (1) All polygons are disjoint from W. In this case, draw W in the background color. (2) Only one polygon P intersects W. In this case, draw the intersection of P and W in the color of P and draw W in the background color. (3) At least one surrounding polygon was found and it is in front of all other polygons that intersect the window. In that case, draw the window in the color of the polygon. If none of these cases apply to W, split W into four equal sized smaller windows, and add them to L. Repeat this process until one gets down to a window the size of a pixel. At that point one checks directly which polygon is in front of all others at that pixel.
Let Depth(p) denote the z-coordinate of p in the camera coordinate system. We assume the array DEPTH holds these z-values for the object closest to the camera. color array FRAMEBUF[XMIN..XMAX, YMIN .. YMAX]; real array DEPTH[XMIN..XMAX, YMIN .. YMAX]; begin Initialize FRAMEBUF to the background color; Initialize DEPTH to ∞ for all faces F in the world do for each point p in F do if p projects to FRAMEBUF[i,j] for some i,j then if Depth(p) < DEPTH[i,j] then begin FRAMEBUF[i,j] := color of F at p DEPTH[i,j] := Depth(p); end end
Which of the following statements is true?
Theorem. Let `vec p_1, vec p_2, \ldots, \vec p_s` and `vec q_1, vec q_2, \ldots, \vec q_t` be points in `mathbb{R}^n`. Let `X` and `Y` be the convex hulls respectively of the first and set set of points. Assume the hull of `S = \{ vec p_1, vec p_2, \ldots, \vec p_s, vec q_1, vec q_2, \ldots, \vec q_t \}`has dimension `n`. Then the following two statements are equivalent:
Theorem. Let `vec p_1, vec p_2, \ldots, \vec p_s` and `vec q` be points in `mathbb{R}^n`. Assume that the convex hull of `X` of `vec p_1, vec p_2, \ldots, \vec p_s` has dimension `n`. Then `vec q` is disjoint from `X` iff there is a subset `vec r_1, vec r_2, \ldots, vec r_n` of linearly independent points of `vec p_1, vec p_2, \ldots, \vec p_s` so that the hyperplane with these points separates `X` and `vec q`.
Definition. A point `vec v` is said to be a vertex or an extreme point of a convex set `C` if `vec v` does not belong to the interior of any segment whose endpoints lie in `C`.
Corollary Let `vec p_1, vec p_2, \ldots, \vec p_s` and `vec q` be points in `mathbb{R}^n`. Assume that the convex hull of `X` of `vec p_1, vec p_2, \ldots, \vec p_s` has dimension `n`. Let `Y` be the convex hull of `vec p_1, vec p_2, \ldots, \vec p_(s-1)`. Then `\vec p_s` is a vertex of `X` iff either:
Let `m=s+t`. The proofs of the theorems above give `O(m^(n+1))` algorithms for whether the intersection of convex hulls of `s` and `t` points intersect. i.e., choose a subset of size `n` and try to verify the condition of the theorem for that subset. One also gets an order `O(s^(n+1))` algorithm for deciding if a point is a vertex of a convex hull.