Class myphysicslab.lab.model.PointMass

Provided By
All Implemented Interfaces

A simple point-like MassObject, it has mass, velocity, size and shape. Default mass is 1, default shape is circle with diameter of 1. Center of mass is at the center of the shape. In body coordinates the center of mass at the origin.

Drawing an Ellipse

The method #createCanvasPath is responsible for creating the path that is used to draw this object, see myphysicslab.lab.view.DisplayShape. When the shape is oval, this will attempt to draw an oval using CanvasRenderingContext2D.ellipse but not all browsers implement that method as of 2016. A circle is drawn instead for those browsers without the ellipse function; the circle has diameter being the lesser of width or height of this object.

new PointMass( opt_name, opt_localName )


name of this PointMass for scripting (language independent)


localized name of this PointMass, for display to user

Instance Methods

Instance Properties

Static Functions

Static Properties

Type Definitions