Bézier Curves

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:

Bézier Curves

#1 Post by Eugene Lutsenko »

Somewhere I saw a standard graphics function Alaska, which allows you to build or jagged curves or Bezier curves. But now I can not find it. Could not tell what kind of function?

http://www.jasondavies.com/animated-bezier/

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

Re: Bézier Curves

#2 Post by Eugene Lutsenko »

found:

Code: Select all

// Рисование кривой
// В примере сплайн рисуется из 13 точек. Сопоставление этих точек произведено с помощью маркера и точки соединены  линиями.
 
   #include "Gra.ch" 
 
   PROCEDURE Main 
      LOCAL aPoints, i 
 
      SetColor("N/W")                     // Закрасить окно светло-серым
      CLS 
 
      aPoints := { {  30, 314 }, ;        // Задать точки X,Y сплайна
                   {  80, 106 }, ; 
                   { 130, 110 }, ; 
                   { 180, 164 }, ; 
                   { 230, 172 }, ; 
                   { 280, 257 }, ; 
                   { 330, 203 }, ; 
                   { 380, 274 }, ; 
                   { 430,  58 }, ; 
                   { 480, 109 }, ; 
                   { 530, 144 }, ; 
                   { 580, 250 }, ; 
                   { 630, 138 }  } 
 
      GraSpline( NIL, aPoints, .F. )      // нарисовать сплайн
 
      GraMarker( NIL, aPoints[1] )        // пометить 1-ю точку

 
      FOR i:=2 TO 13                      // пометить другие точки и соединить их линиями
         GraLine( , , aPoints[i] )        // 
         GraMarker( , aPoints[i] ) 
      NEXT 
 
      Inkey(0)                            // ожидание нажатия клавиши
 

RETURN


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

Re: Bézier Curves

#3 Post by Eugene Lutsenko »

In general, what I wanted, I got:

Image
Image

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

Re: Bézier Curves

#4 Post by Eugene Lutsenko »

And if available in Alaska standard means other splines, except Bezier curve?

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

Re: Bézier Curves

#5 Post by Auge_Ohr »

Eugene Lutsenko wrote:And if available in Alaska standard means other splines, except Bezier curve?
Foundation Xbase++ (without XbTools) does not even have SIN() oder COS() Function to calculate Curve to paint a Grafic...
you can try search in Alaska Newforum for some Math LIB ...
greetings by OHR
Jimmy

reganc
Posts: 259
Joined: Thu Jan 28, 2010 3:08 am
Location: Hersham, Surrey, UK
Contact:

Re: Bézier Curves

#6 Post by reganc »

Auge_Ohr wrote:
Eugene Lutsenko wrote:And if available in Alaska standard means other splines, except Bezier curve?
Foundation Xbase++ (without XbTools) does not even have SIN() oder COS() Function to calculate Curve to paint a Grafic...
you can try search in Alaska Newforum for some Math LIB ...
Jimmy

There are SIN() and COS() functions (and a few others) in XbToolsIII...
Regan Cawkwell
Real Business Applications Ltd
http://www.rbauk.com

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

Re: Bézier Curves

#7 Post by Eugene Lutsenko »

So I realized that Jimmy just says that these functions are not included in the basic package of Alaska, but there are only XbToolsIII

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

Re: Bézier Curves

#8 Post by Auge_Ohr »

hi,

perhaps a 3PP DLL / OCX can help. http://www.mathworks.de
they have some "Curve Fitting Toolbox" ... not sure if it have a COM IDispatch Interface like MathLAB
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: Bézier Curves

#9 Post by Eugene Lutsenko »

Such technologies for me hardly available in connection with my qualifications. But there is also an ideological argument: I think better to try to do without any exotic tools for standard language features. eXpress++ this consideration does not apply, as it organically blended in Alaska or Alaska in it.

Post Reply