**11. Proposed model and vr simulation for artificial human arm**

The simulator was built using MATLAB with Virtual Reality Toolbox. MATLAB provides powerful engineering tool including frequently used mathematical functions. It is easy to implement control algorithm including visualization of data used in the algorithm. In addition, by using Virtual Reality Toolbox, it is convenient to treat 3D objects defined with Virtual Reality Modeling Language (VRML). Thus, it is possible to build a simulator within a relatively short period. virtual reality is a system which allows one or more users to move and react in a computer generated environment. The basic VR systems allow the user to visual information using computer screens. The simulation contain two part ,first ,building model for human arm in VRML, second, call and run the model of human arm using virtual reality toolbox in the MATLAB.

To realize the VRML model for Human arm save the file as HumanArm.wrl file, which is the file format for Virtual Reality software, the VRML model of the human arm is designed in V-Realm Builder 2.0 . Fig.13 presents the VRML model of the human arm.

**Figure 13.** The VRML model of the Human arm

The MATLAB program is given as:

```
%% control of human arm as MATLAB code 
world=vrworld('HumanArm.wrl', 'new'); 
open(world); 
fig=vrfigure(world); 
elbow=vrnode(world, 'elbow'); 
k=0; 
for theta=pi/2:-pi/100:0 
 k=k+1; 
 x(k)=theta; 
 pause(0.05) 
 elbow.rotation=[0 0 theta theta]; 
 vrdrawnow; 
end
```