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 for, code, producing and/or spiral:

    Many people will say to working mothers, in effect, “I don’t think you can have it all.” The phrase for “have it all” is code for “have your cake and eat it too.” What these people really mean is that achievement in the workplace has always come at a price—usually a significant personal price; conversely, women who stayed home with their children were seen as having sacrificed a great deal of their own ambition for their families.
    Anne C. Weisberg (20th century)

    Motion or change, and identity or rest, are the first and second secrets of nature: Motion and Rest. The whole code of her laws may be written on the thumbnail, or the signet of a ring.
    Ralph Waldo Emerson (1803–1882)

    Syntax is the study of the principles and processes by which sentences are constructed in particular languages. Syntactic investigation of a given language has as its goal the construction of a grammar that can be viewed as a device of some sort for producing the sentences of the language under analysis.
    Noam Chomsky (b. 1928)

    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)