A MATLAB implementation for simulating three-dimensional eye movement control based on a Hill-type muscle model and Listing’s law.
This repository provides a simple computational model of gaze transition between two 3D gaze vectors. The model includes gaze vector rotation, muscle activation, torque generation, and angular velocity changes during simulated eye movement.
The code simulates an ocular motor model for controlling gaze in three dimensions. It starts from an initial gaze vector and estimates the movement toward a final gaze vector using rotational dynamics and muscle-related parameters.
The current implementation is contained in a single MATLAB script:
main.m
The simulation produces angular velocity plots and a 3D visualisation of gaze vector movement.
- Simulation of 3D gaze movement
- Initial and final gaze vector definition
- Rotation-based gaze transformation
- Activation generation
- Torque generation
- Hill-type muscle force modelling
- Angular velocity visualisation
- 3D gaze vector movement plot
eye-model/
│
├── main.m # Main MATLAB script for simulating 3D eye movement
├── README.md # Project documentation
└── .gitattributes
This project requires MATLAB.
Recommended environment:
- MATLAB R2020a or later
No additional MATLAB toolbox is currently required for running the main script.
The script generates the following plots:
- Angular velocity changes around the x-axis
- Angular velocity changes around the y-axis
- Angular velocity changes around the z-axis
- 3D movement of the gaze vector
These plots help visualise how the model estimates gaze movement over simulation iterations.
The model starts with an initial gaze vector and a final gaze vector:
X1 = [1; 1.3; 2];
X2 = [1; 3; 0.7];You can modify these values to simulate different gaze transitions.
The angle between the two gaze vectors is calculated using the dot product:
theta = acos(num / det);This angle is then used to define rotation matrices and rotation-related variables.
Muscle activation values are generated based on the rotation vector:
A = abs([a1; a2; a3]);The model includes simplified parameters for:
- Eyeball radius
- Viscosity coefficient
- Elastic coefficient
- Moment of inertia
- Muscle length
- Muscle velocity
- Muscle force
- Torque
The simulation updates angular velocity, torque, and gaze direction iteratively.
If you use or refer to this code, please cite the original model paper:
Polpitaya, A. D., and Ghosh, B. K. (2003).
Modeling the dynamics of oculomotor system in three dimensions.
42nd IEEE International Conference on Decision and Control, 6418–6422.
doi: 10.1109/CDC.2003.1272353
Hesam Shokouh Alaei