Resource leveling and smoothing are useful techniques for capacity planning, as they help to align the resource demand and supply over the project lifecycle. To apply them in capacity planning, begin by defining the project scope, objectives, and deliverables; breaking down the project into activities and tasks; and estimating their duration, cost, and quality. Additionally, identify the resource types, quantities, and skills needed for each activity and task. Next, analyze the resource availability, constraints, and dependencies for each activity and task. Then create a baseline schedule and a resource histogram to illustrate the resource demand and supply over time. Finally, apply resource leveling or smoothing techniques to adjust the activity start and finish dates in order to balance or minimize the resource demand and supply variations. Throughout this process it is important to monitor and control the resource usage and performance; updating the schedule and resource histogram as needed.