Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Using Bézier Polygon to draw an arc

Please login with a confirmed email address before reporting spam

Hello,

I am trying to draw a 2D closed non-intersecting geometry that consists of lines and arcs (portion of a circle). From my understanding, using the Bézier Polygon would be appropriate for this.

However, I am having a hard time figuring out how to define the arcs. For a quadratic segment, COMSOL requires three control points and three weights as inputs. For the control points I put in the two endpoints of the arc, as well as the center point (that lies on the arc and is equal arc lengths from the two endpoints). I set the weights to 1, 1/sqrt(2), and 1. However, this doesn't give the arc I desire.

Can anyone explain how to calculate the control points and three weight points, if I'm starting with the equation of the circle the arc lies on + the two end points of the arc? Thank you for your help.


1 Reply Last Post Apr 16, 2021, 4:42 a.m. EDT
Magnus Ringh COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 4 years ago Apr 16, 2021, 4:42 a.m. EDT

Hello Vivek,

If you want to create a circular arc using a quadratic Bézier polygon, the weigths 1, 1/sqrt(2), and 1 are correct, but the control points should be three corners of a square, such as (0, 0), (0,1), and (1,1). The first and third control points are the endpoints of the Bézier curve. The second control point determines the tangent directions at the endpoints.

Best regards,

Magnus Ringh

Hello Vivek, If you want to create a circular arc using a quadratic Bézier polygon, the weigths 1, 1/sqrt(2), and 1 are correct, but the control points should be three corners of a square, such as (0, 0), (0,1), and (1,1). The first and third control points are the endpoints of the Bézier curve. The second control point determines the tangent directions at the endpoints. Best regards, Magnus Ringh

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.