A method of determining a position and/or orientation of an object in a virtual environment, the method including: representing the object as a plurality of segments; receiving input signals, said input signals based at least in part on commands of a user indicative of a desired motion of the object, the method being characterized in that a mock endoscope arrangement (15, 19, 16a, 16b) is used, wherein movement of a tube by a user is sensed and used to generate the input signals or wherein the input signals are received from a user via conventional computer user input means such as a joystick, keypad or mouse; and determining a movement of said object in the virtual environment in response to the input signals, said determining including: determining a movement of at least a subset of the segments in response to the input signals; detecting whether any of the segments of the subset impact a wall of the virtual environment; and if so, determining a direction of motion of a said segment following the impact by combining data representing each wall being impacted and resolving to determine an escape direction for the segment; wherein said object is an endoscope and the virtual environment represents a portion of a patient, wherein the input signals represent any one or more of insertion or removal of an endoscope; rotation about the major axis thereof; bending of a tip of an endoscope; actuation of any additional equipment that may be used with an endoscope, and wherein movement of the object is translated into the addition or subtraction of one or more segments at the tip, the number and/or length of said one or more added or removed segments corresponding to user input distance to be moved. representing the object as a plurality of segments; receiving input signals, said input signals based at least in part on commands of a user indicative of a desired motion of the object, the method being characterized in that a mock endoscope arrangement (15, 19, 16a, 16b) is used, wherein movement of a tube by a user is sensed and used to generate the input signals or wherein the input signals are received from a user via conventional computer user input means such as a joystick, keypad or mouse; and determining a movement of said object in the virtual environment in response to the input signals, said determining including: determining a movement of at least a subset of the segments in response to the input signals; detecting whether any of the segments of the subset impact a wall of the virtual environment; and if so, determining a direction of motion of a said segment following the impact by combining data representing each wall being impacted and resolving to determine an escape direction for the segment; determining a movement of at least a subset of the segments in response to the input signals; detecting whether any of the segments of the subset impact a wall of the virtual environment; and if so, determining a direction of motion of a said segment following the impact by combining data representing each wall being impacted and resolving to determine an escape direction for the segment; wherein said object is an endoscope and the virtual environment represents a portion of a patient, wherein the input signals represent any one or more of insertion or removal of an endoscope; rotation about the major axis thereof; bending of a tip of an endoscope; actuation of any additional equipment that may be used with an endoscope, and wherein movement of the object is translated into the addition or subtraction of one or more segments at the tip, the number and/or length of said one or more added or removed segments corresponding to user input distance to be moved.