Development of a 4D dosimetry simulation system in radiotherapy