Displays the BrachistoSim simulation which shows a ball sliding down various curved paths to see which path is fastest.

The various curves shown are defined in the BrachistoPaths module. The Mathematica notebook [Brachistochrone Curves(../Brachistochrone_Curves.pdf) shows how the curves were chosen. The goal is to find a variety of curves that start at the origin (0, 0) and pass thru the point (3, -2).

Hierarchy (view full)



  • Parameters

    • elem_ids: ElementIDs

      specifies the names of the HTML elementId's to look for in the HTML document; these elements are where the user interface of the simulation is created.

    Returns BrachistoApp


brachistoObserver: BrachistoObserver

BrachistoObserver handles making all DisplayObjects

task: ClockTask

This 'repeat' ClockTask will reset the sim every 6 seconds.


  • Adds the given Observer to this Subject's list of Observers, so that the Observer will be notified of changes in this Subject. An Observer may call Subject.addObserver during its observe method.


    Returns void

  • Define short-cut name replacement rules. For example sim is replaced by app.sim when myName is app.


    • myName: string

      the name of this object, valid in global Javascript context.

    Returns void

  • Parameters

    • script: string
    • output: boolean = true

      whether to print the result to the output text area and add the script to session history; default is true

    Returns any

    the result of evaluating the string

  • Sets whether this Subject will broadcast events, typically used to temporarily disable broadcasting. Intended to be used in situations where a subclass overrides a method that broadcasts an event. This allows the subclass to prevent the superclass broadcasting that event, so that the subclass can broadcast the event when the method is completed.


    • value: boolean

      whether this Subject should broadcast events

    Returns boolean

    the previous value

  • Returns a minimal string representation of this object, usually giving just identity information like the class name and name of the object.

    For an object whose main purpose is to represent another Printable object, it is recommended to include the result of calling toStringShort on that other object. For example, calling toStringShort() on a DisplayShape might return something like this:


    Returns string

    a minimal string representation of this object.

Generated using TypeDoc