Project Folders
Teacher Resources
Student Resources
How Do I?
Site Map
Our Team

MWForum Message [Date Index] [Threads] [Authors] [Attachments] [Subscribe]

[Thread Prev] [Thread Next]

Subject: automatic picture saving
From: mwforum@xxxxxxxxxxxxxxxxxx (Wendy Petti)
Date: Tue, 13 May 2003 19:37:10 -0400

Thank you for sharing.  (Please tell us your name!)  You sound like a very
seasoned Logo lover!

I will provide an answer your specific question about automatic
picture-saving and numbering.  I do not know the answer to the Linux

First, a few remarks on your project so far:  I made a minor correction to
your code and uploaded the revised project to our MW Forum project archive


I renamed the file "bounce-w" because we already have a "bounce" project in
the archive.

The correction is that in your bounce procedure you twice wrote:

fd 1,

producting the error message:  I don't know how to 1,

(There should be no comma after 1.  I removed the commas.)

Okay, on to your question: there is indeed an easy way to automatically
number pictures as you are saving them.  One solution can be found at the
MicroWorlds in Action website, project Squares 7:


That solution involves creating an invisible textbox to hold the file name
as it is being built.  However, I've also uploaded a shorter solution to
our project archive; it is called "bounce-savepict"

The procedure is this:

to save_shot
savepict (word "shot 1 + count pictlist ".gif)

This procedure builds a word out of 3 components.  The second component is
1 + count pictlist

This number will grow as each new picture is added to the list.  Obviously
you would want this project to be placed in a folder without any existing
graphics or the numbering system will not work properly.

Then you would use this procedure inside another, perhaps like this:

to build-a-slideshow
repeat 20 [save_shot wait 3]

(of course changing the numbers after repeat and wait to suit your

HOWEVER!!!!!  Right now this lovely pair of procedures accomplishes
absolutely nothing!!!!  Why??  Because they are taking pictures of empty
backgrounds!  SAVEPICT only preserves the background of the page; it does
not preserve objects.

You might try adapting like this:

to save_shot
everyone [stamp]
savepict (word "shot 1 + count pictlist ".gif)

This would temporarily place the turtles' images on the background, take
their picture, then erase the background without affecting the turtles'

To view your slide sequence, you could write another procedure such as

to view_slides
make "slide# 1
repeat 20 [loadpict word "shot :slide# make "slide# :slide# + 1 wait 3]

I've uploaded my original solution (which takes empty pictures in this
case!) called bounce-saveict as well as the solution which stamps then
cleans the page - called bounce-w-savepict.  The animation is very jerky
though, because of the wait 3; if you really want to recreate the bouncing
in an animated gif you might want to make the page size much much smaller
and then take the pictures much more rapidly and include many more of them
in your animation.

I attach the second solution here.

Hope this helps!

Wendy Petti
Director of Curriculum, OpenWorld Learning
content developer for OWL's MicroWorlds in Action
Math Cats

> >3) How do you hope this group can be helpful to you?
>  By answering one specific and one general question.
> Specifically, how can
>  you generate sequential file names so that a program can save a sequence
>  of screen shots so that we can produce an animated gif?  I develop, with
>  the kids, a bounce program, which has two turtles carroming off
> the walls
>  and each other; if I could generate a sequence of file names
> like shot01,
>  shot02, shot03, etc., I could use savepict "shotxy.gif to save
> a sequence
>  of gifs and then create the animated gif.

Attachment: bounce-w-savepict.mw2
Description: Binary data

  • Previous by thread: RE: Welcome to the "MWForum" mailing list
  • Next by thread: RE: Welcome to the "MWForum" mailing list

  • To save an attachment to your computer, PC users should right-click (Mac users, click and hold the mouse button) on the link and then choose 'save target as' from the pop-up menu. A window will then pop up in which you can choose a location for the file.

    © copyright 2001 - 2008