Code Comments
Programming Forum and web based access to our favorite programming groups.Could anyone tell me how to display a picture file on my local hard disk into scheme-graphics? For example, those .gif pictures in SICP section 2.4 http://mitpress.mit.edu/sicp/full-t...tml#%_sec_2.2.4 Thanks a lot!
Post Follow-up to this messageMa wrote: > Could anyone tell me how to display a picture file on my local hard > disk into scheme-graphics? For example, those .gif pictures in SICP > section 2.4 >=20 > http://mitpress.mit.edu/sicp/full-t...tml#%_sec_2.2.= 4 A recipe for DrScheme: <http://schemecookbook.org/Cookbook/...eractionWindow= > --=20 Jens Axel S=F8gaard
Post Follow-up to this messageMa wrote: > Could anyone tell me how to display a picture file on my local hard > disk into scheme-graphics? For example, those .gif pictures in SICP > section 2.4 >=20 > http://mitpress.mit.edu/sicp/full-t...tml#%_sec_2.2.= 4 > Thanks a lot! >=20 See also Sperber's implementation of SICP's picture language for DrScheme= : <http://www-pu.informatik.uni-tuebin...r/software/ind= ex.html> --=20 Jens Axel S=F8gaard
Post Follow-up to this messageThis would be nice, but I'm using MIT Scheme 7.7.1 under Windows XP. Have you any straightforward way to implement graphics display on this software? Jens Axel S=F8gaard wrote: > Ma wrote: > http://mitpress.mit.edu/sicp/full-t...tml#%_sec_2.2.4 > > See also Sperber's implementation of SICP's picture language for DrScheme: > > <http://www-pu.informatik.uni-tuebin...ware/index.htm= l> >=20 > --=20 > Jens Axel S=F8gaard
Post Follow-up to this messageThanks! I'm enjoying DrScheme. But the language support seems to be quite different from MIT scheme... I seem unable to run the programs I wrote previously. Can you help me out?
Post Follow-up to this messageMa wrote: > Thanks! I'm enjoying DrScheme. But the language support seems to be > quite different from MIT scheme... I seem unable to run the programs I > wrote previously. Can you help me out? Hi Ma, DrScheme supports several versions of Scheme. If you follow SICP then choose in the menu "Language" the menu item "Choose Language", fold out t= he blue triangle before PLT and choose the language "Pretty Big". To install the SICP picture language follow the instructions below: 00:00:00 --- log: started scheme/04.09.05 07:58:14 <soegaard> You were asking about the picture language in SICP, r= ight? 07:58:38 <jim> soegaard: yes 07:58:58 <soegaard> Mike Sperber implemented it for PLT Scheme. 07:59:18 <jim>:) 07:59:45 <soegaard> In DrScheme go to the file menu, and choose "Install = =2Eplt file" 08:00:07 <soegaard> Then enter 08:00:08 <soegaard> http://www-pu.informatik.uni-tuebingen.de/users/sperb= er/software/picture.plt 08:06:33 <soegaard> jim: I am looking for documentation to start it, it m= ust be there somewhere 08:13:45 <soegaard> ah! 08:14:22 <soegaard> jim: In the "Language" menu choose "Add TeachPack". 08:15:24 <soegaard> jim: Then choose the file picture.ss hidden in the Te= achPack directory (on my machine: C:/documents=20 and settings/js/Application Date/PLT 208.1/teachpack/picture.ss 08:15:38 <soegaard> jim: Press "Go" 08:15:56 <soegaard> jim: Then try: (paint (corner-split einstein 1)) 08:16:30 <jim> soegaard: trying to find the teachpack (I installed the fi= le as root in linux) 08:31:19 <soegaard> jim: And (paint (corner-split einstein 1)) works? 08:32:51 <jim> we're getting there. it knows paint but not corner-split 08:33:19 <jim> hah! it works 08:33:28 <soegaard> jim: ah! I loaded one of the example files first 08:33:32 <jim> (paint einstein) 08:34:08 <soegaard> jim: I loaded example.scm first and corner-split is d= efined there. 08:34:50 <jim> are there stick figures? 08:36:01 <soegaard> jim: Open the file collects/painters.ss and see all t= he provided procedures. 08:36:14 <jim> ahh 08:36:21 <soegaard> jim: There is a segments->painter which can be used t= o make stick figures. 08:37:45 <jim> soegaard: ok, good enough... now how can I make the image = larger? 08:38:00 <soegaard> use paint-hi-res 08:39:41 <jim> soegaard: -very- good :) thank you very much :) 08:39:51 <soegaard> no problem --=20 Jens Axel S=F8gaard
Post Follow-up to this messageThanks a lot! It's nice to see the solutions to 8-queen problem displayed in a nice format on this DrScheme. But it still seems to have less pre-defined functions from MIT Scheme. For example, (square number) works on the latter but not the former. This doesn't matter much any way...
Post Follow-up to this messageMa wrote: > Thanks! I'm enjoying DrScheme. But the language support seems to be > quite different from MIT scheme... I seem unable to run the programs I > wrote previously. Can you help me out? How one displays graphics on a computer depends on the hardware, the operating system, and the graphics API provided by that operating system for that hardware. This graphics API is--as a rule--never Scheme. It's usually C. Consequently, there is no guarantee of a pre-manufactured solution to your problem. Your choice is to either take advantage of someone else's solution (which will always be tied to a specific Scheme implementation on a specific platform), or build your own (which will likewise be tied to a specific Scheme implementation on a specific platform). If you're lucky, your chosen Scheme implementation will have been ported to more than one platform *and* provide a platform-independent graphics API. I have no experience with it, but I think DrScheme is just such an implementation. -thant
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.