besides law of Malus (http://hyperphysics.phy-astr.gsu.edu/hbase/phyopt/polcross.html), also have a look at what happens to a third polarizing filter (http://alienryderflex.com/polarizer/)
@Alfonsi: thanks.
[0,45,90] is also a nice test (instead of twice the randi solution)
@Nabor: also have a look at the law of Malus (http://hyperphysics.phy-astr.gsu.edu/hbase/phyopt/polcross.html), mind the difference between amplitude and intensity.
two filters with orthoganol orientation 0 & 90 degrees block all light. The last solution tests x = 5 + (1:5)*22.5; which is a filter set with two orthogonal filters. How come not all light is blocked for that case?