title: Warp / curve all vertices around a pivot point / axis (Three.js / GLSL)
body: <p>I'm trying to work out how to warp all coordinates in a Three.js scene around a specific pivot point / axis. The best way to describe it is as if I was to place a tube somewhere in the scene and everything else in the scene would curve around that axis and keep the same distance from that axis.</p>
  
  <p>If it helps, this diagram is what I'm trying to achieve. The top part is as if you were looking at the scene from the side and the bottom part is as if you were looking at it from a perspective. The red dot / line is where the pivot point is.</p>
  
  <p><a href="https://i.stack.imgur.com/eBwXH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eBwXH.png" alt="Warp around a pivot point"></a></p>
  
  <p>To further complicate matters, I'd like to stop the curve / warp from wrapping back on itself, so the curve stops when it's horizontal or vertical like the top-right example in the diagram.</p>
  
  <p>Any insight into how to achieve this using GLSL shaders, ideally in Three.js but I'll try to translate if they can be described clearly otherwise?</p>
  
  <p>I'm also open to alternative approaches to this as I'm unsure how best to describe what I'm after. Basically I want an inverted "curved world" effect where the scene is bending up and away from you.</p>
  
  <p><a href="https://i.stack.imgur.com/xlHKD.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xlHKD.jpg" alt="Curved world in Unity"></a></p>