A new paradigm for programming of robotics manipulator to perform complex constrained motion tasks is being studied. The teaching of the manipulation skills to the machine starts by demonstmting those skills in a haptic -rendered virtual environment. Position and contact force and torque data generated in the virtual environment combined with a priori knowledge about the task is used to identify and learn the skills in the newly demonstrated tasks and then to reproduce them in the robotics system. The peg-in-hole insertion problem is used as a case study. In the ftrst implementation of the virtual manipulahon envlfonment, a three degree-offreedom (3DOF) haptic device called PHANToM Premium 1.0 and its accompanying software, GHOST were used to construct the virtual manipulation. The developed system proved quite stable when the peg-in-hole insertion was performed using 3DOF Phantom. However, employment of a six degree-of-freedom PHANToM Premium 1.5 destabilised the process and introduced strong oscillations. The work conducted to stabilise this system is reported. Three new algorithms including modilled PointShell, modifted TriPolyMesh and dual-gstCylinder developed and applied to the virtual assembly are explained. The major differences between the new algorithms and previous methods are highlighted. The progress up-to-date is provided.