← EGFX function index

EGFX · FUNCTION 26ALPHA · USE AT YOUR OWN RISK

BEZIER

Draw a Bézier curve.

Uses quadratic or cubic control points and bounded integer subdivision.

Parameters

NameOrderDescription
DEGREE82 or 3.
STEPS91–32 subdivisions.
COLOUR10Logical colour.
CONTROLS16–63Signed control points.

BASIC example

Tested listing: curves-demo.bas.

10 MODE 1:HIMEM=&2400:PROCeginit
20 REPEAT:PROCegbegin
30 PROCegarc(64,96,32,200,56,1,2):PROCegarc(176,96,32,0,192,0,3)
40 v$=FNegvertex(16,192)+FNegvertex(128,112)+FNegvertex(288,192)
50 PROCegbezier(v$,16,3)
60 v$=FNegvertex(16,216)+FNegvertex(96,128)+FNegvertex(224,216)+FNegvertex(288,160)
70 PROCegbezier(v$,24,1)
80 PROCegtext("ARCS AND BEZIERS",8,8)
90 PROCegpresent:UNTIL INKEY(0)=81
100 END

Assembly example

        JSR init_egfx
        JSR begin_frame
        LDA #26 : JSR eg_call
        JSR present_frame
        RTS
Captured EGFX output for function 26
Captured EGFX curve output.

← Function index