APS Excellence in Physics Education Award
November 2019

Education Prize Logo
Science SPORE Prize
November 2011

NSF Logo
The Open Source Physics Project is supported by NSF DUE-0442581.

Is it possible to vary the width or color of vectors in a 2D field in a custom way that depends on array data?

Return to the OSP Programming forum
Login to post to this thread

Can the width or intensity of vectors in a 2D field be varied depending on array data? - August 9, 2016 at 1:06
Stephen Salser
8 Posts

I would like to create a custom 2D vector field where the longer vectors are also fatter.  Since energy density is proportional to the square of the magnitude, the area of the vector would then represent the energy density.  This would give students a way to intuitively estimate the energy density.

Is there a way to use or customize the VectorField2D package to do this?

OSP Projects:
Open Source Physics - EJS Modeling
Physlet Physics
Physlet Quantum Physics
STP Book