sicp-lang/sicp

paint other image

Closed this issue · 2 comments

I want to paint other images like

(paint einstein)

how to implement this? thanks.

@chaomaer

Hi. Use the new version of the painter language.

  1. Download https://github.com/sicp-lang/sicp/blob/master/sicp-pict2/sicp.rkt
    and the einstein image: https://raw.githubusercontent.com/sicp-lang/sicp/master/sicp-pict2/einstein2.jpg
    (save them in the same folder)
  2. Open "sicp.rkt" in DrRacket
  3. Run it (to check that everything works)
  4. Use (bitmap->painter "my image.jpg") to make a painter that draws a bitmap.

thanks you , it works.