Bezier-Kurve

This forum is for eXpress++ general support.
Post Reply
Message
Author
User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Bezier-Kurve

#1 Post by Eugene Lutsenko »

To smooth out the empirical data, I tried using the Bezier curve. The link to the program is given below. But I don't like breaking the smoothness of the Bezier curve at the 4th point. As far as I understand, there should not be such a sharp break in the Bezier curve. Can someone tell me where and what I'm wrong about? The program's executable module, prg file, and Excel file with the source data can be downloaded from my site at the link: http://lc.kubagro.ru/Bezier.zip
Attachments
Bezier.zip
(228.79 KiB) Downloaded 567 times

User avatar
Auge_Ohr
Posts: 1405
Joined: Wed Feb 24, 2010 3:44 pm

Re: Bezier-Kurve

#2 Post by Auge_Ohr »

hi,

Offtopic : please rename Sheetname to English
Rename_Sheet1.JPG
Rename_Sheet1.JPG (10.94 KiB) Viewed 8930 times
add this into your Code

Code: Select all

oExcel:Application:Worksheets(1):name := "Sheet1"
else 3-PP Software might have Problem to open Sheet

---

for your Problem with Math Question to display Graphic xBase is wrong Language.
you can try to find Math Solution for Excel but most it have to do with Business

have a Look at MathLab https://www.mathworks.com/products/matlab.html
this Software is for Scientists ... but it is "C"
greetings by OHR
Jimmy

User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: Bezier-Kurve

#3 Post by Eugene Lutsenko »

Points where the Bezier curve is incorrect are circled in red
Attachments
Bezier_err.jpg
Bezier_err.jpg (258.48 KiB) Viewed 8916 times

User avatar
Auge_Ohr
Posts: 1405
Joined: Wed Feb 24, 2010 3:44 pm

Re: Bezier-Kurve

#4 Post by Auge_Ohr »

Eugene Lutsenko wrote:Points where the Bezier curve is incorrect are circled in red
i have look forBezier curve Sample and found this Animation
https://www.jasondavies.com/animated-bezier/

---

as i can say : you use wrong Scale
i guess you need to calculate more Points between to get it smooth.

i found some Excel Sample like this
Excel_Bezier.JPG
Excel_Bezier.JPG (92 KiB) Viewed 8898 times
it use Excel to calculate 10 Point between and to paint Chart
read more here https://blog.splitwise.com/2012/01/31/m ... rpolation/

---

there are 3-PP Solution to Read/Write Excel XLSx without Excel.
you can include Formula and Image. the Problem are calculation and Macro which are use in this Sample.

to do it with Xbase++ seems me wrong Way ... it take too much Time.
for Math Problem with many Data it is wrong Software
greetings by OHR
Jimmy

User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: Bezier-Kurve

#5 Post by Eugene Lutsenko »

When there are a lot of points, this also works incorrectly, but the errors are not visible to the eye

User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: Bezier-Kurve

#6 Post by Eugene Lutsenko »

I have completely resolved this issue
Attachments
Bezier.zip
(311.33 KiB) Downloaded 530 times

Post Reply