Exemple #1
0
def coords_behind_2D_perpwall(coord, angletable_2D=arc_tools.TABLE, shellcache=shell_tools.CACHE):

    # 'high' should be bigger -- if not, we have a wraparound scenario
    (low, high) = edges_of_coord(coord)
    # print low, high
    if low > high:
        # wraparound, correct terms
        (low, high) = (high, low)
        between = angletable_2D.between(0, low) | angletable_2D.between(high, 360) - set([coord])
    else:
        between = angletable_2D.between(low, high) - set([coord]) # <---<<< !!! THIS IS CRUCIAL!  Otherwise blocking propagates?

    mag = int(round(magnitude(coord)))

    return utils.fast_hemiarc(between, mag, shellcache)
Exemple #2
0
 def potentially_illuminated(self):
     potential = self.angletable2D.around(self.angle, self.arc_length) | set([(0,0)])
     return potential - utils.fast_hemiarc(potential, self.radius, self.shellcache)