How Vectors are drawn

This section for now is more a “link” section, since in the past I have written quite extensivly on the subject already.

For the very beginner let me repeat the parking lot metaphor (found at Storyboard):


A little bit more in depths explanation. All drawing or positioning the vectrex does is done using two components:
– scale and
– strength

The strength is inherently defined by the vectorlist and once compiled can not be (easily) changed. The scale is “just” a drawing parameter and can easily be changed while a vectrex programm is running. To get a better understanding…
Think of it like you sit in a car. The speed of the car is the “strength” and the time you sit in the car is the scale.

To move 10 kilometers you have (in this example) two options:
– move with the speed of 1 km/h for 10 hours
– move with the speed of 10 km/h for 1 hour

Since you are in a hurry – you will always chose option 2!

Vectrex is always in a hurry! If at all possible use the smallest scale (time) possible (to achieve the above mentioned 50Hz).

To stay with the example above:
– imagine you are driving on really large parking place (like 10×10 kilometers)
– imagine it is deep in the night
– imagine there is a spectator in an airplane 10 kilometers above
– imagine you have a powerfull light on the roof of your car
– imagine you drive from the middle of the parking spot 1km to the west with the light switched on

The spectator just saw a gigantic vectrex, drawing a vector really slow!
– imagine you switch the light off
– imagine you drive 500m to the north

The spectator just saw nothing, but he will realize soon that the gigantic vectrex, moved the vector beam to another location
– image you switch the light on
– imagine you drive 1km to the east

The spectator saw the vectrex drawing another vector, resulting in an “=” sign!
… and so on.

The next “logical” step is to use the BIOS. Line drawing by using the BIOS as explained in: vectrex-tutorial-ii-starting-with-bios

You might have the question left – “but how does all this work?” I also tried solving that myster within the documentation of Vide:
Vectrex analog hardware
Which describes the side of the analog hardware without bothing to give you any assembler code.

Actual source code for “normal” line drawing can be found also in Vide, within the chapter Draw Optimization.

Since the used VIA is – as the name implies – there are different ways to actually draw vectors. The above mentioned “methods” are BIOS like. But you might also want to try out different variants.

On the (Vide-) page Drawing vectors – differently I describe in some length a possible variant, including working example source code.

For further reading I also recomend my blog entry Vector Patrol drawing which describes the concept of “smartlist” as done by Kristof Tuts. Working examples can be generated using vecci (in Vide).

Vide… can generate lots of different Vector drawing routines (in source form), perhaps also interesting are “synced” lists. Which are described at: Vide->Vecci->Export

Last and possibly least… probably one of the fastest ways to draw vectors – but the least flexible one – is used for the “demo” of Shongololo.