Portal Stuff

I am still kinda hazy on the whole portal engine idea i figure it goes something like this… I have all the transformations done and now i am working on the engine core itself. Okay i have frustrum culling done and all that. But what i need now is this, for a portal engine is there an algorithym that divides up the room into convex sectors or does anyone even have some pseudo code.
So say i have the convex level loaded and every portal parsed and its right spot how do i tell what to render sorry i read flipcode but i am still hazy about dividing up a room by convex sectors.

Dan