## 2 Materials and Methods
### Motion Phantom  
An in-house 4D water phantom (4D-WPh) [38] was used to simulate intrafractional target motion with different patterns (Figures 1 and 2). This phantom was also previously used to test an optical tracking system [37] and to evaluate the effects of target motion [11]. The 4D-WPh was based on a container made of Plexiglas with a thickness of 5 mm. The container had a cubic shape with a size of 20 cm \(\times\) 20 cm \(\times\) 20 cm and was filled with water to approximately 60-70% of the total volume (Figure 2a). A ball screw linear actuator with a BLM57050-1000 servo motor (Leadshine Technology Co., Ltd., Shenzhen, China) was installed on top of the container (Figure 2b). The motor was controlled by an ACS306 driver (Leadshine Technology Co., Ltd., Shenzhen, China). A carriage of the actuator was moved along one direction in translation with a step size of 0.01 mm and an absolute  
Figure 1: The experimental setup for the evaluation of the interplay effect using the 4D-WPh at the Prometheus proton therapy facility: (**a**) irradiation of a radiochromic film and (**b**) stationary validation of the calculated plan by an ion chamber. Abbreviations: 4D-WPh = 4D water phantom. positioning accuracy within 0.1 mm. Two mechanical limit switches turned off the servo drive and limited the movement of the carriage (Figure 2a), and an SR17C-J6 Hall sensor (Honeywell Inc., Charlotte, NC, USA) was integrated to set the zero position of the carriage (Figure 2b). A universal mount was installed on the moving carriage for the placement of various targets and holders for dosimetric instruments, including ion chambers (ICs) and radiochromic films. In addition, a 20 cm \(\times\) 30 cm reflective plate was installed on the carriage to ensure compatibility of the 4D-WPh with optical surface monitoring (Figure 1a). Two holders for the IC (Figure 1b) and the film (Figure 2a) were used in this study. Both holders were made of polylactic acid (PLA) using three-dimensional (3D) printing technology. The holders were designed so that the plastic parts did not interfere with the beam delivery and only water was in the beam path. This allowed for the beam to reach the IC or film unobstructed, eliminating the uncertainties associated with calculating a proton range in PLA. All the mount and holder parts were printed with 20% infill to ensure they were clearly visible during CBCT data acquisition. The first holder (Figure 1b) was a square, horizontally oriented plate 6 cm \(\times\) 6 cm in size and 1 cm thick, with 25 holes evenly spaced across the plate at 10 mm intervals. The diameter of each hole was 8 mm, allowing for a PinPoint 31022 IC to be inserted into the hole and fixed vertically with a locking ring. This holder was used to validate the irradiation plan calculated in terms of absolute dose. The second holder (Figure 2a) had the shape of a 10 cm \(\times\) 10 cm \(\times\) 10 cm cube and consisted of two horizontal plates and four vertical columns holding these plates together. The plates had numerous orthogonal slots, 1 mm wide and 10 mm apart, for inserting the film. The plates also had stops on both sides against which the film rested as it was inserted into the slot so that the film always occupied approximately the same position in the holder. A control unit (Figure 2c) was designed to communicate with the laptop computer, which contained a graphical user interface, and to generate digital control signals for the ACS306 driver to set the carriage position. The control unit was based on an Atmega328 PB microcontroller (uC) (Microchip Technology Inc., Chandler, AZ, USA). The microcontroller contained C code, developed in Atmel Studio 7 (Microchip Technology Inc., Chandler, AZ, USA), which allowed for the various motion patterns of the carriage to be realized. The microcontroller also checked for changes in the state of the limit switches and the Hall sensor, which allowed for the carriage movement to be monitored. The RS-485 interface was used to exchange data between the control unit and the laptop.