How do I create a transition from a curved surface to a flat surface? I'm currently clueless as to how to morph a curve smoothly into a flat surface. As you can see in the image below, the black area has a flat surface, but changes into a curved surface in the red area. How can I model this smoothly? 



Thank you.
You could start with a cylinder 


add a few loopcuts Ctrl-R 
select the  edge rings to flatten Shift-Alt-RMB
Scale along z-Axis Z




After that could select edges and scale the x-axis: