Spliting 3D trapezoid in equal volume

unhandled

#1

Hello guys,
Hope you can help me with this. I have a 3D trapezoid. I would like to split it up into N number of layers, lets say when we have N=5 the layers are S,H,S,H,S where volume of all S = Volume of all H. I have attached a image with this post. It will be of great help if you can help me with this.
Thank you.
Best
ArvndTrapezoid_volume