Katie Boundary
12th September 2018, 00:54
I just learned about the "sliders" in Desmos graphing calculator and decided to have some fun with them and with cubic functions. I found some very interesting results regarding the limits of the B and C values when trying to make a "sane" cubic.
Let's first define a "sane" cubic filter as one in which y reaches its highest value at x=0, and its lowest value when 1<|x|<2.
If outrageous B and C values are used, crazy shapes ensue. If either B or C is set too high, you can get an "M-shaped" filter, with a depression at x=0. If either is too low, the slope of the filter at x=1 becomes positive; this can result in a triple-hump filter, where Y decreases, then increases, then decreases again as |x| increases. In a best-case scenario, the general shape will look normal, but the lowest y-values will be found where -1<x<1.
There is no minimum sane B-value or maximum sane C-value. However, as B increases, the range of sane C-values narrows, and as C decreases, the range of sane B-values narrows. There is a maximum sane B-value of 2 and a minimum sane C-value of -1. Additionally, when B is 2, the ONLY sane C-value is -1, and vice versa. For any given B-value, the minimum sane C value is -B/2 and the maximum sane C value is 3-2B.
The blurriest sane filter to satisfy the Mitchell-Netravali "B+2C=1" guideline seems to be at B = 5/3 and C = -1/3. There is no sharpest sane filter to satisfy this guideline. However, weird artifacts ensue if you try using anything sharper than B = -3, C = 2 in AVIsynth. I suspect that these artifacts are due to the specifics of how AVIsynth is written, and are not inherent in hyper-sharp cubics.
While I suspect that very little of this will have any practical application, some of it might nonetheless be interesting enough to incorporate into the documentation for AVIsynth's "resize" filters.
Let's first define a "sane" cubic filter as one in which y reaches its highest value at x=0, and its lowest value when 1<|x|<2.
If outrageous B and C values are used, crazy shapes ensue. If either B or C is set too high, you can get an "M-shaped" filter, with a depression at x=0. If either is too low, the slope of the filter at x=1 becomes positive; this can result in a triple-hump filter, where Y decreases, then increases, then decreases again as |x| increases. In a best-case scenario, the general shape will look normal, but the lowest y-values will be found where -1<x<1.
There is no minimum sane B-value or maximum sane C-value. However, as B increases, the range of sane C-values narrows, and as C decreases, the range of sane B-values narrows. There is a maximum sane B-value of 2 and a minimum sane C-value of -1. Additionally, when B is 2, the ONLY sane C-value is -1, and vice versa. For any given B-value, the minimum sane C value is -B/2 and the maximum sane C value is 3-2B.
The blurriest sane filter to satisfy the Mitchell-Netravali "B+2C=1" guideline seems to be at B = 5/3 and C = -1/3. There is no sharpest sane filter to satisfy this guideline. However, weird artifacts ensue if you try using anything sharper than B = -3, C = 2 in AVIsynth. I suspect that these artifacts are due to the specifics of how AVIsynth is written, and are not inherent in hyper-sharp cubics.
While I suspect that very little of this will have any practical application, some of it might nonetheless be interesting enough to incorporate into the documentation for AVIsynth's "resize" filters.