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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T07:56:45+00:00 2026-06-10T07:56:45+00:00

I am trying to optimize a bezier curve implementation by using the formula used

  • 0

I am trying to optimize a bezier curve implementation by using the formula used in this wikipedia article. I have a horribly slow implentation now but at least it should be accurate. Using the following:

p0 = (0, 256) //Violet dot
p1 = (70, 223) //Green dot
p2 = (24, 472) //Blue dot
p3 = (255, 256) //Yellow dot
t = 0.5

Drawn with my current code below, the point at T = 0.5 is (67.125, 324.625)

enter image description here

Trying the formula for the X-axis, I do a calculation like this:

var x = Math.Pow(1 - t, 3) * p0.X + 3 * Math.Pow(1 - t, 2) * t * p1.X + 3 
        * (1 - t) * Math.Pow(t, 2) * p2.X + Math.Pow(t, 3) + p3.X;

But this gives me an X coordinate of 290.375 which is obviously not right. What am I missing here?

  • 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-10T07:56:46+00:00Added an answer on June 10, 2026 at 7:56 am

    Duh! Looking at my own question now, I see the obvious. The last bit Math.Pow(t, 3) + p3.X; should have been Math.Pow(t, 3) * p3.X;. Now it works.

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

Sidebar

Related Questions

I'm trying to optimize my code using Neon intrinsics. I have a 24-bit rotation
I'm trying to optimize query performance and have had to resort to using optimizer
I am trying to optimize this query as good as possible,but still i am
I'm currently trying to optimize my program. I have a large database which consists
I`m having trouble trying to optimize this query with OVER (PARTITION BY ...) because
I'm trying to optimize my C++ code. I've searched the internet on using dynamically
I have been trying to optimize some code which handles raw pixel data. Currently
I have been trying to optimize an ASP.NET C# application for a few days
I'm trying to optimize code that I have. In order to do that, I
I'm trying to optimize this query because the DB it runs against is huge

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.