Login
Graphics
Title:Graphics
Category:Utility/Graphic
Release Date:
Language:English
Size:64K
Machine:PAL & NTSC
Code Type:Machine code
Distribution:Freeware
Re-released by:Fantastic Italian Research Enterprise (FIRE)
Re-released by:SVS
Notes:O.S. extension that allows the user to easily draw 3D figures + other graphics effects. The actual author is unknown yet.
User Rating: 8/10 (4 votes)
Graphics Screenshot


Appeared On Compilations
Club Info 76


Package Documentation
"GRAPHICS" package info (3D graph on Plus4!)
Version: 2.1

by S\_/S of Plus/4 [FIRE] crew
svs.fire@gmail.com

This package was not coded by me. I only "discovered" it after many years and now I'm reverse-engineering it, because it doesn't have any info or instructions. Any contributions from you are welcome!

Files of the package:

graphics.ldrfirst loader
gloader1.ldrrelocator and object loader
graphics.objcode


Coordinates system

The screen is viewed as a 320*200 (HiRes). When in Multicolor mode, the resolution is half, being each point two pixel long, but coordinates data must be supplied as 320*200.

Contrary to standard O.S., the numbers of coordinates go from -160 to +160 (HiRes) on horizontal, and from -100 to +100 in vertical. This means that point 0,0 is situated in the center of screen.

Positive values are right side in horizontal, and top side in vertical. Thus the bottom right point will be +160,-100.

Being a 3D package, there is of course the 3rd dimension coordinate. It goes from 0 (no depth) to 32767 ($7FFF). Values over 3000 could be not visible (too far, then too small).

Memory

Available user RAM memory is half of normal, about 30Kb. BASIC lines will be located from $8000 and up. Memory under $8000 is not available.

Keywords (for BASIC lines)

Each new command has the arrow symbol as the first character. This is necessary because some new keywords have the same name as standard keywords. New keywords do not work in immediate mode, only in running mode.

Colors

When it is allowed to specify one of the 16 base-colors (0-15), its bright is always set to 7 (lightest).

KeywordParametersOperationNotes
<-CIRCLEx,y,z,hr,vrDraws an ellipse (or a circle)x,y,z = coordinates of centerhr = horizontal radiusvr = vertical radius
<-COLORcSets foreground color for next operationc = color number (0...3)  
<-CLEAR Erases the graphic screenGraphic area still remain set  
<-GRAFb,fGoes to HiRes screenb = background color (0...15)f = foreground color (0...15) 
<-INVmSets invert mode (when overwriting a previous draw /character, color is inverted) (XOR)m = 0 or even then cancels invert mode

m = 1 or odd then starts invert mode
  
<-DRAWx,y,z,x1,y1,z1Draws a linex,y,z = start coordinatesx1,y1,z1 = end coordinates$ instead of any parameter = assumes current position
<-PLOTx,y,z,Draws a pointx,y,z = coordinates  
<-TEXTb,fGoes to text screenb = background color (0...15)f = foreground color (0...15) 
<-MGRAFb,c1,c2,c3Goes to Multicolor screenb = background color (0...15)c1 = 1st color

c2 = 2nd color

c3 = 3rd color
 
<-VISTAx,ySet the Point of View for 3D graphics (source point of graphic projection)x,y = start coordinates  
<-VISTAno parameter???   
<-VISTA

[math function]
(n)Retrieves result of <-VISTA functionn = 0 : horizontal

1 : vertical
 
<-ARCx,y,z,hr,vr, sa, ea, snDraws a polygonx,y,z = center coordinateshr = horizontal radius length

vr = vertical radius length
sa, ea = start/end angle of the arc sector (*)
[2*P/360*x] (x = degree).
x negative stands for (clockwise angle)
sa = 2*P/x (x specifies the number of sides of the polygon)
If x=20 you obtain the same resolution than <-CIRCLE
<-GRDUMPa, bPrints the graphics screena must be 0 or 1
b must be 0-40
  
<-GRMERGE??????   
<-VCHARx,y,rf,tsPrints vertical text on graphic screenx,y = coordinates (of 40x25 grid);

st = text string
rf = reverse /charset flag:0 = set#1 normal

1 = set#1 reverse

2 = set#2 normal

3 = set#2 reverse


(*) Angle origin coordinates for arc sectors start from a point nn pixels right from the center, when nn is the lengths of horizontal radius), in the same vertical coordinate.

For example: <-ARC 20,30,Z,100,50... arc sector starts from 120,30 (20+100,30), except if you set a different start angle (as "sa" parameter).


Image Gallery
Below are a few sample images created with this package. Look at what only a few lines of code can do!
Graphics Screenshot #1
Graphics Screenshot #2
Graphics Screenshot #3
Graphics Screenshot #4
Graphics Screenshot #5

Copyright © Plus/4 World Team, 2001-2024