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 have a JavaScript version of Cubical Spline?

Return to the EJS Modeling forum
Login to post to this thread

is it possible to have a JavaScript version of Cubical Spline?
lookang Avatar
lookang
245 Posts

Dear Prof Wolfgang,
I been trying to do cubical spline for a set of data to produce a smooth curve.
I open your file here

https://www.compadre.org/osp/items/detail.cfm?ID=11478

there are a lot of old java syntax that I don't know how to convert to JavaScript equivalent. For example.

1. in Variables tab, spline is a type ==CubicSpline, how do I convert to JavaScript?
2. in fixed relationship, code like "y[i]=((org.opensourcephysics.numerics.CubicSpline)spline).evaluate(xi);" is this kind of code working on EJSS or only EJS currently?

I lack the technical knowledge of harnessing the org.opensourcephysics.numerics.CubicSpline library,  Thus, can an EJSS (Javascript) version be released soon? :)

Thank you very much.

Attached File: Screenshot20230126at5.31.55PM.png


OSP@SG blog
OSP@SG Digital Library

Current Replies - View all
Re: is it possible to hav...   (Wolfgang - )
Re: is it possible to hav...   (lookang - )
OSP Projects:
Open Source Physics - EJS Modeling
Tracker
Physlet Physics
Physlet Quantum Physics
STP Book