A simpler question: How many different triangles can you draw in the plane ?

( How many separate 1-variable "sliders" would you have to provide to cover all cases ? )

( How many different variables would you have to randomize in a test generator ? )

This is called the "Degrees Of Freedom" (DOF) of such a system.

With this definition: How many DOFs are there for:

1.) all equilateral triangles in the plane ?

2.) all rectilinear bricks in 3D space ?

3.) all circles in the plane ?

4.) all infinitely long lines in 2D ?

Where do such questions come up in the field of computer graphics (CAD, Robotics ...) ?

PREVIOUS < - - - - > CS 184 HOME < - - - - > CURRENT < - - - - > NEXT

-- Bucket-sort (in y) all polygon edges into the

-- Inserting edges into scan-line buckets (details)

-- For the current swath of pixels update the

-- Details of scan-line processing on active edge list

-- Turn on pixesl that have their sampling points on active inside spans.

(For convenience we chose the

-- and then again to efficiently calculate the values needed at each pixel location. Specifically:

Z-buffer Algorithm (to find the "top" visible polygon; calculate height incrementally along scan line)

Polygons can also be processing all psimultaneously:

Here is a more detailed description of a

A#2: Test each polygon vertex whether it is "close enough" to the mouse!

-- conservative (pessimistic) size estimates (e.g. for culling) to reduce the amount of computation that needs to be done n(e.g., clipping, rendering collision detection...)

-- crude abstractions ("place-holders", "imposters") for displaying that piece of the scene hierarchy at lower LOD (level-of-detail).

Such bounds should be easy to construct and easy to use.

**Axis-Aligned Bounding Boxes (AABB)**:

a rectangle with diagonal corners (xmin,ymin),
(xmax, ymax).

These AABB's have some inefficiencies: e.g., around a diagonal needle.

Also, with every (rotated) use in a hierarchy, the AABB may grow.

**Alternatives
to Bounding Boxes:**

**Optimally oriented bounding boxes (OOBB)**: are more
efficient
but more difficult to determine.

**Bounding circles or spheres**: have rotation-independent size,
but are not so easy to find either.

**Convex hulls**: can be constructed efficiently, but may have many
vertices, --> loss of efficiency.

Hierarchy, transformations, and bounding boxes will important
components
in Assignment #3.

World to screen transforms - Overview (This is valid in some form for all rendering environments).

And what it does to a world of triangles.

In assignment A#2 you are asked to make the display window scalable (e.g., by dragging one of its corners).

But you don't want your carefully designed fantasy polygon to be distorted -- just scaled uniformly to the largest sixe that fits into the current window.

Thus you have to determine what is the largest rectangle with the aspect ratio of your original drawing window (= square) that fits into the given window.

Conceptually we calculate two transformation steps:

If we were to just scale the x- and y-directions individually, so that the content of window completely fills viewport, we might get affine distortions, if the aspect ratios of window and viewport are different.

(You should brush up on: Matrix multiplication; Rotation Matrices; -- if you are a liitle rusty, go back to your linear algebra text!)

Now we also want to do

Linear transforms: {T(aX + B) = a T(X) + b } always leave origin in place; T(0) = 0.

--> We use a clever hack via homogeneous coordinates:

We can recover the regular cartesian coordinates by a division with w (w<>0);

this corresponds to a cut of the homogeneous line with the w=1 plane.

Matrix operation is still linear in d+1 dimension (origin stays in place),

but we are only interested in (hyper-)plane w=1,

Show the basic translation matrix, demonstrate that it works. Show all 2D transforms for use with homogeneous column vectors.

Distinguish:

All possible line segments should have a chance of being generated.

How many variables need to be randomized ?

Or, if you want to make an interactive generator applet, -- how many individual (one-parameter) sliders would you need ?

Or, if you wanted to sample a given "world" with all possible camera "windows", -- How many parameters does this require ?

-- Or

Similarly, how many DOFs are there
for the specification of all
possible
...

- line segments in 2D: (4)
- rectangles in 2D: ( )
- infinitely long lines in 2D: ( )
- spheres in 3D: ( )
- planes in 3D: ( )

Shirley, 2nd Ed: Ch 2.10; Ch 6.1, 6.3.

Both must be done individually.

Assignment #1 is due (electronically submitted) before Thursday 2/5, 11:00pm.

Assignment #2 is due (electronically submitted) before Thursday 2/12, 11:00pm.

I strongly recommend that you should be done with your assignments by **Wednesday**,

so that you can then focus on the new one and pay attention to what I might say in class about it.

The "extension" to Thursday should only be seen as an emergency measure.

PREVIOUS < - - - - > CS 184 HOME < - - - - > CURRENT < - - - - > NEXT

Page Editor: Carlo H. Séquin