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 7724507
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T04:42:24+00:00 2026-06-01T04:42:24+00:00

I have UIBezierPath in the application. When the finger touch on the path is

  • 0

I have UIBezierPath in the application. When the finger touch on the path is recognized i want to subdivide that curve and store that two curves into two different objects. So touch co-ordinates will work as end-point for one curve and start-point for second curve.

Again if i touch on any of this curve, that curve will subdivide into two other curves and so on.

I searched for this a lot. But could not find any good solution.

Also I do not have idea if there is any other way to do this. Any help would be greatly appreciated.
Thanks

  • 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-01T04:42:26+00:00Added an answer on June 1, 2026 at 4:42 am

    You can do this with the de Casteljau algorithm. If you’re really into the maths of it check out the Wikipedia page here, but if you’re not that into the maths it will probably confuse you more than anything when it’s actually quite simple…

    1. Calculate the parameterized value along the curve (between 0.0 and 1.0) of the touch. To do this you can calculate a set of points at regular intervals (0.1, 0.2, 0.3 etc.) and then find the two closest points to your touch points and repeat the parameterization between these points if you want more accuracy (0.21, 0.22, 0.23, etc.). This will result in a number between 0.0 and 1.0 along the curve segment representing where you touched.
    2. This bit is difficult to explain in text, but there’s a good visualization on this page about half-way down under the heading Subdividing a Bezier curve. Use the slider under the diagram to see how it works, here’s my textual explanation: You need to subdivide the straight lines between the control points of your curve segment proportional to the parameterized value you calculated in step 1. So if you calculated 0.4, you have four points (A, B, C, D) plus the split-point on the curve closest to your touch at 0.4 along the curve, we’ll call this split-point point S:
      • Calculate a temporary point T which is 0.4 along the line B→C
      • Let point A1 be equal to point A
      • Calculate point B1 which is 0.4 along the line A→B
      • Calculate point C1 which is 0.4 along the line B1→T
      • Let point D1 be equal to the split point S
      • Let point D2 be equal to point D
      • Calculate point C2 which is 0.4 along the line C→D
      • Calculate point B2 which is 0.4 along the line T→C2
      • Let point A2 be equal to the split point S

    Now you have two new Bezier curves, the first using control points A1, B1, C1, D1 and the second using A2, B2, C2, D2.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have made an application which draws a number of curves, using UIBezierPath. Now
Here's what I want to do: I have a UIBezierPath and I want to
I have a UIBezierPath inside a view. I want to show an alert when
I have a CAShapeLayer that takes his shape from path. This creates a layer
I have a view that's rendering a PDF into a CATiledLayer. This is working
I use UIBezierPath for finger painting (my app). I create it using path =
Have you used VS.NET Architect Edition's Application and System diagrams to start designing a
Have a n-tire web application and search often times out after 30 secs. How
I have a UIBezierPath. I wish to get an array of all the points
In one of my methods i have this code: -(void)myMethod { UIBezierPath *circle =

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.