curvature to cartesian

version 1.0.0.0 (2.05 KB) by
with this function you can convert a (curvature- curve length) relation to Cartesian coordinates.

Updated 31 Mar 2016

%This function it is used to transform a (curvature-curve length) relation
%to cartesian coordinates.k=f(s)->x=x(t),y=y(t)
%usage:[xo yo]=curv2cart(a,b,c,d,e,l,p)
%'a','b','c','d' and 'e' are part of the polynomial
%relation : k=a*s^4+b*s^3+c*s^2+d*s+e;
%l: length of the curve in points
%p: precision.Distance between two points.
%
%EXAMPLES:
%
%curv2cart(0,0,0,0,c,10,0.001); %plots a circle of radius c
%curv2cart(0,0,0,0,c,10,0.1); %plots a badly calculated circle due to low
%precision
%
%Interesting and reason for existance of this function, are the polynomial
%spirals:
%
%curv2cart(0,0,0,1,0,10,0.001); %k=s
%curv2cart(0,0,1,0,0,10,0.001); %k=s^2
%curv2cart(0,0,1,0,-2.19,10,0.001); %k=s^2-2.19
%curv2cart(0,0,1,0,-4,10,0.001); %k=s^2-4
%curv2cart(0,0,1,0,1,10,0.001); %k=s^2+1
%curv2cart(5,0,-18,0,5,4,0.001); %k=5s^4-18s^2+5
%
%curv2cart, creates some cool pseudofractals:
%
%curv2cart(0,0,2,0,-1,50,0.01);

Cite As

NeuralDip (2021). curvature to cartesian (https://www.mathworks.com/matlabcentral/fileexchange/23122-curvature-to-cartesian), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2007b
Compatible with any release
Platform Compatibility
Windows macOS Linux