Skip to main content

CG Class 23, Mon 2019-11-18

2   ACM SIGSPATIAL GIS Cup

I mentioned that 2 weeks ago I was at 27th ACM SIGSPATIAL International Conference on Advances in Geographic Information Systems (ACM SIGSPATIAL 2019).

They have an annual programming contest, the GISCup. My students and I won first place in 2018.

In 2016, we won 2nd place. We also won 2nd place in 2015, and 4th in 2014.

3   How I made a fast forward video in linux

For the 2019 International Geometry Summit Vancouver.

This is my FF video. It plays on some browsers, like chromium, but not on others, like firefox.

How I made it, approximately.

  1. This gives the same time to each slide.

  2. I made a pdf file of the slides, using LaTeX Beamer.

  3. Convert that to separate png files using Imagemagick:

    mogrify -verbose -density 500 -resize 1600x900\! -format png ./*.pdf

  4. Make a timed video of slides:

    ffmpeg -framerate 1:42 -pattern_type glob -i '*.png' -c:v libx264 video.mp4

  5. Note: Don't use Imagemagick convert, whose output runs slow.

  6. Write the transcript for my voiceover.

  7. Record my audio with my best headset.

  8. Combine audio and video:

    ffmpeg -i narration.wav -i video.mp4 combo.mp4

4   Week 13 slides

  1. 13_2 Polygon rendering. Includes clipping polygons, hidden surface algorithms.

    Start at slide 23.

  2. 13_3 Rasterization.

5   My commentaries

5.1   Clipping

  1. Many of these algorithms were developed for HW w/o floating point, where even integer multiplication was expensive.
  2. Efficiency is now less important in most cases (unless you're implementing in HW).
  3. The idea of clipping with a 6-stage pipeline is important.
  4. Jim Clark, a prof at Stanford, made a 12-stage pipeline using 12 copies of the same chip, and then left Stanford to found SGI.
    1. Later he bankrolled Netscape and 2 other companies.
    2. More recently he had the world's 4th largest yacht.

5.2   Polygon rendering

  1. My note on Bresenham Line and Circle Drawing. Jack Bresenham, then at IBM invented these very fast ways to draw lines and circles with only integer addition and subtraction. My note gives step-by-step derivations by transforming slow and clear programs to fast and obscure programs.
  2. My note on Two polygon filling algorithms.

5.3   Visibility methods

Here's my summary of problems with the main methods:

  1. Painters:
    1. The painter's algorithm is tricky when faces are close in Z.
    2. Sorting the faces is hard and maybe impossible. Then you must split some faces.
    3. However sometimes some objects are always in front of some other objects. Then you can render the background before the foreground.
  2. Z-buffer:
    1. Subpixel objects randomly appear and disappear (aliasing).
    2. Artifacts occur when objects are closer than their Z-extent across one pixel.
    3. This happens on the edge where two faces meet.
  3. BSP tree:
    1. In 3D, many faces must be split to build the tree.
  4. The scanline algorithm can feed data straight to the video D/A. That was popular decades ago before frame buffers existed. It became popular again when frame buffers are the slowest part of the pipeline.
  5. A real implementation, with a moving foreground and fixed background, might combine techniques.
  6. References: wikipedia.