The poetry you quoted is originally by Vladimir Nabokov in Pale Fire.
Pale Fire is brilliant - wonderfully written and very funny. The poem itself is pretty good too - one of my favourite bits:
How to locate in blackness, with a gasp,
Terra the Fair, an orbicle of jasp.
How to keep sane in spiral types of space.
Precautions to be taken in the case
Of freak reincarnation: what to do
On suddenly discovering that you
Are now a young and vulnerable toad
Plump in the middle of a busy road
Pale Fire book is shown in the movie Blade Runner 2049
https://www.youtube.com/watch?v=OtLvtMqWNz8
Solving Nabokov's Pale Fire - A Deep Dive
https://www.youtube.com/watch?v=-8wEEaHUnkA
Pale Fire is what we call as Ergodic literature
Ergodic literature refers to texts requiring non-trivial effort from the reader to traverse, moving beyond linear, top-to-bottom reading to actively navigate complex, often nonlinear structures. Coined by Espen J. Aarseth (1997), it combines "ergon" (work) and "hodos" (path), encompassing print and electronic works that demand physical engagement, such as solving puzzles or following, navigating, or choosing paths.
Ergodic Literature: The Weirdest Book Genre
https://www.youtube.com/watch?v=tKX90LbnYd4
"House of Leaves" is another book from the same genre.
House of Leaves - A Place of Absence
https://www.youtube.com/watch?v=YJl7HpkotCE
Diving into House of Leaves Secrets and Connections | Video Essay
https://www.youtube.com/watch?v=du2R47kMuDE
The Book That Lies to You - House of Leaves Explained
https://www.youtube.com/watch?v=tCQJUUXnRIQ
I went into this rabbit hole few years ago.