First I want to say about the matrix. Completely confused the head with these transformations. So, the matrices are needed for the shader engine when calculating the scene. If we calculate the coordinates of a single figure in a fixed environment, the use of matrices will not bring an acceleration of the calculation and understanding of the code.
I knowingly wrote in the comments about the "correctly asked question." Indeed, it was the thoughtful and corrected wording of the question that helped find the correct answer (C ++):
// ΠΈΡΡ
ΠΎΠ΄Π½ΠΎΠ΅ Π½Π°ΠΏΡΠ°Π²Π»Π΅Π½ΠΈΠ΅ ΠΊΠ°ΠΌΠ΅ΡΡ: Π²Π΄ΠΎΠ»Ρ ΠΎΡΠΈ Π₯ Π² ΡΡΠΎΡΠΎΠ½Ρ + // ΠΠΎΡΡΡΠΎΠΈΠΌ ΠΏΠ΅ΡΠ΅Π΄ ΠΊΠ°ΠΌΠ΅ΡΠΎΠΉ ΠΏΠ»ΠΎΡΠΊΠΈΠΉ ΠΏΡΡΠΌΠΎΡΠ³ΠΎΠ»ΡΠ½ΠΈΠΊ, Π½Π΅ΠΌΠ½ΠΎΠ³ΠΎ // ΡΠΌΠ΅ΡΡΠΈΠ² Π΅Π³ΠΎ (x = t) Π½Π°Π²ΡΡΡΠ΅ΡΡ ΠΊΠ°ΠΌΠ΅ΡΠ΅. ΠΠΎΡΠ»Π΅ "ΡΠ΄Π²ΠΈΠ³Π°" ΠΊΠΎΠΎΡΠ΄ΠΈΠ½Π°Ρ // ΠΏΡΠΈ ΠΏΠΎΠΌΠΎΡΠΈ ΡΠ»ΠΎΠΆΠ΅Π½ΠΈΡ Ρ Π²Π΅ΠΊΡΠΎΡΠΎΠΌ ViewTo ΡΡΠΎ ΡΠΌΠ΅ΡΠ΅Π½ΠΈΠ΅ // ΠΊΠΎΠΌΠΏΠ΅Π½ΡΠΈΡΡΠ΅ΡΡΡ. double s = 0.01, t = -0.9; std::vector<glm::vec3> p { glm::vec3(t,-s,-s), glm::vec3(t,-s, s), glm::vec3(t, s, s), glm::vec3(t, s,-s) }; // ΠΊΠ°ΠΆΠ΄ΡΡ Π²Π΅ΡΡΠΈΠ½Ρ ΠΏΠΎΠ²ΠΎΡΠ°ΡΠΈΠ²Π°Π΅ΠΌ Π½Π° ΡΠ³Π»Ρ ΠΏΠΎΠ»ΠΎΠΆΠ΅Π½ΠΈΡ ΠΊΠ°ΠΌΠ΅ΡΡ ΠΈ ΡΠΌΠ΅ΡΠ°Π΅ΠΌ // Π½Π° Π²Π΅ΠΊΡΠΎΡ ViewTo (ΠΊ ΡΠΎΡΠΊΠ΅, Π½Π° ΠΊΠΎΡΠΎΡΡΡ Π½Π°ΠΏΡΠ°Π²Π»Π΅Π½Π° ΠΊΠ°ΠΌΠ΅ΡΠ°). for (size_t i = 0; i < 4; i++) { p[i] = glm::rotateZ(p[i], look_zenith); // Π°Π·ΠΈΠΌΡΡ ΠΎΡΡΠΈΡΠ°ΡΠ΅Π»ΡΠ½ΡΠΉ ΠΈΠ·-Π·Π° ΡΠ΅Π°Π»ΠΈΠ·Π°ΡΠΈΠΈ ΠΏΠΎΠ²ΠΎΡΠΎΡΠ° Π² // Π² Π±ΠΈΠ±Π»ΠΈΠΎΡΠ΅ΠΊΠ΅ GLM, Π½Π΅ ΡΠΎΠ²ΠΏΠ°Π²ΡΠ΅ΠΉ Ρ ΠΌΠΎΠ΅ΠΉ ΠΌΠΎΠ΄Π΅Π»ΡΡ Π²ΡΠ°ΡΠ΅Π½ΠΈΡ. p[i] = glm::rotateY(p[i], 0 - look_azimuth); p[i] += ViewTo; }

In the image, the white rectangle is the plane in front of the camera, which is always stationary relative to the camera.