[MWForum]MIA, Ask an Expert Question
Wendy Petti
mwforum@lists.mathcats.com
Mon, 17 May 2004 17:24:23 -0400
Here's another way to solve your problem so have windows of many different
colors, using only one spaceship shape and one turtle shape.
You can program one turtle so that it always "follows" another turtle.
Suppose you have a turtle-shaped turtle that you've named WINDOWS and
another turtle named SPACESHIP. Spaceship is in the foreground (hatched
later than Windows). You can adjust the size of the Windows turtle so that
the belly of the turtle extends far enough to color the windows of the
spacesuip. Depending on where the transparent squares are on your
spaceship, and the size and shape of your spaceship, you might be able to
use this instruction for your Windows turtle, set to "many times":
Windows, setpos list (ask "Spaceship [xcor]) + 0 (ask "Spaceship [ycor]) +
10
I've put in numbers (including 0) to demonstrate where and how you could
tweak the positioning of the Windows turtle; of course you would adjust the
numbers as needed or omit them.
You could give the spaceship this instruction, set to many times:
FD 0.1
(or whatever speed works for you).
Then you could write this procedure:
to fly
spaceship, clickon
Windows, clickon
forever [Windows, setc random 140 wait 5]
end
I tried it and it works! In this way, you can have windows flashing
different colors at random.
Wendy Petti
OWL's MicroWorlds in Action
http://mia.openworldlearning.org
Math Cats
http://www.mathcats.com
-----Original Message-----
From: mwforum-admin@lists.mathcats.com
[mailto:mwforum-admin@lists.mathcats.com]On Behalf Of Jeff Knope
Sent: Monday, May 17, 2004 9:09 AM
To: mwforum@lists.mathcats.com
Subject: Re: [MWForum]MIA, Ask an Expert Question
Hi Jean,
Have you done any testing to see how big a spaceship you can put in a shape?
If your spaceship is smaller than you'd like it to be, try making a bigger
one. You'll be surprised! It'll look small in the shape table, but when you
bring it to graphics area, it'll be the original size it was when you made
it.
Shapes are allowed to have many colors in the same shape. You can even make
a photograph into a shape. I'm pretty sure that's why MicroWorlds doesn't
allow the use of setc with shapes.
Good luck, Jeff
----- Original Message -----
From: Jean Stringer
To: mwforum@lists.mathcats.com
Sent: Monday, May 17, 2004 5:11 AM
Subject: Re: [MWForum]MIA, Ask an Expert Question
Thanks for taking the time to answer. I just wonder why the turtle can
change colors but no other shape can? It would be the easiest for what I
want to do.
Make a space ship with blinking windows. Since the space ship is a shape the
windows need to be small. Almost as small as the little dot in and empty
shape. On the space ship I leave blanks where the windows go then put in
square shapes there. I have used two different ones, but I wanted more
colors and setc would be easire.
Thanks again,
Jean
Jeff Knope <jknope@asis.com> wrote:
Jean asked,
> Is there a way to change the colors of shapes you create?
>
> I would like to create polygons and have them change colors ????????
Hi Jean,
One way is to create your images in different colors and assign each of them
to different shapes. Then use setsh (setshape) to make the change.
Another way is to use a hidden turtle to draw the polygons, then change the
turtle color with setc, and redraw them right over the old ones with the new
color.
Good luck, Jeff
----- Original Message -----
From: "Ask an Expert - Question"
To:
Sent: Sunday, May 16, 2004 7:03 AM
Subject: [MWForum]MIA, Ask an Expert Question
> This is an automatic message sent from the web form at:
> http://mia.openworldlearning.org/howdoi.htm
>
> from: "Jean Stringer"
> date: Sun, 16 May 2004 7:25:47 -0600
>
> When I have the turtle shape I can make him change colors several ways.
> repeat 5 [ setc 1 wait 5 setc 2 wait 5]
>
> 0r a dolist
>
> However only the turtle shape will change colors for me.
> If I draw a shape {a square or triangle or circle} and want
> it to change colors I can't make it happen. I have tried
> empty shapes and filled shapes. Neither will change color.
> Is there a way to change the colors of shapes you create?
>
> I would like to create polygons and have them change colors ????????
>
> Thank you!
> Jean
>
>
> _______________________________________________
> MWForum mailing list
> MWForum@lists.mathcats.com
> http://lists.mathcats.com/mailman/listinfo/mwforum
> Attach ments archived at:
> http://www.mathcats.com/mwforum/attachments.html
> To unsubscribe or for administrative questions contact
> mailto:mwforum-admin@lists.mathcats.com
>
>
_______________________________________________
MWForum mailing list
MWForum@lists.mathcats.com
http://lists.mathcats.com/mailman/listinfo/mwforum
Attachments archived at:
http://www.mathcats.com/mwforum/attachments.html
To unsubscribe or for administrative questions contact
mailto:mwforum-admin@lists.mathcats.com
Do you Yahoo!?
SBC Yahoo! - Internet access at a great low price.