10/10/03

LB - Character plot

LB [ cs ] < terminator > [;] cs : character string

Plots character strings, numerical expressions, variables etc.

Plotting is performed whether the pen is up or down.

After plotting, the cursor moves to the position of the next character.

10 '*** LBEX1 ***

20 LPRINT "SP2;PA1000,4000;"

30 X=30

40 LPRINT "LB",X,X+1,X+2,CHR$(3)

50END <Sample 81>

10 '*** LBEX2 ***

20 LPRINT "SP2;PA4000,5000;"

30 X=30

40 LPRINT "LB";X;X+1;X+2,CHR$(3)

70END <Sample 82>

10 '*** LBEX3 ***

20 LPRINT "SP2;PA5000,6000;"

30 X=30

40 LPRINT "LB";X;" ";X+1;" ";X+2,CHR$(3)

70END <Sample 83>

DI - Absolute direction

DI [ run, rise ] [;] run : X direction component rise : Y direction component

Specifies the character plot direction.

Values for the run and rise are clamped real numbers.

The instruction is ignored when the values for both run and rise are 0.

When the parameter field is omitted, the default value (horizontal direction) is used.

θ

run

tanθ = sinθ

rise cosθ

10 '*** DIEX ***

15DEG=-45

16RAD3.1416/180*DEG

20 LPRINT "IN;SP2;PA3050,4450;"

30 LPRINT "DI0,2;LB_*_1988";CHR$(3);"DI2,2;LB_*_1989";CHR$(3)

40LPRINT "DI2,0;LB_*_1990";CHR$(3);"DI2,-2;LB_*_1991";CHR$(3)

50LPRINT "DI0,-2;LB_*_1992";CHR$(3);DI-2,-2;LB_*_1993";CHR$(3)

60LPRINT "DI-2,0;LB_*_1994";CHR$(3);"DI-2,2;LB_*_1995";CHR$(3)

70LPRINT "PA3500,5350;DI",COS(0),SIN(0);"LB_*_2000";CHR$(13);CHR$(3);

80LPRINT "DI",COS(RAD);SIN(RAD);"LB_RETURN POINT";CHR$(13);CHR$(3)

90END

<Sample 84>

CHAPTER 9 HP-GL - 22

Page 334
Image 334
Homelite HL-1050, HL-P2500, HL-1660E, HL-2400CE, HL-1450, HL-1250, HL-1470N Lprint DI,COSRADSINRADLBRETURN POINTCHR$13CHR$3