Polinomial Curve and C-Spline


Still continuing on airfoil parameterization, after finishing my posting about Bezier Curve yesterday, I googled a little bit and find more about curve. So, I decided to code more about curve. I know it is not directly related to aerodynamics, but I’m still gonna put it in my MATLAB Aerodynamics Toolbox page.

The first code that I added is the code for generating polinomial curve. Yup, polinomial curve is probably the most simple type of curve. It can be formulated with simple polinomial equation. So, with several vertexes on the curve given, you can calculate the polinomial coefficient and plot the complete curves. Here is one result of polinomial that I enerated with my code.

The resulting polinomial curve

The other code that I created is the code for cubic Hermite curve. This curve is formed from several control points and the curve’s tangent at each control point. So, I thought this kind of curve will be useful for creating airfoil surface and I code it. It was pretty exciting also to see how the tangent at a control point can change the shape of the curve. Here are some result of my cubic Hermite code (See how the tangent of the curve affect the shape of the curve).

The resulting cspline curve with 0deg tangent at the second control point

The resulting cspline curve with 45deg tangent at the second control point

The resulting cspline curve with 90deg tangent at the second control point

The resulting cspline curve with 135deg tangent at the second control point

The resulting cspline curve with 180deg tangent at the second control point

The resulting cspline curve with 225deg tangent at the second control point

The resulting cspline curve with 270deg tangent at the second control point

The resulting cspline curve with 315deg tangent at the second control point

I also notice that this curve is the one used in Adobe Illustrator. So, I thought I’m gonna build a GUI code for this, so that I can draw the curve by mouse click and reminds me again about building GUI with MATLAB. I hope it will be done soon. In the meanwhile, check out GeneratePolyCurve.m and GenerateCSpline.m in my MATLAB Aerodynamics Toolbox page.:D

Regards,

0X_R

This entry was posted in Uncategorized and tagged , . Bookmark the permalink.

2 Responses to Polinomial Curve and C-Spline

  1. Karthik says:

    Hi,

    Can you please send me bezier curve code for airfoil parametrization through mail to the above e-mail address, as almost all the file sharing sites are banned in my organization.

    Regards,

    Karthik

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s