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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T15:12:55+00:00 2026-06-11T15:12:55+00:00

I created this class in actionscript, it returns a given point of the bezier.

  • 0

I created this class in actionscript, it returns a given point of the bezier. And what I am trying to achieve is to get the angle of the current point. I searched on the internet but I couldn’t found much. How can I do this?

public static function quadraticBezierPoint(u:Number, anchor1:Point, anchor2:Point, control:Point):Point {
    var uc:Number = 1 - u;
    var posx:Number = Math.pow(uc, 2) * anchor1.x + 2 * uc * u * control.x + Math.pow(u, 2) * anchor2.x;
    var posy:Number = Math.pow(uc, 2) * anchor1.y + 2 * uc * u * control.y + Math.pow(u, 2) * anchor2.y;
    return new Point(posx, posy);
}
  • 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-11T15:12:56+00:00Added an answer on June 11, 2026 at 3:12 pm

    Given:

    • control points p0, p1, p2
    • time t

    point B is the point on the quadratic bezier curve described by p0, p1, and p2 at time t.

    q0 is the point on the linear bezier curve described by p0 and p1 at time t.

    q1 is the point on the linear bezier curve described by p1 and p2 at time t.

    The line segment between q0 and q1 is tangent to your quadratic bezier curve at point B.

    Therefore, the angle of the bezier curve at time t is equal to the slope of the line segment between q0 and q1.

    Wikipedia has a lovely gif demonstrating this. The black dot is point B, and the endpoints of the green line segment are q0 and q1.

    The principle is identical for bezier curves of higher dimensions. To find the angle of a point on an N-degree bezier curve, find q0 and q1, which are the points on the N-1-degree bezier curves for control points [p0,p1,…,p(N-1)] and [p1, p2,…,pN]. The angle is equal to the slope of the q0-q1 line segment.

    In pseudocode:

    def bezierCurve(controlPoints, t):
        if len(controlPoints) == 1:
            return controlPoints[0]
        else:
            allControlPointsButTheLastOne = controlPoints[:-1]
            allControlPointsButTheFirstOne = controlPoints[1:]
            q0 = bezierCurve(allControlPointsButTheLatOne, t)
            q1 = bezierCurve(allControlPointsButTheFirstOne, t)
            return (1-t) * q0 + t * q1
    
    def bezierAngle(controlPoints, t):
        q0 = bezierCurve(controlPoints[:-1], t)
        q1 = bezierCurve(controlPoints[1:], t)
        return math.atan2(q1.y - q0.y, q1.x - q0.x)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For example I now created a this tiny class: public static class FileSystemInfoComparers<T> where
This class extends Thread and once it is created, the thread is started. This
I've created a class that extends Application. This class starts a service when the
I created a module to add some Extension Methods to a Class. This Class
I created a class with properties like this public class Dependencies { public string
I created a class that's something like this: public class MovieTheaterList { public DateTime
Say I've got a domain model created from C# classes like this: public class
I have a db that is created like this... public class DataBaseManager extends SQLiteOpenHelper{
I have created my own Attached Property like this: public static class LabelExtension {
I have created a datagrid in ActionScript class and I want to add an

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.