  We generalize the recent invariant polytope algorithm for computing the joint
spectral radius and extend it to a wider class of matrix sets. This, in
particular, makes the algorithm applicable to sets of matrices that have
finitely many spectrum maximizing products. A criterion of convergence of the
algorithm is proved.
  As an application we solve two challenging computational open problems. First
we find the regularity of the Butterfly subdivision scheme for various
parameters $\omega$. In the "most regular" case $\omega = \frac{1}{16}$, we
prove that the limit function has H\"older exponent $2$ and its derivative is
"almost Lipschitz" with logarithmic factor $2$. Second we compute the H\"older
exponent of Daubechies wavelets of high order.
