Curve

The Curve function draws a curve line passing through all specified points.

Curve varPoints[, varComplete][, varSharpFactor]

Parameters

varPoints
Either one dimensional or two dimensional array specifying dots.
In case of two dimensional array the left-most index of array is the number of points. The right-most index of array is coordinate - x or y.
In case of one dimensional array the elements of array are elements of points coordinates in the sequence: X1,Y1,X2,Y2,... etc.

varComplete
Optional. Boolean value specified whether curve will be closed. If True, a closed curve will be drawn. Default value is False (a curve is open-ended).

varSharpFactor
Optional. Specifies curve sharpness. Recommended values are 0,5 - 2. Default value is 1.

Example
View result

Set g = CreateObject("shotgraph.image")
points = Array(20,120,300,120,40,200,150,50)
r = 3

g.CreateImage 320,240,8
g.SetColor 0,255,255,255
g.SetColor 1,0,0,0
g.SetBgColor 0
g.SetDrawColor 1
g.FillRect 0,0,320,240
for i=0 to UBound(points) step 2
	g.Ellipse points(i)-r,points(i+1)-r,points(i)+r,points(i+1)+r
Next
g.Curve points

g.GifImage -1,0,"c:\curve.gif"