Skip to content

Latest commit

 

History

History
33 lines (22 loc) · 768 Bytes

README.md

File metadata and controls

33 lines (22 loc) · 768 Bytes

splinecloud-matlab

SplineCloud client library for MATLAB

Example

clear variables; clear all; clc;

addpath(genpath('splinecloud-matlab'));

curveId = 'spl_BUDRcYh1Mbvy';

spline = fetchCurve(curveId);

[ctrlPoints, knots] = extractNurbsParams(spline);

nurbs = nrbmak(ctrlPoints, knots);

xPoints = linspace(0, 5, 100);
xLength = length(xPoints);
yPoints = zeros(1, xLength);

for i = 1:xLength
    yPoints(i) = getYByX(nurbs, xPoints(i));
end

plot(xPoints, yPoints);

alt text

Uses: