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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T01:46:15+00:00 2026-06-05T01:46:15+00:00

I have a list of 2d points which are the control vertices (Dx) for

  • 0

I have a list of 2d points which are the control vertices (Dx) for a closed uniform cubic B-spline. I am assuming a simple curve (non-self-intersecting, all control points are distinct).

I am trying to find the area enclosed by the curve:

enter image description here

If I calculate the knot points (Px), I can treat the curve as a polygon; then I “just” need to find the remaining delta areas, for each segment, between the actual curve and the straight line joining the knot points.

I understand that the shape (and therefore area) of a Bspline is invariant under rotation and translation – so for each segment, I can find a translation to put the t=0 knot at the origin and a rotation to put the t=1 knot on the +x axis:

enter image description here

I can find the equation for the curve by plugging the points in and re-grouping:

P(t) = (
    (t**3)*(-Dm1 + 3*D0 - 3*D1 + D2)
    + (t**2)*(3*Dm1 - 6*D0 + 3*D1)
    + t*(-3*Dm1 + 3*D1)
    + (Dm1 + 4*D0 + D1)
) / 6.

but I’m tearing my hair out trying to integrate it – I can do

 1
/
| Py(t) dt
/
t=0

but that doesn’t give me area. I think what I need is

 Px(t=1)
/
| Py(t) (dPx(t) / dt) dt
/
x = Px(t=0)

but before I go further, I’d really like to know:

  1. Is this the correct calculation for area? Ideally, an analytic solution would make my day!

  2. Once I find this area, how can I tell whether I need to add or subtract it from the base poly (red vs green areas in the first diagram)?

  3. Are there any Python modules which would do this calculation for me? Numpy has some methods for evaluating cubic Bsplines, but none which seem to deal with area.

  4. Is there an easier way to do this? I am thinking about maybe evaluating P(t) at a bunch of points – something like t = numpy.arange(0.0, 1.0, 0.05) – and treating the whole thing as a polygon. Any idea how many subdivisions are needed to guarantee a given level of accuracy (I’d like error < 1%)?

  • 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-05T01:46:18+00:00Added an answer on June 5, 2026 at 1:46 am
    1. Pick some arbitrary point as pivot p0 (e.g. the origin (0,0))
    2. Pick some point along the curve p1 = (x,y)
    3. Differentiate the curve at that point, to get a velocity v = <vx,vy>
    4. Form a triangle from the three points, and calculate the area. Easiest done with a cross product between the vectors p0p1 and v, and dividing by two.
    5. Integrate this area over t, from 0 to 1.

    The result you get is the area for one segment of the whole curve. Some will be negative, as they face the opposite direction. If you sum up the areas for all segments, you get the area of the whole curve.

    The result is:

    Areai = (31 xi-1 yi + 28 xi-1 yi+1 + xi-1 yi+2 – 31 xi yi-1 + 183 xi yi+1 + 28 xi yi+2 – 28 xi+1 yi-1 – 183 xi+1 yi + 31 xi+1 yi+2 – xi+2 yi-1 – 28 xi+2 yi – 31 xi+2 yi+1) / 720

    If you convert it into matrix form, you get:

    Areai = <xi-1   xi   xi+1   xi+2> · P · <yi-1   yi   yi+1   yi+2>T

    where P is

    [    0   31   28    1]
    [  -31    0  183   28] / 720
    [  -28 -183    0   31]
    [   -1  -28  -31    0]
    

    If the control points are [(0,0) (1,0) (1,1) (0,1)], the resulting areas become:

    [(0,0), (1,0), (1,1), (0,1)] -> 242/720
    [(1,0), (1,1), (0,1), (0,0)] -> 242/720
    [(1,1), (0,1), (0,0), (1,0)] ->   2/720
    [(0,1), (0,0), (1,0), (1,1)] ->   2/720
    

    The sum is 488/720 = 61/90.

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

Sidebar

Related Questions

I have two polygons which are defined by a list of points: x1,y1; x2,y2;
I have a horizontal list which I'm using as a paging control. I have
I have a list of points as shown below points=[ [x0,y0,v0], [x1,y1,v1], [x2,y2,v2].......... [xn,yn,vn]]
I have a list of points moving in two dimensions ( x - and
I have a list of data points (0.2, 0.8, 0.95) that I want to
I have a SharePoint external list that points to a 100,000 record SQL table.
I have a ViewModel class that contains a list of points, and I am
I have a ListView-like control that displays a list of items of various heights.
I have a cell array of strings (which is actually a list of files
I have a MDI window with a datagridview control which is used to display

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.