How to calculate the clothoid (egg-curve) between two circles in the same direction

513 Views Asked by At

I am looking for a specific solution to the problem of fitting a clothoid between two circles. I need this to be able to draw a horizonal alignment of a railway track in this case, but i am interested in a general answer.

I am using this set of parametrised equations based on the series expansion of the integrals:

$x = l[1-\frac{l^4}{40R^2L^2}+\frac{l^8}{3456R^4L^4}-...]$

$y = \frac{l^3}{6RL}[1-\frac{l^4}{56R^2L^2}+\frac{l^8}{7040R^4L^4}-...] $

This is for a simple clothoid curve with one end tangent to a line.

How can i modify this to work for an egg-curve clothoid between two circles like this:

Egg-shaped circle-clothoid-circle arrangement

Given data with coordinates like <Start>y x</Start>:

<Curve staStart="5511.649553514492254" rot="ccw" length="217.591659954692659" radius="214.099999999936642" chord="208.347376508606033" dirStart="2.562994755022355" dirEnd="1.546686207826109">
                <Start>1212557.938473152928054 117710.755443245696370</Start>
                <Center>1212675.019185118377209 117890.006431766363676</Center>
                <End>1212460.981410037493333 117895.167908144489047</End>
            </Curve>
            <Spiral staStart="5729.241213469184913" constant="121.278" radiusStart="214.099999999934681" radiusEnd="304.099999999950853" spiType="clothoid" length="20.331836056740030" rot="ccw" dirStart="1.546686207826109" dirEnd="1.465774582596058">
                <Start>1212460.981410037493333 117895.167908144489047</Start>
                <PI>1212461.212431021034718 117904.747961315471912</PI>
                <End>1212462.340392005164176 117915.448706869457965</End>
            </Spiral>
            <Curve staStart="5749.573049525924944" rot="ccw" length="300.707717802304614" radius="304.100000000030491" chord="288.605084787654789" dirStart="1.465774582596058" dirEnd="0.476929736156669">
                <Start>1212462.340392005164176 117915.448706869457965</Start>
                <Center>1212764.764887237455696 117883.570270842697937</Center>
                <End>1212625.166658619651571 118153.735302937464439</End>
            </Curve>