Skip to content

Instantly share code, notes, and snippets.

@agyeiarcher
Created September 9, 2018 19:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save agyeiarcher/342ebe033ca1edaf899ca79e02846352 to your computer and use it in GitHub Desktop.
Save agyeiarcher/342ebe033ca1edaf899ca79e02846352 to your computer and use it in GitHub Desktop.
size(500,500)
txt="how \n to \n deal?"
path = BezierPath()
path.text((txt), font="Helvetica", fontSize=150, offset=(2, 380))
NLINES=100
def makelines(amt):
with savedState():
rotate(amt, (width()/2,height()/2))
stroke(0)
strokeWidth(3)
for i in range(NLINES+1):
position=(i*(height()/NLINES))
line((position,0), (position, width()))
makelines(90)
with savedState():
stroke()
strokeWidth(3)
fill(1)
lineHeight(10)
drawPath(path)
clipPath(path)
makelines(0)
stroke()
fill()
saveImage("cliche.png")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment