Is it possible to get the top to follow the normal of the edge loop, so it rotates kind of like this?
If I understand correctly, you want to keep your normals straight when rotating the top face of a cylinder, like this:
Select the face or edge loop, rotate it and then follow Object/Mesh/Curve/Surface ‣ Transform ‣ Shear (hotkey; Ctrl+Alt+Shift+S) and adjust it manually.
I'd like to know if there's a better way to achieve this, but that seems to work just fine.
You can do this easlily with the "Pipe Joins" Add-on
enable the Add Mesh: Extra Objects Add-on.
You'll have a new item on the add menu: Add>Mesh>Mechanical>Pipe Joints.
There are several presets to choose from:
At creation time, each of the tools have a different set of options to refine the angle, diameter, etc. (if the tool tab is not open press T to make it visible or press F6
The shape you want is a pipe elbow. You can control the angle, radius and number of division
A different way to do this is to create two separate segments that are angled the way you need them and connect them later. If the two segments have the same number of vertices you just select the end edges and use Bridge Edge Loops, and adjust number of cut and smoothness.
To create large sections and more intricate paths , create a base shape for the pipe.
And use it as a Bevel object on a curve:
To deal with sharp turns adjust the control points by pressing B and selecting Vector. The width of the curve can then be ajusted by changing the radius of a control point.