By perfectly, do you mean vector-ly? I saw glaiel-gamer once post a application that graphed function, including trig ones.
I tried to replicate it but this is as far as I got:
var bitmap:BitmapData = new BitmapData(700, 400, true, 0xffffffff);
var image:Bitmap = new Bitmap(bitmap);
addChild(image);
image.x=0;
image.y+=200;
var pi2:Number=Math.PI*2
for(var i:int = 0; i < 700; i++) {
bitmap.setPixel32(i, (Math.sin(((pi2/100)*i)-(pi2/100))*100),0x88ff0000);
}
I forgot the actual specs of a trig function so you'll have to mess around for something more precise.
setpixel only allows integers, so I had to increase the amplitude.
Using the api is probably the best solution, so you can fill the segments that the pixels don't reach