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

The Archive Base Latest Questions

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

I have a vector drawing app where users can draw lines using multiple quadratic

  • 0

I have a vector drawing app where users can draw lines using multiple quadratic bezier curves. A curve, for example, could have 5 points – points 0-2 for a quadratic bezier curve, and points 2-4 form another. If the slope @ the end of the first bezier curve doesn’t equal the slope at the beginning of the 2nd bezier curve, the curve isn’t smooth.

I want to include a “smooth” button, which users can click to smooth the lines automatically. I want to keep the overall MSE between original and smoothed curves small, as opposed to making the slopes match perfectly. However, 100% accuracy isn’t necessary as it’s a drawing program – speed is more important. Are there any good algorithms that can do this? I can’t seem to find any references for this.

  • 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-01T00:24:43+00:00Added an answer on June 1, 2026 at 12:24 am

    If you want to maintain the overall shape of the line and make the corners round you could:
    Create new points around each corner :

    for instance in the case you describe there will be one corner at P2

    We could use any epsilon < 0.5 for this purpose
    Lets use 0.1
    So we have P1.9, P2.1.

    P1.9.x = (9 * P2.x + P1.x)/10
    P1.9.y = (9 * P2.y + P1.y)/10
    
    P2.1.x = (9 * P2.x + P3.x)/10
    P2.1.y = (9 * P2.y + P3.y)/10
    

    You could do:

    Bezier(P0, P1, P1.9);
    Bezier(P1.9, P2, P2.1);
    Bezier(P2.1, P3, P4);
    

    instead of doing:

    Bezier(P0, P1, P2);
    Bezier(P2, P3, P4);
    

    I hope this new answer helps.. otherwise I would like to see an image describing the kind of line you have, and the result you would like to see.(this would help filter out answers that do not match the criteria)

    Old answer:
    The users input 3 points for each bezier curve?

    If you wish to make a smooth line you could do the following :

    1.Create new interpolated points :

    p0.5[x] = (p0[x] + p1[x]) / 2;
    p0.5[y] = (p0[y] + p1[y]) / 2;
    

    1.b do the same for p1.5, p2.5… where p(N.5) uses p(N) and p(N+1)

    2.Instead of drawing:

    Bezier(p0, p1, p2);
    Bezier(p2, p3, p4);
    

    Draw

    Line(p0, 0.5);
    Bezier(p0.5, p1, p1.5);
    Bezier(p1.5, p2, p2.5);
    Bezier(p2.5, p3, p3.5);
    Line(p3.5, p4);
    

    I hope this is easy to understand and helpful.

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

Sidebar

Related Questions

I have a program that draws some vector graphics using System.Drawing and the Graphics
I have a very simple AS3 app that draws few circles using drawing api
in clojure i have vector [myfn1 myfn2 myfn3] how can i call functions named
I like using the vector drawing feature of Expression Blend to create icons. That
I have a vector of type Fruit. I can insert different types of fruits
I have a visualizing module for 2D vector graphics. All calls to drawing API
I'm trying to make a vector drawing application using OpenGL which will allow the
I have a vector that I want to insert into a set . This
I have a vector-like class that contains an array of objects of type T
I have a vector with 1000 nodes if(count + 1 > m_listItems.capacity()) m_listItems.reserve(count +

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.