cultivating attitudes of:
• Friendliness toward the happy,
• Compassion for the unhappy,
• Delight in the virtuous and
• Disregard toward the wicked
the mind retains its undisturbed calmness.
Or that calm is retained by the controlled exhalation or retention of the breath.
Or the concentration on subtle sense perception can cause steadiness of mind.
Or by concentrating on the supreme, ever blissful Light within….
Gradually, one's mastery in concentration extends from the primal atom to the greatest magnitude.
Just as the naturally pure crystal assumes shapes and colors of objects placed near it, so the Yogi's mind, with its totally weakened modifications, becomes clear and balanced and attains the state devoid of differentiation between knower, knowable and knowledge. This culmination of meditation is samadhi.
Patanjali—Samadhi Pada: Sutras 33-41.