TAMNAMS/Appendix: Difference between revisions
ArrowHead294 (talk | contribs) m Not needed |
ArrowHead294 (talk | contribs) |
||
| Line 182: | Line 182: | ||
# If either ''x'' or ''y'' is equal to 1 (base cases): | # If either ''x'' or ''y'' is equal to 1 (base cases): | ||
## If both ''x'' and ''y'' are equal to 1, then the final scale is "Ls". | ## If both ''x'' and ''y'' are equal to 1, then the final scale is "Ls". | ||
## If only ''x'' is equal to 1, then the final scale is L followed by ''y'' s's. | ## If only ''x'' is equal to 1, then the final scale is L followed by ''y'' s's. | ||
## If only ''y'' is equal to 1, then the final scale is ''x'' L's followed by s. | ## If only ''y'' is equal to 1, then the final scale is ''x'' L's followed by s. | ||
# If neither ''x'' nor ''y'' is equal to 1 (recursive cases): | # If neither ''x'' nor ''y'' is equal to 1 (recursive cases): | ||
## Let ''k'' be the greatest common factor of ''x'' and ''y''. | ## Let ''k'' be the greatest common factor of ''x'' and ''y''. | ||
## If ''x'' and ''y'' share a common factor ''k'', where ''k'' is greater than 1, then recursively call this algorithm to find the scale for | ## If ''x'' and ''y'' share a common factor ''k'', where ''k'' is greater than 1, then recursively call this algorithm to find the scale for (''x''/''k'')L (''y''/''k'')s; the final scale will be (''x''/''k'')L (''y''/''k'')s duplicated ''k'' times. | ||
## If ''x'' and ''y'' don't share a common factor that is greater than 1 (if ''x'' and ''y'' are coprime), then: | ## If ''x'' and ''y'' don't share a common factor that is greater than 1 (if ''x'' and ''y'' are coprime), then: | ||
### Let {{nowrap|''m''<sub>1</sub> {{=}} min(''x'', ''y'')}} and {{nowrap|''m''<sub>2</sub> {{=}} max(''x'', ''y'')}}. | ### Let {{nowrap|''m''<sub>1</sub> {{=}} min(''x'', ''y'')}} and {{nowrap|''m''<sub>2</sub> {{=}} max(''x'', ''y'')}}. | ||
| Line 193: | Line 193: | ||
### If {{nowrap|''x'' < ''y''}}, reverse the order of characters in the prescale. This is only needed if there are more L's than s's in the final scale. | ### If {{nowrap|''x'' < ''y''}}, reverse the order of characters in the prescale. This is only needed if there are more L's than s's in the final scale. | ||
### To produce the final scale, the L's and s's of the prescale must be replaced with substrings consisting of L's and s's. Let {{nowrap|''u'' {{=}} ⌈''m''<sub>2</sub>/''m''<sub>1</sub>⌉}} and {{nowrap|''v'' {{=}} ⌊''m''<sub>2</sub>/''m''<sub>1</sub>⌋}}.<ref group="note" name="floorceiling">⌈ ⌉ denotes the ceiling function and ⌊ ⌋ denotes the floor function.</ref> | ### To produce the final scale, the L's and s's of the prescale must be replaced with substrings consisting of L's and s's. Let {{nowrap|''u'' {{=}} ⌈''m''<sub>2</sub>/''m''<sub>1</sub>⌉}} and {{nowrap|''v'' {{=}} ⌊''m''<sub>2</sub>/''m''<sub>1</sub>⌋}}.<ref group="note" name="floorceiling">⌈ ⌉ denotes the ceiling function and ⌊ ⌋ denotes the floor function.</ref> | ||
#### If {{nowrap|''x'' > ''y''}}, every instance of an L in ''prescale'' is replaced with one L and ''u'' s's, and every s replaced with one L and ''v'' s's. This produces the final scale in its brightest mode. | #### If {{nowrap|''x'' > ''y''}}, every instance of an L in ''prescale'' is replaced with one L and ''u'' s's, and every s replaced with one L and ''v'' s's. This produces the final scale in its brightest mode. | ||
#### If {{nowrap|''x'' < ''y''}}, every instance of an L in ''prescale'' is replaced with ''u'' L's and one s, and every s replaced with ''v'' L's and one s. This produces the final scale in its brightest mode. | #### If {{nowrap|''x'' < ''y''}}, every instance of an L in ''prescale'' is replaced with ''u'' L's and one s, and every s replaced with ''v'' L's and one s. This produces the final scale in its brightest mode. | ||
Using 3L 4s as an example, this is LsLsLss (brightest) and ssLsLsL (darkest). To find the large sizes of each ''k''-mosstep, consider the first ''k'' mossteps that make up the mos pattern for the brightest mode. Repeat this process with the mos pattern for the darkest mode to find each ''k''-mosstep's small size. To make these sizes more clear, we can denote the mos intervals as a sum of large and small steps {{nowrap|''i''L + ''j''s}}, where ''i'' and ''j'' are the number of L's and s's in the interval's step pattern; this is to say that the order of L's and s's doesn't matter, rather the amount of each step size. The large and small sizes should differ by replacing one L in the large size with an s. | Using 3L 4s as an example, this is LsLsLss (brightest) and ssLsLsL (darkest). To find the large sizes of each ''k''-mosstep, consider the first ''k'' mossteps that make up the mos pattern for the brightest mode. Repeat this process with the mos pattern for the darkest mode to find each ''k''-mosstep's small size. To make these sizes more clear, we can denote the mos intervals as a sum of large and small steps {{nowrap|''i''L + ''j''s}}, where ''i'' and ''j'' are the number of L's and s's in the interval's step pattern; this is to say that the order of L's and s's doesn't matter, rather the amount of each step size. The large and small sizes should differ by replacing one L in the large size with an s. | ||