Message Boards Message Boards

GROUPS:

SplineToLine function from David Park's "Presentations" add-on?

Posted 1 month ago
219 Views
|
1 Reply
|
2 Total Likes
|

What is the definition of the function SplineToLine that was at one time included in David Park's Presentations add-on application?

The current version of that proprietary add-on, which I have, does not seem to include that function, although it has a commented-out reference to it...

DeclarePackage["PresentationsD`SplineDrawing`",{"DrawIndexedPoints","SplineToLine"}];

... but I find no SplineDrawing package. And the "Free Presentations" version of the add-on, which is more or less a "run-time" version of the full add-on and omits documentation, contains no reference whatsoever in its packages to SplineToLine.

Or, can you tell me whether the function was superceded by a similar function with a different name, or whether somehow BSplineCurve or another built-in Mathematica function does the same thing?

Note: The function is used in the paper "Visualizing complex functions with the Presentations application," by David Park and myself, which appears in The Mathematica Journal vol. 11 (2009). The function is used in the form, e.g.,

circuit1 = SplineToLine[{{0.342528, -0.32536}, {0.369328, 0.492018}, {0.020937, 
    1.3094}, {-0.809841, 1.2826}, {-1.60042, 
    0.43842}, {-2.2436, -0.633552}, {-2.4044, -1.47773}, {-2.458, \
-2.20131}, {-1.52002, -2.5497}, {-0.421251, -2.05391}, {0.181733, \
-1.08914}, {0.342528, -0.32536}}, Cubic, 40];

and that is in turn used within a graphic expression in the form:

Arrow[circuit1]

I note that in Park's package DrawGraphics, which was a predecessor to part of Presentations, the SplineToLine function was defined by:

SplineToLine[pts : {{_, _}, {_, _} ..}, mode_, 
  numpts_Integer?Positive] :=
   Module[{sfun, n = Length[pts] - 1},
      sfun = SplineFit[pts, mode];
      Line[Table[sfun[t], {t, 0, n, n/(numpts - 1)}]]
      ]

But that used the function SplineFit, formerly supplied with Mathematica but no longer included. So a substitute for SplineFit would suffice here. (See also https://mathematica.stackexchange.com/questions/193681/how-reproduce-old-splinefit-function.)

Posted 1 month ago

As informed by "MarcoB" (https://mathematica.stackexchange.com/questions/193681/how-to-reproduce-old-splinefit-function), the Splines package is still around and must be loaded explicitly to get the old SplineFit function. But given that the package seems headed toward obsolescence, I still want to know what function currently built into the kernel would reproduce the effects of SplineFit.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract