is there an equivalent function for _view._vectorField2D.indexToX(i); in EJSS ? _view.vectorField2D.
lookang
245 Posts
Is there a comparable function to `_view._vectorField2D.indexToX(i);` in EJSS? However, it's worth noting that `_view.vectorField2D.indexToX(i)` functions properly in EJS.
I located the code within the provided link: https://www.compadre.org/OSP/document/ServeFile.cfm?ID=9964&DocID=1589. This pertains to the 'DipoleTrajectoryWrong.xml' example.
Re: is there an equivalent function for _view._vectorField2D.indexToX(i); in EJSS ? _view.vectorField2D. -
Wolfgang
192 Posts
Although EJS 6 does not yet have a scalar or a vector field drag-and-drop element, it is straighforward to add JavaScript code to visualize these 2D fields. Here are examples.
Scalar field contour and colored pixel plot. https://www.compadre.org/osp/items/detail.cfm?ID=14061
Vector Field using arrow color for magnitude. https://www.compadre.org/osp/items/detail.cfm?ID=14060
Re: is there an equivalent function for _view._vectorField2D.indexToX(i); in EJSS ? _view.vectorField2D. -
Alfonso Fischer
1 Posts
It is easy to add JavaScript code to view these 2D fields doodle jump, even though EJS 6 does not yet include a scalar or vector field drag-and-drop element.
Re: is there an equivalent function for _view._vectorField2D.indexToX(i); in EJSS ? _view.vectorField2D. -
Wolfgang
192 Posts
It is not difficult to program a vector field in JavaScript. Look at the code for the Electic Field model by clicking on the Open in Web EJS link in the following EJS model.