Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Vilnius BASIC
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Graphics additions=== The Electronica systems included [[Computer graphics|computer graphic]]s support, and Vilnius BASIC included a number of statements to work with graphics. One interesting feature of this system was that X,Y coordinates were written in parens. The system remembered the last specified point, and new locations could be indicated with the {{code|@}}, for instance, if the last draw command was at (100,100), one could turn the pixel at (105,105) to color 3 with {{code|PSET @(5,5),3}}. There were five color values, 0 through 3. In addition to {{code|PSET}}, one could draw lines from-to using a pair of coordinates separated by a minus sign, similar to the LIST command, for instance {{code|LINE (100,100)-(120,120),3}}. In its simplest form, {{code|CIRCLE}} took an X,Y pair for the center, a radius, and a color, {{code|CIRCLE (120,120),30,1}}. It could also plot arcs from given start and end angles in radians, {{code|CIRCLE (120,120),30,1,0,1.5}}, and could "compress" the vertical axis to produce an ellipse, {{code|CIRCLE (100,100),20,1,,,0.4}}. {{code|PAINT (100,100),3,1}} performed a [[flood fill]] starting at (100,100), filling with color 3 and moving outward until it saw color 1. Finally, there was the multi-purpose {{code|DRAW}} command. This took a string which encoded a series of drawing steps that could produce a complex shape in a single line of code. The four cardinal directions were indicated with U, D, L and R (up, down, left, right). The 45-degree angles were, moving clockwise, E (up-right), F, G and H (up-left). For instance, {{code|DRAW "R20D20L20U20"}} would produce a square with sides 20 pixels long starting at the last drawn position. In addition to directions, the M command could be used to specify explicit coordinates, like "M100,120", which did not require the parens. C changes the color, B moves without drawing a line, and N resets the coordinates to what they were before the DRAW command. There is a single graphics function, {{code|POINT(x,y)}}, which returns the number of the color of that location on the screen.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)