CoolFace
Apppublic

HYPERx54/circadian-lighting-simulator

sourceHugging Facemitupdated 4mo agoView on Hugging Face
0likes
App README

Patient-Centric Adaptive Circadian Lighting Simulator (3D Space)

An interactive, web-based 3D simulation prototype demonstrating the FSM and FPGA logic for the Patient-Centric Adaptive Circadian Lighting System (VIT ICSCST 2026 Paper ID: 1466).

🏥 Features

  1. 1.Interactive 3D Hospital Room Viewport:
  2. 2.Model of patient bed, resting patient figure, ceiling lighting fixtures, and vital signs monitor.
  3. 3.360-degree Orbit Camera Controls (left-click drag to rotate, scroll wheel to zoom).
  4. 4.Dynamic PointLight tinting based on Finite State Machine (FSM) PWM duty cycles.
  5. 5.Window streaming natural DirectionalLight daylight and shadow maps mapping to the Ambient ADC Light Sensor.
  1. 1.Clinical and Behavioral Profile Database:
  2. 2.Live switching between 16 Clinical profiles (Adult, child, elderly, migraine, ICU, SAD, depression, etc.) and 16 Behavioral profiles (shift worker, emergency mode, energy saver, custom overrides, etc.).
  1. 1.High-Fidelity Signal Processing Waveforms:
  2. 2.Real-time calculations of Red, Green, and Blue duty cycles.
  3. 3.Dynamic Math Formula updates using the inverse ambient light equation: $$\text{PWM} = \text{Base\Spectral\Power} \times \frac{255 - \text{Ambient}}{256}$$
  4. 4.Responsive oscilloscope canvas displaying the pulse width modulation (PWM) square-wave pulse trains.
  1. 1.ModelSim Simulator Testbench Emulator:
  2. 2.Monospace terminal console simulating compile targets, hardware stimulations, and functional test sequences matching Verilog testbench outputs.
  1. 1.Dynamic Charts:
  2. 2.Chart.js plots tracking 24-hour circadian duty cycles and inverse ambient dimming curves.
  1. 1.Verilog HDL Source Code Explorer:
  2. 2.Monospace code explorer with syntax highlight previews for lighting_fsm_no_ml.v, rtc_interface.v, profile_selector.v, ambient_light.v, and tb_lighting_fsm.v.

🛠️ File Structure

The space serves the following static assets:

  • —index.html: Defines the layout, controls, and diagnostics panel.
  • —styles.css: Implements the serenity cream and hunter green design tokens.
  • —simulation.js: Orchestrates the Three.js 3D WebGL render loop, Chart.js datasets, Verilog repository, and FSM math.

🚀 Running Locally

If you clone this Space repository:

  1. 1.Simply double-click index.html in your file explorer to launch the prototype directly in any modern web browser.
  2. 2.No local servers, packages, or background scripts are required—it is 100% CORS-safe and portable.