Principles of stellar dynamics