## Principles and methods

In conventional optical tweezers, the trapped particle is treated as a mass point, the light and particle are treated separately, and only the particle motion state is studied with a maximum of three dimensions, as shown in Fig. 1(a). In our proposed scheme, trapping is treated as a rigid-body in which the beam and particle are analyzed as a whole using rigid-body mechanics, as shown in Fig. 1(b). When particles are trapped by gradient forces, they can be moved by moving the beam as holographic optical tweezers [16] or by moving the sample chamber [17]. It seems certain that the particle moving from one point to another can be decomposed into components of motion along the *x*-, *y*-, and *z*- axes. The motion starting at *p* (*x*0, *y*0, *z*0) can be expressed as

$$p\left( {{x_0}+\Delta x,{y_0}+\Delta y,{z_0}+\Delta z} \right)=p\left( {{x_\sigma },{y_\sigma },{z_\sigma }} \right)$$

1

where *x*0, *y*0, *and z*0 are the initial position coordinates; *x**σ*, *y**σ*, *and z**σ* are the position coordinates after displacement; and Δ*x*, Δ*y*, and Δ*z* are the components of motion relative to the *x*-, *y*-, and *z*-axes, respectively. Eq. (1) indicates that there are only three DoFs that describe the motion of the particle, that is, three straight lines along the coordinate axes. This directly limits the DoFs of optical tweezers for particle manipulation, which significantly reduces the richness of the manipulation modes of the optical tweezers. It is well known that the motion of a rigid-body in space possesses six DoFs: surge (translation along the *x*-axis), sway (translation along the *y*-axis), heave (translation along the *z*-axis), roll (rotation along the *x*-axis), pitch (rotation along the *y*-axis), and yaw (rotation along the *z-*axis). Analogously, we constructed rigid-body optical tweezers to obtain the motion of particles with six DoFs in space, and the schematic diagram is shown in Fig. 1(b). Six independent DoFs are included in the total complex amplitude for the six-dimensional control of structured optical tweezers M(*θ*,*ψ*,*φ*,Δ*x*,Δ*y*,Δ*z*), assuming that the ring light tip coordinate is *p* (*x*0, *y*0, *z*0), and its coordinates can be expressed as

$${\mathbf{M}}(\theta ,\psi ,\varphi ,\Delta x,\Delta y,\Delta z)=A(\theta )A(\psi )A\left( \varphi \right)p\left( {{x_0}+\Delta x,{y_0}+\Delta y,{z_0}+\Delta z} \right)={{A}}\left( {\theta ,\psi ,\varphi } \right)p\left( {{x_\sigma },{y_\sigma },{z_\sigma }} \right)$$

2

where *A*(𝜃), *A*(*ψ*), and *A* (*φ*) correspond to the rotation matrices of the *x*, *y*, and *z* axes, respectively. Gaussian beams are not up to the task, thus, the structural beams are exploited to solve this issue. As shown in Fig. 2(b), the rigid-body optical tweezers are composed of two semicircular vortex beams, which are represented by two different colors. The two parts carry opposite topological charges (TCs) and produce an interference point at one of the junctions to form a tweezers’ tip to trap particles. The structured light and trapped particle are then considered as a combined rigid-body. Its generation and control methods are discussed in detail in Section 1 in Supplementary Materials. Consequently, no matter where the particle is within the range of the rigid-body optical tweezers, it will eventually be trapped at the tip of the tweezers. We treat the combination of the structured beam and particle as a rigid-body during manipulation. Therefore, the entire optical tweezers system is endowed with the properties of a rigid-body, and the motion of the particle can be regarded as the motion of a fixed point on the rigid-body. The surge Δ*x*, sway Δ*y*, and heave Δ*z* of the system can be precisely controlled by the Fourier phase-shift theorem and additional spherical waves as presented in Supplementary Materials Note Section 1.

