General Principles for the Formation of Spatial Patterns in Laser and Laser Hydrodynamics