MOS substitution: Difference between revisions

Inthar (talk | contribs)
Inthar (talk | contribs)
Line 211: Line 211:
== MOS substitution scales and RTT ==
== MOS substitution scales and RTT ==
== Pseudocode ==
== Pseudocode ==
  # nX X (nY Y nZ Z) (brightness_of_filling_mos * gcd(nY, nZ)) | (nY + nZ - gcd(nY, nZ) - brightness_of_filling_mos * gcd(nY, nZ))
# brightness is multiplied by the gcd of the steps in UDP
  # nX X (nY Y nZ Z) (brightness_of_filling_mos) | (nY + nZ - gcd(nY, nZ) - brightness_of_filling_mos)
  def mos_subst(nX, nY, nZ, sizeX, sizeY, sizeZ, brightness_of_filling_mos):
  def mos_subst(nX, nY, nZ, sizeX, sizeY, sizeZ, brightness_of_filling_mos):
     template_mos = mos_word(nX, nY + nZ, [X, W], brightness=nX+nY+nZ-1) # word in X and W
     template_mos = mos_word(nX, nY + nZ, [X, W], brightness=nX + nY + nZ - gcd(nX, nY + nZ)) # word in X and W
     filling_mos = mos_word(nY, nZ, [Y, Z], brightness=brightness_of_filling_mos)
     filling_mos = mos_word(nY, nZ, [Y, Z], brightness=brightness_of_filling_mos)
     word = letterwise_subst(template_mos, W, filling_mos)
     word = letterwise_subst(template_mos, W, filling_mos)