Skip to content

EFieldNode

Overview

Visual representation of the effective E-field (E_effective) between the capacitor plates.

@author Chris Malley (PixelZoom, Inc.) @author Emily Randall (PhET Interactive Simulations) @author Jesse Greenberg (PhET Interactive Simulations) modules

Class EFieldNode

import { EFieldNode } from 'scenerystack/scenery-phet';

Constructor

new EFieldNode( capacitor, modelViewTransform, maxEffectiveEField, canvasBounds )

Instance Methods

paintCanvas( context )

Rendering @public

@param {CanvasRenderingContext2D} context

getLineSpacing( effectiveEField )

Gets the spacing of E-field lines. Higher E-field results in higher density, therefore lower spacing. Density is computed for the minimum plate size. @public

@param {number} effectiveEField @returns {number} spacing, in model coordinates

Source Code

See the source for EFieldNode.js in the scenery-phet repository.