implemented the live preview on geometrical figures