View Full Version : Curve Algorithm

i ma looking for a wayh to draw a curve in OpenGL. but not any Curve.

i have to start with a polyline and find an algorithm to trasform it to a curve.

martin_marinov

05-02-2001, 01:50 AM

Hi

Can you be more specific what you exactly have to do? The most common way to generate a curve from a a set of control points is using bezier curve, spline curve, subdivision, etc... What kind of curve you need - one which goes through the control points, or one that is in their convex hull...? Closed, open? Just be more specific...

Regards

Martin

KurtCob

05-02-2001, 04:30 AM

Hi Martin,

Do you have some godd algorithm to generate cubic splines ?

Tnks

Best regards

Kurt

martin_marinov

05-02-2001, 07:19 AM

Originally posted by KurtCob:

Hi Martin,

Do you have some godd algorithm to generate cubic splines ?

Tnks

Best regards

Kurt

Yes, I know few algoritms and have written some code for splines (arbitrary degree). I personaly specialize in subdivision methods. However, I have written also the blossom algorithm some time ago.

What you exactly need? (interpolation/aproximation, closed/open, rational)?

Martin

[This message has been edited by martin_marinov (edited 05-02-2001).]

KurtCob

05-02-2001, 02:27 PM

Interpolation and extrapolation.

Tnks

Best regards

Kurt

martin_marinov

05-02-2001, 11:38 PM

Hi,

You may download the "Curves and Surfaces in CAGD" demo from my site. http://medo.dir.bg

It is rather old and poor written, but you may get the basic ideas for CAGD from there. Look at 6Pts Scheme algorithm - it is subdivision approach to C2 interpolation (the limit curve is cubic interpolation spline curve). My Lagrange interpolation is buggy, so you may not look at it..

If you need more robust approach, e-mail me, I'll send you some from my recent code.

CAGD (Computer Aided Geometric Design) is a subarea of CAD which is specialized mainly in two basic areas:

1. Math. represenatations & algorithms for curves and surfaces used in CAD/CAM/CAE (calculation, visualization, etc...)

2. Geometric modeling - math. represantation, algoritms, data structures, objects, relations used to represent CAD models.

If you are really interested in the area, you may really take a look at a good book ( like the one I suggested ...)

Hope this helps

Martin

Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.