Virtual Retinal Implant Simulator
Overview
This application provides an interactive simulation modeling the sensory output of functional microelectrode retinal prostheses. Retinal implants bypass decayed or damaged photoreceptors inside the retina, sending pattern pulses directly to the surviving inner retinal ganglion cells. Users do not perceive contiguous normal visual projections; instead, they see low-resolution grids of glowing phosphenes (individual dots of visual sensation induced by electrical current). This simulator recreates that synthetic experience utilizing webcam streaming and real-time algorithmic rendering filters.
How to Use
The system uses your web browser's media devices API to render processed optical camera streams. If you choose not to provide access, the engine automatically runs procedural geometric models. You can interact with the controls on both tactile mobile layouts and physical keyboards:
- Resolution Selections: Alter active phosphene density parameters. Lower layouts (e.g., 16x16) model classic clinical prostheses such as the Argus II. Extended densities showcase prospective configurations targeting wider visual ranges.
- Pathology Adjustments: Observe how existing physical tissue degradation impacts implant performance. Macular degeneration impairs central visual fields; glaucoma narrows inputs into a tunnel vision profile; and diabetic retinopathy creates irregular distributed blind spots.
- Sonification: Enable the sensory substitution sweeps. Frequencies map horizontal position coordinates to audio sweeps; vertical height scales the audio pitch while spatial intensity regulates local volume.
- Inactivity Demo: The sandbox mode launches after 45 seconds of inactivity. It automatically showcases resolutions and disease behaviors without losing your settings.
- Controls Reset: Press the Reset Simulation button to immediately wipe customizations, restore baseline parameters, and silence audio components.
- Keyboard Controls: Use hotkeys 1 through 4 to change disease filters, S to toggle audio sweeps, and D to activate or deactivate the demo loops.
Technical Details
The simulation uses the HTML5 <canvas> element to map frame buffer calculations. Luminance equations determine individual cell charge levels, translating incoming RGB frames into relative phosphene opacities. Tissue disease profiles are calculated as dynamic mathematical masks: AMD and glaucoma utilize radial boundary distances from the canvas center, while diabetic retinopathy implements coordinate-hashed noise maps to preserve repeatable micro-scotomas during movement.
Auditory sweeps run via the Web Audio API using a synchronized sine wave generator. Calculations are scheduled utilizing standard requestAnimationFrame configurations to ensure low Interaction to Next Paint latency and stable execution loops on mobile platforms.
Future Directions
Planned updates include adding temporal attenuation options to simulate pixel fading (phosphene fading over time during continuous stimulation) and distorted spatial maps simulating axonal streak distortions. Future visual updates will also model high-frequency electrical modulation strategies to determine if color variations can be perceived by patients.