A model of laminar visual cortical dynamics proposes how 3D boundary and surface representations arise from viewing slanted and curved 3D objects and 2D images. The 3D boundary representations emerge from non-classical receptive field interactions within intracortical and intercortical feedback circuits. Such non-classical interactions within cortical areas V1 and V2 contextually disambiguate classical receptive field responses to ambiguous visual cues using cells that are sensitive to colinear contours, angles, and disparity gradients. Remarkably, these cell types can all be explained as variants of a unified perceptual grouping circuit whose most familiar example is a 2D colinear bipole cell. Model simulations show how this circuit can develop cell selectivity to colinear contours and angles, how slanted surfaces can activate 3D boundary representations that are sensitive to angles and disparity gradients, how 3D filling-in occurs across slanted surfaces, how a 2D Necker cube image can be represented in 3D, and how bistable 3D Necker cube percepts occur. The model also explains data about slant aftereffects and 3D neon color spreading. It shows how chemical transmitters that habituate, or depress, in an activity-dependent way can help to control development and also to trigger bistable 3D percepts and slant aftereffects. Attention can influence which of these percepts is perceived by propagating selectively along object boundaries.