Length of arc of spiral lines
Posted: Mon Jan 07, 2008 4:10 pm
Everybody know how to calculate the lengh of a piece or circunference.
But when dealing with spirals there is another very different story.
After looking for length of arc of Arquimedean spirals all over web i didn't find it, so i had to solve the integral myself and here it is...Anyway, i would be grateful if anyone here, @srod or so could simplify the expression:
coz i am almost sure it can be simplified, over all if we know DeltaF=F-F0.
But when dealing with spirals there is another very different story.
After looking for length of arc of Arquimedean spirals all over web i didn't find it, so i had to solve the integral myself and here it is...
Code: Select all
;Calculations of lengths of arcs of spiral lines in a plane:
;Psychophanta (Albert) Jan 2008 (Free for use, but greeting me before, for example via email :)
;La longitud del arco de espiral logaritmica del tipo R=R0*e^(b*F) (siendo R el radio, R0 el radio inicial, e el numero e, b un numero real constante y F el angulo),
;es Sqr(b*b+1)/b*(R-R0)
;La longitud del arco de espiral logaritmica del tipo R=R0*b^F (siendo R el radio, R0 el radio inicial, b un numero real constante y F el angulo),
;es Sqr(Log(b)*Log(b)+1)/Log(b)*(R-R0)
;La longitud del arco de espiral de Arquimedes del tipo R=b*F (siendo R el radio, R0 el radio inicial, b un numero real constante, F el angulo y F0 el angulo inicial),
;es b/2*((F*Sqr(1+F*F)+ASinh(F))-(F0*Sqr(1+F0*F0)+ASinh(F0))) o bien: b/2*((R/b*Sqr(1+R*R/b/b)+ASinh(R/b))-(R0/b*Sqr(1+R0*R0/b/b)+ASinh(R0/b)))
Macro ASinh(x)
Log(x#+Sqr(x#*x#+1))
EndMacro
Macro exp(x)
(Pow(2,x#/Log(2)))
EndMacro
Macro ArchimedeanSpiralArcLengthByAngle(F0,F,b)
;Length of Arc of an Archimedean spiral, i.e. spiral polar equation form: R=b*F, where R is the Radius, b is a real number, F is the angle. F0 is an angle lower than F.
(b#/2*((F#*Sqr(1+F#*F#)+ASinh(F#))-(F0#*Sqr(1+F0#*F0#)+ASinh(F0#))))
EndMacro
Macro ArchimedeanSpiralArcLengthByRadius(R0,R,b)
;Length of Arc of an Archimedean spiral, i.e. spiral polar equation form: R=b*F, where R is the Radius, R0 is a radius lower than R, b is a real number, and F is the angle.
(b#/2*((R#/b#*Sqr(1+R#*R#/b#/b#)+ASinh(R#/b#))-(R0#/b#*Sqr(1+R0#*R0#/b#/b#)+ASinh(R0#/b#))))
EndMacro
Macro LogarithmicSpiralArcLengthByRadius(R0,R,b)
;Length of Arc of a Logarithmic spiral with polar equation form: R=R0*exp(b*F), where R is the Radius, R0 is the initial radius, b is a real number, F is the angle. Notice that F0 here (i.e. when R=R0) is 0.
(Sqr(b#*b#+1)/b#*(R#-R0#))
EndMacro
;TEST:
b.f=1
F0.f=0
F.f=#PI
R0.f=0
R.f=1
Debug ArchimedeanSpiralArcLengthByAngle(F0,F,b)
Debug ArchimedeanSpiralArcLengthByRadius(R0,R,b)
Debug LogarithmicSpiralArcLengthByRadius(R0,R,b)
Code: Select all
(F#*Sqr(1+F#*F#)+ASinh(F#))-(F0#*Sqr(1+F0#*F0#)+ASinh(F0#))