Active edge table algorithm