Bezier line

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Markus
Newbie
Newbie
Posts: 23
Joined: Tue Nov 23, 2004 5:00 am
Location: Austria
Contact:

Bezier line

Post by Markus » Wed Jan 12, 2005 3:29 pm

I am using a bezier line in my chat, and it works fine so far.

But i am wondering while the bezier line always hits every fourth data point. Is this a wanted feature of your bezier-function?
Or can I change this behaviour.

Thanks a lot, Markus.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Jan 13, 2005 1:05 pm

Hi Markus,

That's not true, the bezier series are based on Bezier Curve algorithmand the variables under it can't be changed. The hits depend on your series points, you can try adding values to your bezier series using FillSampleValues and you will see that it's not allways 4.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Markus
Newbie
Newbie
Posts: 23
Joined: Tue Nov 23, 2004 5:00 am
Location: Austria
Contact:

Post by Markus » Thu Jan 13, 2005 1:53 pm

I have included a bezier line into my chart.

Then I started the TeeChart Editor and changed the DataSource of the bezier line to "Random".
Then I pressed several times "Apply" (with a number of sample values of 25).

The resulting line always goes exactly through the points: 1, 4, 7, 10, 13, ...

I understand that a cubic Bezier curve is defined by four points, but for my understandign this does not mean that the calculation hast to be done in this interval.

following link includes nice java applets where you can see how to blend more than four data points together - resulting in a bezier curve over all points.

http://www.doc.ic.ac.uk/~dfg/AndysSplin ... ziers.html


Thanks for your assistance, Markus

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Jan 13, 2005 3:16 pm

Hi Markus,

If you populate your bezier series with the code line below and zoom the series you will see in some cases that it's not every 4 points.

Code: Select all

bezier1.FillSampleValues(100);
Anyway for a better aproach to your needs you may be interested in a smoothing function series.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Markus
Newbie
Newbie
Posts: 23
Joined: Tue Nov 23, 2004 5:00 am
Location: Austria
Contact:

Post by Markus » Thu Jan 13, 2005 4:38 pm

I have done it, but what I saw was the same effect as with 25 sample points.

I think you are calculating the bezier curve always fixed over four points and then switch to the next four points, this will result in this kind of curve.

May be there is a smoother way to move from point to point. Because in general the bezier function whould be a good apoximation function - a good additional feature to the b-spline function of your other smoothing function.

But thanks for your reply, you are offering a good service.

Markus.

Post Reply