DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
View Events Video Library
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Migrate, Modernize and Build Java Web Apps on Azure: This live workshop will cover methods to enhance Java application development workflow.

Modern Digital Website Security: Prepare to face any form of malicious web activity and enable your sites to optimally serve your customers.

Kubernetes in the Enterprise: The latest expert insights on scaling, serverless, Kubernetes-powered AI, cluster security, FinOps, and more.

A Guide to Continuous Integration and Deployment: Learn the fundamentals and understand the use of CI/CD in your apps.

Related

  • Building a Dynamic Chat Application: Setting Up ChatGPT in FastAPI and Displaying Conversations in ReactJS
  • Effective Prompt Engineering Principles for Generative AI Application
  • Building a Flask Web Application With Docker: A Step-by-Step Guide
  • Best Ways to Learn Python From Scratch

Trending

  • Navigating the API Seas: A Product Manager's Guide to Authentication
  • What Is SQL Vector Database?
  • Transitioning From Point-To-Point to an API-Centric Approach
  • Generative AI Leverage in Application Modernization
  1. DZone
  2. Culture and Methodologies
  3. Career Development
  4. Cornu's Spiral

Cornu's Spiral

Some of us at DZone develop scientific/engineering/research code. And to people like us, an elegant and simple mathematical function can be a powerful tool. We might not use it today but it's nice to have in the toolbox!

John Cook user avatar by
John Cook
·
Mar. 31, 16 · Opinion
Like (4)
Save
Tweet
Share
3.5K Views

Join the DZone community and get the full member experience.

Join For Free

cornu’s spiral is the curve parameterized by:

x(t) = c(t) = \int_0^t \cos \left( \frac{\pi}{2} s \right) \, ds \\ y(t) = s(t) = \int_0^t \sin \left( \frac{\pi}{2} s \right) \, ds

where c and s are the fresnel functions, sometimes called the fresnel cosine integral and fresnel sine integral. here’s a plot of the spiral.

cornu's spiral

both fresnel functions approach ½ as t → ∞ and so the curve slowly spirals toward (½, ½) in the first quadrant. and by symmetry, because both functions are odd, the curve spirals toward (-½, -½) in the third quadrant.

here’s the python code used to make the plot:

    from scipy.special import fresnel
    from scipy import linspace
    import matplotlib.pyplot as plt

    t = linspace(-7, 7, 1000)
    y, x = fresnel(t)

    plt.plot(x, y)
    plt.axes().set_aspect("equal")
    plt.show()

the scipy function fresnel returns both fresnel functions at the same time. it returns them in the order ( s , c ) so the code reverses the order of these to match the cornu curve.

one interesting feature of cornu’s spiral is that its curvature increases linearly with time. this is easy to verify: because of the fundamental theorem of calculus, the fresnel functions reduce to sines and cosines when you take derivatives, and you can show that the curvature at time t equals π t .

cornu’s spiral was actually discovered by euler. cornu was an engineer who independently discovered the curve much later. perhaps because cornu used the curve in applications, his name is more commonly associated with the curve. at least i’ve more often seen it named after cornu. this is an example of stigler’s law that things are usually not named after the first person to discover them.

philosophy application Python (language) SciPy Engineer Law (stochastic processes) Theorem Euler (software)

Published at DZone with permission of John Cook, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • Building a Dynamic Chat Application: Setting Up ChatGPT in FastAPI and Displaying Conversations in ReactJS
  • Effective Prompt Engineering Principles for Generative AI Application
  • Building a Flask Web Application With Docker: A Step-by-Step Guide
  • Best Ways to Learn Python From Scratch

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: