Bodylight.js

Bodylight.js

  • Docs
  • GitHub

›Simple project

Getting started

  • Introduction
  • Compiling Modelica

Simple project

  • Creating a simple project
  • Adding the model
  • Visualisation
  • Controls
  • Events and Actions

Physiological application

  • Pressure volume cardiac simulator
  • Creating the layout
  • Adding the heart
  • Heart Beat
  • Controls
  • Phases
  • Pressure volume chart
  • Rolling charts
  • Custom actions
  • Buttons
  • Finishing touches

API

  • Model
  • Plotly chart
  • Range
  • Toggle

Controls

Add a range widget to controll the cosinus frequency

  • Drag the Range widget (slider) from the Blocks palette to the right column on the canvas.
  • Name the range "cosinus frequency"
  • Click the button with "none" text to set the target variable
  • Select the "Lissajous:cosinus_frequency variable in the pop-up window
  • Set the maximum for the range to 2. Minimum can be left at 0, so that the frequency may range from 0 to 2.

Add range for cosinus shift

  • Add similarly slider for the cosinus shift, bind it to Lissajous:cosinus_shift variable and set the limits to (0,2).

Add label for cosinus frequency, add label for sinus frequency

  • Drag the "Label" widget from the "Blocks palette" to the left of the frequency slider.
  • Select the new Label
  • Name it "Cosinus frequency"
  • Do the same for the shift slider and name the new Label "Cosinus shift"


  • Check the result using the preview.

The project in the current stage may be downloaded here and the simulator is:

← VisualisationEvents and Actions →
  • Add a range widget to controll the cosinus frequency
  • Add range for cosinus shift
  • Add label for cosinus frequency, add label for sinus frequency
Copyright © 2019 Creative Connections s.r.o.