Zigzag encode points