Hello,
Welcome to the forum.
You are experiencing clipping.
The Perspective section discusses this:
https://processing.org/tutorials/p3d/
And you can adjust the z-far parameter using perspective():
https://processing.org/reference/perspective_.html