Vispatch Tutorial (using Java 1.02) > TOC > The Vispatch Visual Language > Heads of Rules > Connection and Figure Type

Connection and Figure Type

In order for a rule's head to match, all the figures in it must match figures around the event. The figures must be the same type and connected in the same way.

The size and orientation of figures do not matter. The only the properties considered are the types of the figures and how they are connected. Try performing mouse drags in the applet below and try to guess which which rule will execute. You can tell which rule executed by the text that it puts at the end of your mouse drag.

 
Notice that an arrow figure must be pointing in the same direction to match. For example, the mouse drag must be from the tail of the arrow to match the third rule. Most of the other Vispatch figures only match when connected in the same direction, like the arrow in the example above. The only exception is the line figure, which will match in either direction.

Of the 9 mouse drags above, only two should have executed the bottom rule, which puts a red X on the document. This rule will match any mouse drag because there are no other figures in the head.