[Pictogramming] Pictogramming now supports to draw diagrams with various body parts

posted in: 開発者ブログ | 0

Pictogramming now extends to be able to draw with many body parts.  Updated part is denoted with red color.

 

Command Format Process
PEN arg1 [arg2]

Pen up if arg1 is “UP,” pen down if arg1 is “DOWN.”  The name of body parts can be set as arg2. The notation of body parts is same as R or RW commands.  arg2 can be set only when arg1 is “UP” or “DOWN”.    It regards arg2 is BODY if arg2 is omitted.

The shape of line’s both edges set square if arg1 is “SQUARE”, set round if arg1 is “ROUND”.

No shape is attached at both edges if arg1 is “BUTT”.

Initial state is pen up and shape of line’s edge is square.

 

Following  9 parts can be set as body of parts.

Some examples are shown below:


SK
PEN DOWN LLA
REPEAT 4
R LUA 90
W 0.1
END

draws a rectangle by left hand.


SK
PEN DOWN LLA
R LUA 360 1

draws a circle by left hand.

Various diagrams can be drawn by variety of ideas.

 

And command format of RW and MW are also updated.  Updated part is denoted with red color.

Command Format

Process

R arg1 arg2 arg3 arg4

After arg4 seconds, rotate arg1, a part of the body, arg2 degrees counterclockwise over arg3 seconds. If arg4 is omitted, then arg4 is treated as 0. If arg3 and arg4 are omitted, the arg3 and arg4 are both treated as 0.

RW arg1 arg2 arg3

Rotate arg1, a part of the body, arg2 degrees counterclockwise over arg3  seconds.The next command is not executed until the movement is complete. If arg3 is omitted, then arg3 is treated as 0.

M arg1 arg2 arg3 arg4

After arg4 seconds, move arg1 pixels in an X-axis positive direction and arg2 pixels in a Y-axis positive direction with linear uniform motion over arg3 seconds. If arg4 is omitted, then arg4 is treated as 0. If arg3 and arg4 are omitted, then arg3 and arg4 are both treated as 0.

MW arg1 arg2 arg3

Move arg1 pixels in an X-axis positive direction and arg2 pixels in a Y-axis positive direction with linear uniform motion over arg3 seconds. The next command is not executed until the movement is complete. If arg3 is omitted, then arg3 is treated as 0.

 

“R arg1 arg2 0”  and “RW arg1 arg2 0″ are same command, so far.”M arg1 arg2 0” and “MW arg1 arg2 0” are same commands.Now third command of RW and MW commands can be ommited.This aims that  behavior of “R arg1 arg2” and  “RW arg1 arg2”, “M arg1 arg2” and “MW arg1 arg2” are different when it contains drawing.

(1) R and M commands with time 0 draws line, which edge are original position and position that all  are performed.

(2) RW and MW commands with time 0 draws line, which edge are original positionand position that this command is performed.

Here illustrates these difference.

 

SK
PENW 10
PEN DOWN LLA
RW LUA 45
RW LUA 45

draws following. First draws the line, which edge are initial position of left arm and rotate 45 degree counterclockwise. Furturemore, draws another line until the point of  rotating 45 degree counterclockwise

SK
PENW 10
PEN DOWN LLA
R LUA 45
R LUA 45

draws following. Draws the line, which edge are initial position of left arm and rotate 90 ( = 45 + 45) degree counterclockwise.

Hence,

SK
PENW 10
PEN DOWN LLA
REPEAT 8
RW LUA 45
END

draws following regular octagon.

SK
PENW 10
PEN DOWN LLA
REPEAT 8
R LUA 45
END

draws noting. Because, initial positon of left arm and a position which rotates 360 (=45 * 8) degrees counterclockwise from initial postition are same.

Similarly,

SK
PENW 3
PEN DOWN LLA
M 100 0
M 0 100

draws as follows:

On the other hand,

SK
PENW 3
PEN DOWN LLA
MW 100 0
MW 0 100

draws as follows:

 

Due to this extension about R, RW, W and MV, we were able to unify a drawing rule both it takes infinite time and when it takes with time of zero.

Comments are closed.