Jump to content
Zhen Cheng

represent a circle with F-spline

Recommended Posts

Hi,

I wonder if it is possible to come up with a F-spline curve that is exactly the same as a circle? Ideally this circle can be represented by 5 points with starting point and end_point overlapped with each other. The optimization I would like to do is to move p1 and p3 in x-direction, while the tangential direction at P1 and P3 is kept horizontal, and keep the area as constant.

Is F-spline the best option to achieve this? Would you help me to set up a quick example?

 

Best,

Zhen

circle_contrtol.png

Share this post


Link to post
Share on other sites

I have tried a simpler approach as a first step: Use delta-shift to deform the circle into eclipse, however this seems to not work as I expected, as shown below, the circle is not deformed into an eclipse, it seems that not all the points on the circle are shifted.

Could you help me to find out why this does not work?

image.thumb.png.22964c4a8335a1ece862c5348eb3d538.png

 

Share this post


Link to post
Share on other sites

Hi Zhen,

just a small addition in case someone else stumbles across your question. For an actual (perfect) circle you can not use an F-Spline. Behind the scenes an F-Spline is a B-Spline curve, optimized with respect to fairness and constrained at start, end, start-tanget, end-tangent, curvature, enclosed area, etc... That means, if you set the area as the area of a circle and also match the tangent at start and end you will get something that is really close to a circle, but not a perfect circle.

For an actual (quarter of a) circle, you need a NURBS curve with 3 control points. The weight of the center point needs to be set to 0.5*sqrt(2).

image.thumb.png.e509c6daed44a8a8ed5eaed754ec8bed.png

In order to keep the area constant while moving points 1 and 3 (in your picture), I suggest a delta shift and a brent (you can search the forum for nested optimization to see how the brent algorithm can be used to adjust the area to a certain target value).

Cheers,

Heinrich

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...