Basic calculations for a shape completed.
Refined the check when animating a shape.