Abstract
This paper presents the construction of a full mathematical model of 6 degrees of freedom (6 DoF) to build a 3D dynamic model that can be applied to ships such as cargo ships, container ships. The systems of ship dynamics equations take into account the nonlinear damping force components, forces and moments due to environmental disturbances acting on the ship such as waves, wind, currents, which most of previous studies have omitted or inadequately mentioned these components. The virtual 3D ship was built and programmed for the purpose of using it to test future modern ship motion control algorithms.