I found code for generating Sierpinski carpet at http://rosettacode.org/wiki/Sierpinski_carpet#Scheme – but it won’t run in the DrRacket environment or WeScheme. Could someone provide solutions for either environments?
I found code for generating Sierpinski carpet at http://rosettacode.org/wiki/Sierpinski_carpet#Scheme – but it won’t run
Share
I’ve translated the program to run under WeScheme. I’ve made a few changes: rather than use (display) and (newline), I use the image primitives that WeScheme provides to make a slightly nicer picture. You can view the running program and its source code. For convenience, I also include the source here: