| Algorithm 3 The interaction mechanism of the proposed system | |
| Input: | |
| (1) a blank space on the touch screen with three buttons of the functions of “select,” “send,” and “remove”; | |
| (2) a sequence of 512 brain wave samples every second in the forms of attention and meditation signals provided by the brain wave machine; | |
| (3) a digital copybook of calligraphy with a sequence of sets of characters. | |
| Output: | |
| (1) a series of animations which are played on the panel of the interaction pool to reflect the emotions of the writer every 5 s; | |
| (2) the same as (1) above but additionally with the calligraphic work being superimposed on the animation in a floating manner as shown in Figure 5d when the calligraphic work is sent out by pushing the button of ‘send’; | |
| (3) a completely calligraphic work with a red seal and a color-palette background (created dynamically every 20 s) as shown in Figure 5c which is sent to show on the display screen as shown in Figure 4b when a writing session is ended by pushing the stamp on the touch screen to create the red seal; | |
| (4) the same as that of (3) above but sent instead to the server of the proposed system. | |
| Steps. | |
| Step 1: | //Starting a new writing session |
| 1.1 if the signal of “select” is detected, then | |
| show the next set of characters in the digital copybook of calligraphy | |
| //Allowing the writer to choose a desired set of characters | |
| end if; | |
| 1.2 show the result of character-set selection on the touch screen. | |
| Step 2: | //Looping while calligraphy is in progress |
| while the signal of “seal” is not detected do: | |
| 2.1 allow the writer to use the pen brush to conduct calligraphy and show the calligraphic work on the touch screen; | |
| 2.2 for every 20 s do: | |
| (a) for every 5 s do: | |
| //Generating and plays animations | |
| (i) perform Algorithm 2 with the brain wave samples as the input to generate an animation A | |
| (ii) play A by projecting it onto the interaction pool to show the visual content and using the built-in speaker to play the associated sound; | |
| end for; | |
| (b) if the signal of ‘send’ is detected then | |
| //Showing the written work on the interaction pool | |
| (i) superimpose the current calligraphic work W0 in a floating manner in the currently-played animation A to create a new animation B; | |
| (ii) play B by projecting it onto the interaction pool to show the visual content and using the built-in speaker to play the associated sound; | |
| end if; | |
| (c) perform Algorithm 1 with the brain wave samples as the input to create a color palette P; | |
| (d) if the ‘seal’ signal is detected then | |
| //Showing the work on the display screen at the remote site | |
| (i) superimpose a red seal on the pre-set area on the left side of the current calligraphic work W0 to create a new work W1; | |
| (ii) send W1 to the cloud server of the system to keep W1 there; | |
| (iii)superimpose W1 on the color palette P to create a second new work W2; | |
| (iv) send W2 to the display screen at the remote site to show; | |
| end if; | |
| end for; | |
| end while. | |
| Step 3: | //Ending or starting another writing session |
| if the signal of ‘remove’ is detected then | |
| clear the completed calligraphic work on the touch screen and go to Step 1; | |
| //Starting another writing session | |
| else | |
| if the signal of ‘turn off system’ is not detected then | |
| go to Step 2; | //Keeping the writing session |
| else exit; | //Ending |
| end if; | |
| end if. | |