To describe and regulate these poses better, we exploit the universal rotation theory of rigid-body Euler angles. Figure 2 shows a schematic of the surge, sway, heave, roll, pitch, and yaw. The six DoFs are indicated by arrows in the subgraphs in different colors. Each subgraph represents the motion of toroidal light for a specific DoF. The Euler angles consist of a nutation angle 𝜃, precession angle *ψ*, and spin angle *φ*, which correspond to the roll, yaw, and pitch in Fig. 2, respectively. Up to now, optical tweezers have been successfully endowed with these three additional rotation dimensions. According to Schaller's theorem [37], the displacement of a rigid-body can be produced by translation along its screw axis (Mozzi axis) followed by a rotation around an axis parallel to that screw axis. In our case, all rigid-body motions are conducted in two steps: By determining the displacements (Δ*x*, Δ*y*, Δ*z*) and then executing the rotations (𝜃, *ψ*, *φ*). Finally, the rotation is evenly interpolated into the displacement. It should be noted that the three rotational DoFs do not conform to the law of exchange, which indicates that the rotation order affects the final result. Therefore, we can realize the rigid-body motion of the toroidal light involving trapped particles in space, i.e., 6D optical tweezers. Subsequently, we select several paths for verification in the experiments.

## Experimental results

Owing to the advantages of the proposed 6D optical tweezers, we could freely customize the motion trajectories of the trapped particles. In this case, three rotational DoFs are expressed by the angle and three displacement DoFs are expressed in microns. Two experiments were designed to verify the capacity of the proposed 6D optical tweezers. In the first experiment, we chose the spin angle *ψ* = 0–2π and the displacement along the *z*-axis Δ*z =* 0–15 µm. Under these conditions, the motion trajectory of the captured particles is a 3D spiral. Figure 4 (a1) – (a5) show a part of the screenshot captured in the experiment. Figure 4 (b1) – (b5) show the corresponding 3D model demonstrations. The complete details are presented in Visualization 1. Because the CCD captures a 2D picture, Newton's rings generated by the diffraction of trapped particles are exploited as a reference to determine the motion of the particles. During the manipulation process, the trapped particle becomes blurred, which is caused by the defocusing of the particle after 3D motion. Owing to the advantage of more DoFs of 6D optical tweezers, a complex 3D spiral trajectory can be designed by adjusting only two parameters.

To verify the other DoFs and illustrate the directional change of the rigid body, we capture two particles at the same time and designed a more complex 3D cycloid path, which is shown in Fig. 5 (for details, see Visualization 2) and three views of this trajectory are shown in the dashed box. The beam is modified to have two tip to accomplish this goal (for details, see Section 2.1 in Supplementary Materials). For better characterization and comparison, we merged the patterns of the particles in the 3D model and the experimental images into one image at regular intervals. To make the 3D model clearer, the particles were painted in red and blue to highlight their positions, and two arrows of the same color with different orientations were added to indicate the direction. Explicitly, the trajectory of the trapped particle agrees well with the given complex path. In Fig. 5, the numbered sample states are captured successively, where 0 represents the starting state and 10 represents the ending state. The relative distance between the two particles doesn't change, but the overall orientation keeps changing in the process of movement. The results prove that the proposed 6D optical tweezers can conduct arbitrary combinations of six DoFs.

The capacity of the proposed 6D optical tweezers was greater than that of the conventional tweezers. The trapping range can be controlled by adjusting the radius of the toroidal light, whereas the velocity of the particles can be controlled by adjusting the change frequency of the mask or the interval between changes in the DoF parameters (see Section 1 in Supplementary Materials). The experiment of capturing yeast in different planes by changing the precession angle is described in Section 2.2 in the Supplementary Materials. Furthermore, the optical trap stiffness was measured as a standard to evaluate the performance of the proposed optical tweezers. Considering generality, polystyrene spheres were selected for the drag test. The power of the beam before entering the microscope objective prevails, and the test results indicate that the trap stiffness of the particle is proportional to the laser power for a specific particle. When the laser power is 30 mW, the optical trap stiffness is approximately 1.34 pN /µm, which is sufficient to support it to drive most biological cells without causing thermal damage. These details are presented in the Supplementary Materials.