Lack of a slider in an exemple

5 views
Skip to first unread message

Cyrille Piatecki

unread,
Jan 1, 2025, 12:18:30 PMJan 1
to JSXGraph
In  JSXGraph Reference - Cardinalspline

I have founded this code 

//create a cardinal spline out of an array of JXG points with adjustable tension //create array of points var p1 = board.create('point',[0,0]) var p2 = board.create('point',[1,4]) var p3 = board.create('point',[4,5]) var p4 = board.create('point',[2,3]) var p5 = board.create('point',[3,0]) var p = [p1,p2,p3,p4,p5] // tension tau = board.create('slider', [[4,3],[9,3],[0.001,0.5,1]], {name:'tau'}); c = board.create('curve', JXG.Math.Numerics.CardinalSpline(p, function(){ return tau.Value();}), {strokeWidth:3});If I read correctly there is a slider in this code but you can see that in the display there is not.

Alfred Wassermann

unread,
Jan 2, 2025, 6:00:32 AMJan 2
to JSXGraph
Oops. Thanks for pointing this out. In fact, the displayed curve was not even a cardinal spline, but a natural spline.

Best wishes,
Alfred

Reply all
Reply to author
Forward
0 new messages