The VR 123 Robot in the 123 Playspace in VEXcode VR is equipped with a VR Pen. This enables you to add color, lines, and drawings to your projects on the Field. You can adjust the Pen width and color, move the Pen up and down to draw, and fill in areas on the Field with color using the Pen.
Setting the Pen Width
The [Set pen width] block is used to adjust the width of the line drawn by the Pen on the VR 123 Robot. The default width is set to thin.
The line can be made more fine by setting the Pen width to 'extra thin', or wider by setting the Pen width to 'medium', 'wide', or 'extra wide'.
This image shows an example of the difference in line thickness from 'extra thin' (at the bottom) to 'extra wide' (at the top).
Moving the Pen
To draw with the Pen on the VR 123 Robot, you must move the Pen 'down' onto the Field using the [Move Pen] block.
The default setting for the Pen is 'up', or not drawing on the Field.
This image shows an example where the Pen was moved between 'down' and 'up' to draw lines and leave a space between.
Moving the Pen 'down' then immediately 'up' will result in drawing a spot on the Field, as shown in this image.
Setting the Pen Color
There are two ways to adjust the Pen color. The first is using the [Set Pen color] block to set the Pen color to one of four preset basic colors – black, red, green, or blue.
The default color for the Pen on the VR 123 Robot is black.
You can also use the [Set Pen color] block with color sliders to set the Pen color to any shade.
Move the sliders within the block to adjust the red, green, and blue values.
Move the opacity slider to adjust how solid or translucent your color appears on the Field.
As the sliders are moved, the color in the [Set Pen color] block will change to reflect that color combination.
Continue moving the sliders until your desired color is created.
In this example, the [Set Pen color] block is used to draw a multi-colored square.
Filling an Area with Color
You can also use the Pen on the VR 123 Robot to color in an area on the Field, using the [Fill area with color] block.
Move the sliders within the block to adjust the red, green, and blue values.
Move the opacity slider to adjust how solid or translucent your color appears on the Field.
Continue moving the sliders until your desired color is created.
In this example, the [Fill area with color] block was used to color the Field. You can also use this feature to color in shapes that you have drawn with the Pen.