Skip to content

EFieldNode

Under Construction

This documentation is auto-generated, and is a work in progress. Please see the source code at https://github.com/phetsims/scenery-phet/blob/main/js/capacitor/EFieldNode.js for the most up-to-date information.

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.