We study the structure of passively heated disks around T Tauri and Herbig Ae stars, and present a vectorized Monte Carlo dust radiative transfer model of protoplanetary disks. The vectorization provides a speed up factor of 100 when compared to a scalar version of the code. Disks are composed of either fluffy carbon and silicate grains of various sizes or dust of the diffuse ISM. The IR emission and the midplane temperature derived by the MC method differ from models where the radiative transfer is solved in slab geometry of small ring segments. In the MC treatment, dusty halos above the disks are considered. Halos lead to an enhanced IR emission and warmer midplane temperature than do pure disks. Under the assumption of hydrostatic equilibrium we find that the disk in the inner rim puffs up, followed by a shadowed region. The shadow reduces the temperature of the midplane and decreases the height of the extinction layer of the disk. It can be seen as a gap in the disk unless the surface is again exposed to direct stellar radiation. There the disk puffs up a second time, a third time and so forth. Therefore several gaps and ring-like structures are present in the disk surface and appear in emission images. They result from shadows in the disks and are present without the need to postulate the existence of any companion or planet. As compared to Herbig Ae stars, such gaps and ring-like structures are more pronounced in regions of terrestrial planets around T Tauri stars.