Procedural Kilim Motif Generation

with Lindenmayer System

Constants Source Code L-system at Wikipedia

KoƧ Boynuzu Ram's horn

Elibelinde Hands-on-hips

Dulavratotu Burdock

Constants

Instructor Action
F Move forward and track a line
f Move forward half length distance and track an line
M Move forward
m Move forward half length
+, - Rotate the canvas by given angle
[ Save current rotation and position
] Restore saved rotation and position
= Flip the canvas as horizontal
| Flip the canvas as vertical
Z Scale up the canvas
O Scale down the canvas
S Switch the line color
{ Save current color
} Restore current color