Recursive structure of MOS scales: Difference between revisions

Inthar (talk | contribs)
No edit summary
Tags: Mobile edit Mobile web edit
Inthar (talk | contribs)
No edit summary
Tags: Mobile edit Mobile web edit
Line 186: Line 186:


== Finding the MOS pattern from xL ys ==
== Finding the MOS pattern from xL ys ==
There is a linear-time algorithm for generating a MOS that works by traversing the closest approximation to ''y = b/a*x'', and the generator may be found from the integer point on this path that is closest to this line. This is essentially the Bresenham line algorithm. The following presents the slower recursive algorithms as is topical for this article.
There is a linear-time algorithm for generating a MOS that works by traversing the closest approximation to ''y = b/a*x'', and the generator may be found from the integer point on this path that is closest to this line; this is essentially the Bresenham line algorithm. The following presents the slower recursive algorithms as is topical for this article.
=== General algorithm ===
=== General algorithm ===
This is the general algorithm for generating a moment of symmetry scale of the form xL ys represented as a string of L's and s's in its brightest mode. This algorithm will produce that scale without any prior knowledge of how the scale's steps are ordered. This algorithm is recursive. Let x be the number of L's and y the number of s's.  
This is the general algorithm for generating a moment of symmetry scale of the form xL ys represented as a string of L's and s's in its brightest mode. This algorithm will produce that scale without any prior knowledge of how the scale's steps are ordered. This algorithm is recursive. Let x be the number of L's and y the number of s's.