Here comes a very simple way to do it:
Add a circle with 32 vertices and a triangle fan.
Rotate it by 360/64 degrees along Z axis. This will get you nice flat sides.
Inset faces a bit to make a rim. All pills have a rim.
Then delete the triangle fan.
3) Fill the circle
Select 16 opposite vertices (exactly half).
Go to Face->Grid Fill.
Cool, right? Job done.
4) The bulge
Raise the middle polygon and enable proportional editing with falloff set to Sphere.
Play with the settings to your liking.
5) Create the bottom part.
Select all vertices Select->All, duplicate Mesh->Duplicate to make the bottom part.
You can use the mirror modifier for this, if you want.
6) Connect both parts.
Select those two edge loops and bridge them.
Edge->Bridge edge loops.
7) Add Subdivision modifier to smooth it out.
2 levels is enough.
Also set a smooth shading.
8) Change the shape to your liking
You can still change the shape and height in edit mode.
Just grab and move the vertices.
Example of final mesh.
- You can do this faster by using mirror modifier
- Apply rotation, so modifiers work properly
- There are many ways to do this, don't get hung up on this approach
- Yeah... some pills have a groove in the middle.
- Try it with different number of vertices, some will work better than others.
Okay, here is the same pill with a groove in the middle.
It just felt so wrong without it I couldn't sleep.