createCurve()
Purpose
Create a curve between points
Description
Creates a curve between any number of supplied points on screen to be drawn with drawShape()
Syntax
shape = createCurve( point1, point2, ... pointN )
shape = createCurve( points )
Arguments
shape Handle which stores the newly created curve
point1 Vector describing the position of the first point in the curve
point2 Vector describing the position of the second point in the curve
pointN Vector describing the position of the Nth point in the curve (any number of points can be supplied)
points Array of vector points to draw the curve between
Example
r = gheight() / 2
a = 0
points = []
for i = 0 to 20 loop
x = gwidth()/2 + cos(a) * r
y = gheight()/2 + sin(a) * r
points[i] = {x, y}
r -= 30
a += 36
repeat
curve = createCurve(points)
setShapeColour(curve, white)
loop
clear()
drawShape(curve)
update()
repeat
Associated Commands
copyShape(), createBox(), createCircle(), createLine(), createLineStrip(), createPoly(), createStar(), createTriangle(), deleteShape(), drawShape(), getShapeBounds(), getShapeLocation(), getShapeRotation(), getShapeScale(), getShapeTint(), getVertex(), getVertexColour(), getVertexLineColour(), getVertexLineThickness(), joinShapes(), moveShape(), numVerts(), rotateShape(), scaleShape(), setShapeColour(), setShapeLineStyle(), setShapeRotation(), setShapeScale(), setShapeScaleModeLocal(), setShapeTint(), setVertex(), setVertexColour(), setVertexLineStyle()