Can I use opencv to draw a greyscale polygon, where the brightness of the each pixel is determined by interpolation from the vertices?
cv::fillConvexPoly(frame, &draw, (int) draw.size(), color);
You can do this to edit a specific pixel:
Vec3b pixel = image.at<Vec3b>( Point(x,y) );
image.at<Vec3b>( Point(x,y) ) = pixel;
Now just go and implement whatever drawing functionality you want.
(If you are having a specific issue, then please edit your question to clarify so I can then update this answer to be more specific. )
Thank you for specifying what it is that you are actually asking. Really this is not something that OpenCV is meant for. (It is a computer vision library, not a image manipulation library. ) Take a look at http://www.imagemagick.org/Usage/canvas/ as this will likely have what you need.