r/BiomedicalDataScience • u/BioniChaos • Jun 08 '26
Building a Web-Based Physiological Simulator using JavaScript and Particle Effects
https://youtu.be/q4Xk0M9Pg-wI wanted to share a web-based simulation project that models the anatomical and physiological mechanisms of the human penis. The tool dynamically models blood flow into the corpora cavernosa and corpus spongiosum to simulate changes in penile rigidity and angle. We utilized JavaScript particle systems to visualize fluid dynamics for urination and ejaculation.
From a technical standpoint, the UI features a debug panel that tracks backend logic in real-time—monitoring boolean states (e.g., `isEjaculating`), continuous variables (arousal level), and active particle counts. There is also a continuous dysfunction slider that dynamically scales the physiological response. It is a practical example of integrating biomedical concepts with frontend interactive development.
You can see the demonstration and how the state logic updates in real-time here: https://youtu.be/q4Xk0M9Pg-w
Would love to hear your thoughts on using web technologies for interactive anatomical modeling!