def reflection_matrix(point, normal):
 normal = unit_vector(normal[:3])
 M = numpy.identity(4)
 M[:3, :3] -= (2.0 * numpy.outer(normal, normal))
 M[:3, 3] = ((2.0 * numpy.dot(point[:3], normal)) * normal)
 return M

def reflection_matrix ( point , normal ) : normal = unit_vector ( normal [ : 3 ] ) M = numpy . identity ( 4 ) M [ : 3 , : 3 ] -= ( 2.0 * numpy . outer ( normal , normal ) ) M [ : 3 , 3 ] = ( ( 2.0 * numpy . dot ( point [ : 3 ] , normal ) ) * normal ) return M
return matrix to mirror at plane defined by point and normal vector .