N1! = 113.4
N2! = 34.44
N3! = 43
N4! = 22.2
CALL DisegnaAssi
("X", "Y", N1!
, N2!
, schermo&
, YE&
, W&
, B&
, G&
) CALL DisegnaValore
(N1!
, N2!
, R&
, YE&
, G&
) CALL DisegnaValore
(N3!
, N4!
, R&
, YE&
, G&
)
'--------------------------------------------------------------------------------------------------------------------------------------------------
SUB ScalaOrigine
(scala~%
, origine~%
, X!
, Y!
, immagine&
)
fattoreX! = 1
fattoreY! = 1
IF Y!
* fattoreY!
>= dy!
+ Y!
+ dy!
+ dy!
THEN IF X!
* fattoreX!
>= dx!
+ X!
+ dx!
+ dx!
THEN fattoreX! = fattoreX! + 0.01
fattoreY! = fattoreY! + 0.01
'--------------------------------------------------------------------------------------------------------------------------------------------------
scala:
WINDOW (0, 0)-(X!
* fattoreX!
, Y!
* fattoreY!
) '--------------------------------------------------------------------------------------------------------------------------------------------------
origine:
dx% = 39
'--------------------------------------------------------------------------------------------------------------------------------------------------
'--------------------------------------------------------------------------------------------------------------------------------------------------
SUB DisegnaAssi
(X$
, Y$
, X!
, Y!
, immagine&
, ColoreCartiglio&
, ColoreAssi&
, ColoreTacca&
, ColoreNumeri&
)
taccaX! = X! \ 6
taccaX! = 0.25
taccaX! = 0.5
taccaY! = Y! \ 6
taccaY! = 0.25
taccaY! = 0.5
CALL ScalaOrigine
(1, 1, X!
, Y!
, immagine&
) LINE (dx!
, dy!
+ Y!
+ dy!
)-(dx!
, dy!
), ColoreAssi&:
LINE -(dx!
+ X!
+ dx!
, dy!
), ColoreAssi&
PSET (dx!
, dy!
+ Y!
+ dy!
), ColoreAssi&:
DRAW "F20":
PSET (dx!
, dy!
+ Y!
+ dy!
), ColoreAssi&:
DRAW "G20" PSET (dx!
+ X!
+ dx!
, dy!
), ColoreAssi&:
DRAW "G20":
PSET (dx!
+ X!
+ dx!
, dy!
), ColoreAssi&:
DRAW "H20" i% = 1
LINE (dx!
+ i%
* taccaX!
, PMAP(dy%
+ 5, 3))-(dx!
+ i%
* taccaX!
, PMAP(dy%
- 5, 3)), ColoreTacca&
x%
= PMAP(dx!
+ i%
* taccaX!
, 0) i% = i% + 1
i% = 1
LINE (PMAP(dx%
- 5, 2), dy!
+ i%
* taccaY!
)-(PMAP(dx%
+ 5, 2), dy!
+ i%
* taccaY!
), ColoreTacca&
y%
= PMAP(dy!
+ i%
* taccaY!
, 1) i% = i% + 1
'--------------------------------------------------------------------------------------------------------------------------------------------------
'--------------------------------------------------------------------------------------------------------------------------------------------------
SUB DisegnaValore
(X!
, Y!
, ColoreLinea&
, ColorePunto&
, ColoreTesto&
)
CIRCLE (dx!
+ X!
, dy!
+ Y!
), PMAP(3, 2), ColorePunto&
PAINT (dx!
+ X!
+ PMAP(0.5, 2), dy!
+ Y!
+ PMAP(0.5, 2)), ColorePunto&
LINE (dx!
, dy!
+ Y!
)-(dx!
+ X!
, dy!
+ Y!
), ColoreLinea&
, , 65520 LINE -(dx!
+ X!
, dy!
), ColoreLinea&
, , 65520 '--------------------------------------------------------------------------------------------------------------------------------------------------
'--------------------------------------------------------------------------------------------------------------------------------------------------
Arrotonda!
= _ROUND(num!
* 100) / 100