This paper presents a modified Gerchberg-Saxton (GS) iterative algorithm applied to the pattern synthesis of reconfigurable intelligent surfaces (RIS). Specifically, a scalar Fresnel-like transform pair that is specifically designed to fulfill the demands of RIS applications is developed; this transform pair allows the farfield to be expressed in angular terms, while the nearfield remains in the planar form. The paper presents analytical and full-wave results that are based on a 108 GHz liquid crystal (LC)-based 20x20 reconfigurable reflectarray metasurface model, which is intended for applications in THz wireless communications. The synthesized beams presented include: amplitude-variable four-beam multibeam, seven-beam vortex multibeam, and circular beam. Compared to traditional beam synthesis methods, such as the genetic algorithm (GA) and the particle swarm optimization (PSO), the modified GS algorithm proved to be much faster in performing RIS beam synthesis. Additionally, GS also has the additional advantage of not needing a meticulously designed analytical cost function to perform effectively.