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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:27:45+00:00 2026-05-26T00:27:45+00:00

I want to make a smoother line which I draw by getting the points

  • 0

I want to make a smoother line which I draw by getting the points on touch.
The line is a drawing, but with corners. I am using quad function to draw the curve, but the curve sometimes has corners in it when the points are near to each other. What could be done to figure out the solution for this problem?

  • 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-05-26T00:27:45+00:00Added an answer on May 26, 2026 at 12:27 am

    I deliberately didn’t answer this question earlier, because you are using Android API and Quad function, and i thought there would be a way to increase the no. of points in the Quadratic Bezier Curve it is drawing. I did a google, and didn’t find anything myself, but i was waiting for someone to post a trick using Android API.

    It seems that the smoothness will have to be achieved manually by drawing a higher resolution Bezier Curve using code:
    Quad function is drawing the Quadratic Bezier Curve, here is a good link for algorithm to draw Bezier Curves, all you have to do is to increase the no. of points in your curve:
    Formula of Quadratic Bezier Curve is: `

    [x,y]=(1 – t) 2P0 + 2(1 – t)tP1 + t2P2

    `And you have to make t smaller to make the loop iterate more, so there will be more points and you’ll be able to draw a smoother curve.

    Here is the code that is interesting (I have slightly changed it to make it simpler for me to explain):

    double t = 0;
    
    Point prevPoint = CalculateBezierPoint(t, p0, p1, p2, p3);
    for(int i = 0; i <= 100; i++)
    {
      Point nextPoint = CalculateBezierPoint(t, p0, p1, p2, p3); //see this part from the link i have given
    
      //Draw line from previous point to next point.
      prevPoint = nextPoint;
      t = t + (1/100)    
    }
    

    To make a smoother curve, increase the number of segments in the for loop (1000 etc, experiment with it), also change this line t = t + (1/100) (divide the value by the larger no. of segments you choose, the i

    Use this solution as a last option, if you find a way to do it using Android API, please post it here as well, and if someone else has a way to do it, please post, i am waiting for answers.

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

Sidebar

Related Questions

I am using Take() function with linq query. But I want to remove Take()
I want make datetimepicker in my project. Using jquery how it is possible? I
I am traversing a HTML document using javascript DOM. I want make a list
I want to make an entity that has an autogenerated primary key, but also
I want make sql query which will insert values from one table to another
I want make a function to include in my code to calculate percentages. In
I want make a xslt transformation to xsl-fo but I´m not really sure that
i want make function like that function(data){ } i want this data as this
I'm using HRD because I want make changes to multiple entities within a single
I am making a drawing application and I want make my code more readable

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.