Euler Spiral - Code For Producing An Euler Spiral

Code For Producing An Euler Spiral

The following Sage code produces the second graph above. The first four lines express the Euler spiral component. Fresnel functions could not be found. Instead, the integrals of two expanded Taylor series are adopted. The remaining code expresses respectively the tangent and the circle, including the computation for the center coordinates.

var('L') p = integral(taylor(cos(L^2), L, 0, 12), L) q = integral(taylor(sin(L^2), L, 0, 12), L) r1 = parametric_plot(, (L, 0, 1), color = 'red') r2 = line(, rgbcolor = 'blue') x1 = p.subs(L = 1) y1 = q.subs(L = 1) R = 0.5 x2 = x1 - R*sin(1.0) y2 = y1 + R*cos(1.0) r3 = circle((x2, y2), R, rgbcolor = 'green') show(r1 + r2 + r3, aspect_ratio = 1, axes=false)

The following is Mathematica code for the Euler spiral component (it works directly in wolframalpha.com):

ParametricPlot[ {FresnelC] t]/Sqrt], FresnelS] t]/Sqrt]}, {t, -10, 10}]

Read more about this topic:  Euler Spiral

Famous quotes containing the words code, producing and/or spiral:

    Wise Draco comes, deep in the midnight roll
    Of black artillery; he comes, though late;
    In code corroborating Calvin’s creed
    And cynic tyrannies of honest kings;
    He comes, nor parlies; and the Town, redeemed,
    Gives thanks devout; nor, being thankful, heeds
    The grimy slur on the Republic’s faith implied,
    Which holds that Man is naturally good,
    And—more—is Nature’s Roman, never to be
    scourged.
    Herman Melville (1819–1891)

    There are three major offenses against filial piety of which not producing an heir is the worst.
    —Chinese proverb.

    Mencius.

    What is art,
    But life upon the larger scale, the higher,
    When, graduating up in a spiral line
    Of still expanding and ascending gyres,
    It pushes toward the intense significance
    Of all things, hungry for the Infinite?
    Art’s life,—and where we live, we suffer and toil.
    Elizabeth Barrett Browning (1806–1861)