create the kernel functions for polyprism