Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7852467
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T19:25:30+00:00 2026-06-02T19:25:30+00:00

I have a parameterized 2D curve: (x,y) = f(t) The function f is arbitrary

  • 0

I have a parameterized 2D curve:
(x,y) = f(t)

The function f is arbitrary but differentiable and hence I can figure out the differential arc length ds along the curve at any point using standard formulas. I can also get the total arc length S(t) from the beginning to any point on the curve by integrating the differential arc length formula numerically. I can control the accuracy of the calculation.

I want to find locate the point (x,y) that has a total arc length S = D from the beginning of the curve. Even better if the implementation were in python. I will be doing this many times, and it is part of a computational application where I need tight control of accuracy and some confidence of convergence.

I don’t know if root finding is the best approach, but my question is the equivalent of a root finding problem for g(t) = S(t) – D where the function g(t) is not evaluated exactly because S(t) isn’t. Inexact function evaluation messes not only with accuracy but also the monotonicity of g(t). I tried doing tight numerical integration from the outset but it takes forever. I’m pretty sure to converge to my required tolerance the root finding algorithm would have to lazily control the integration accuracy as it proceeded, demanding sloppy evaluation at the outset and increasing accuracy as the root algorithm converges.

Is there such a thing readily available? Is there an alternative clever way to do it?

Appreciate the help

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T19:25:31+00:00Added an answer on June 2, 2026 at 7:25 pm

    Can you post some code, and tell us what’s wrong with it?

    Here is my version that calculate the t where S(t) == D:

    from scipy.integrate import quad
    from scipy.optimize import fsolve
    from math import cos, sin, sqrt, pi
    
    def circle_diff(t):
        dx = -sin(t)
        dy = cos(t)
        return sqrt(dx*dx+dy*dy)
    
    def sin_diff(t):
        dx = 1
        dy = cos(t)
        return sqrt(dx*dx+dy*dy)
    
    def curve_length(t0, S, length):
        return quad(S, 0, t0)[0] - length
    
    def solve_t(curve_diff, length):    
        return fsolve(curve_length, 0.0, (curve_diff, length))[0]
    
    print solve_t(circle_diff, 2*pi)
    print solve_t(sin_diff, 7.640395578)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Normally the parameterized SQL works great for CRUD, but I have one instance where
I have parameterized constructor for the master page and no default constructor. How can
I have some code which utilizes parameterized queries to prevent against injection, but I
I have a pretty straightforward function that takes a parameterized data type and returns
How can I define a parameterized List field using Javassist? I have tried the
I have some classes which are parameterized via their constructor. I need to provide
Have someone tried out DeCAL in Delphi 2009? I'm thinking about upgrading from 2007,
I have a parameterized class. I would like to get the name of the
I have a parameterized SQL query targetted for SQL2005 which is dynamically created in
VB6 classes have no parameterized constructors. What solution have you chosen for this? Using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.