Scribble-compatible image drawing libraries

For HtDP, I started with mostlt 2htdp/images and some picts for diagrams. As it came time to publish, I went all pict. So there’s some experience.

Let’s compare:

2htdp/image

  • smooth learning curve
  • pretty powerful for a teachpack
  • a “CS1” teacher (middle, high, freshman) can use the code for write-ups and for demos

pict

  • somewhat steeper learning curve
  • somewhat different “work"; think (rectangle 100 200 “solid” “green”) vs (rectangle 100 100 #:border-color "green" #:border-width 100) vs (filled-rectangle 100 100 #:color “green”) — the second is NOT what you really want
  • supports racket code (for slideshows for example)
  • more power (drop down and draw into the dc if you want more than pict offers)
  • sharp pictures, ready for commercial printing; relative easy to turn off colors for pict code
    [[ This might have been my lack of understanding all the knobs and dials in 2htdp/image, which is Robby and Ian's even if I added a few lines of code here and there. ]]
  • easily usable for PDF and HTML output (though you should go through SVG and scale differently)

If this doesn’t help you make a decision, ask.

p.s. I initially wrote a little module in pict so I could port 2htdp/image easily to pict. Not worth the effort.

1 Like