Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

MSWLogo Pattern Procedures Please

196 views
Skip to first unread message

Darren Smith

unread,
Feb 8, 2003, 6:39:11 AM2/8/03
to
Hello

Does anyone have any nice simple(ish) pattern procedures for MSWLogo that
would have a 'wow' factor on my year 8 kids. We had some network problems on
our last lesson and I need to maintain their interest in this app.

TIA
--
Darren


Darren Smith

unread,
Feb 8, 2003, 8:33:23 AM2/8/03
to

"andy roberts" <andy.r...@zetnet.co.uk> wrote in message
news:5ns94vkdkbe53efhe...@4ax.com...
> Have you taught them parameter substitution and recursion yet? Those
> concepts have a high wow factor, well I think so anyway.

I like those as well. In fact recursion and parameters are the theme of next
lesson (lesson 2 year 8 - they haven't done logo in year7). I hope to get
them to a point of drawing a square, RT 5, drawing another square and so on
through procedures then altering this code to do polygons using variables
for sides and size. Then similar with Label.

I was after more advanced patterns as an intro 'This is what you can do with
logo" and an extension activity for those who finish (Enter and runs procs
then ammend code for different results).

--
Darren

Darren Smith

unread,
Feb 8, 2003, 12:04:12 PM2/8/03
to

"andy roberts" <andy.r...@zetnet.co.uk> wrote in message
news:dq4a4v8qvbruegmd7...@4ax.com...
{SNIP}
>
> repeat that 72 times and you have a nice spirograph type drawing, they can
> try that with different polygons.

Yeah, that was the plan :-)

>I doubt you'll get much further than that
> in one lesson. For aesthetic effect, you could try running it as
>
> pd
> repeat 360 [ RT 1 square ]
>
> then
>
> repeat 360 [ RT 1 polygon 5 40 ]

Good thinking .... - I will give this a shot.

{SNIP}
> Mmm, I don't understand "Label" What's that then ?

It sends output to the screen (I hope!!!)

Label "Hello
Label [Like this if you want more than one word]

After the polygons I was going to get them to produce a procedure that will
repeat a spin of there name or something.

> I had some fun with a procedure that draws a line of a certain length ,
> then turns left a bit, calls itself with a line length set to say 80% of
> the parent line length value, then turns back to the right and does the
same
> again to form a symmetrical branching tree. You also need an if statement
> in there to stop it looping once the detail reached a sufficient fine
limit,
> say length 5.
>
> Then make the angle of bifurcation a passed parameter and run it with
> different combinations of angles and percentages.
>
> This should demonstrate how, from a simple procedure just a few lines
long
> you can generate quite complex and very different looking designs.
{SINPPED CODE}


Cheers for all of that. Something for me to play with tonight ;-)

--
Darren


Andrew Virnuls

unread,
Feb 8, 2003, 5:37:31 PM2/8/03
to

"Darren Smith" <da...@dagza.fsnet.co.uk> wrote in message
news:b230v0$bc7$1...@newsg4.svr.pol.co.uk...

>
> "andy roberts" <andy.r...@zetnet.co.uk> wrote in message
> news:5ns94vkdkbe53efhe...@4ax.com...
> > Have you taught them parameter substitution and recursion yet? Those
> > concepts have a high wow factor, well I think so anyway.
>
> I like those as well. In fact recursion and parameters are the theme of
next
> lesson (lesson 2 year 8 - they haven't done logo in year7). I hope to get
> them to a point of drawing a square, RT 5, drawing another square and so
on
> through procedures then altering this code to do polygons using variables
> for sides and size.

Why would that require recursion? I'd had thought an iterative method would
be much simpler!

Andrew
--
and...@advanced-ict.info Swatting the wasps from the
http://www.advanced-ict.info pure apple of truth

Ben Newsam

unread,
Feb 8, 2003, 8:24:06 PM2/8/03
to
Andrew Virnuls <and...@virnuls.freeserve.co.uk> writes, despite their
Organization header saying ''

>Why would that require recursion? I'd had thought an iterative method
>would be much simpler!

IMO recursion is never necessary. Even when it appears to be, it can be
avoided, and also IMO, should be. Its only value is in providing food
for thought with some elegant definitions such as pling functions or
reversing lists and so on.
--
Ben

dmjsky

unread,
Feb 9, 2003, 4:09:59 AM2/9/03
to

> IMO recursion is never necessary. Even when it appears to be, it can be
> avoided, and also IMO, should be. Its only value is in providing food
> for thought with some elegant definitions such as pling functions or
> reversing lists and so on.
> --
> Ben

I think to say it is 'never necessary' is incorrect. How would you implement
a quick sort algorithm without doing it recursively?

D


Andrew Virnuls

unread,
Feb 9, 2003, 7:27:03 AM2/9/03
to
"Ben Newsam" <ne...@microser.demon.co.uk> wrote in message
news:A0kf+UU2...@microser.demon.co.uk...

Andy is right - there are certain classes of problems (called something like
NP-complete, if I can remember back to my degree days!), such as timetabling
or the 8 Queens Problem - basically anything that involves trying to fit
smaller things into a larger thing - that can only be solved by "recursive
backtracking" algorithms.

In most other cases you can probably get by without it, though, and I'd have
thought it was a rather heavy concept for year 7 and their Logo lessons!

Andrew


Ben Newsam

unread,
Feb 9, 2003, 3:54:22 PM2/9/03
to
andy roberts <andy.r...@zetnet.co.uk> writes, despite their
Organization header saying '.'
>It might be a heavy subject for university students but I read that
>primary school kids will just accept it without any problem as long as
>you don't make too big a deal out of it. As I said , I didn't get the
>chance to test that out yet but it will come.

I really do object to "tail recursion" in which people are encouraged to
build loops by the lazy method of adding a further procedure call as the
last line of a procedure. Aaaargh, nasty, and promotes bad habits.
--
Ben

MTW

unread,
Feb 9, 2003, 4:52:11 PM2/9/03
to
On Sat, 8 Feb 2003 13:33:23 -0000, "Darren Smith"
<da...@dagza.fsnet.co.uk> tickled the keyboard:

>
>"andy roberts" <andy.r...@zetnet.co.uk> wrote in message
>news:5ns94vkdkbe53efhe...@4ax.com...
>> Have you taught them parameter substitution and recursion yet? Those
>> concepts have a high wow factor, well I think so anyway.
>
>I like those as well. In fact recursion and parameters are the theme of next
>lesson (lesson 2 year 8 - they haven't done logo in year7). I hope to get
>them to a point of drawing a square, RT 5, drawing another square and so on
>through procedures then altering this code to do polygons using variables
>for sides and size. Then similar with Label.
>

Drawing a chess board. Draw 8 squares in a row and fill every other
one. Turn around and come back the other way. Turn around again and
repeat the previous steps 3 more times.

Get's them thinking spacially espcially at the end of lines.

Another idea is the star

to star :points
repeat (:points*2) [fd 150 rt 180-(180/:points)]
end


This works for all odd and even integers greatar than or equal to 4

Even numbers give double the points
Odd numbers give exact number of points

Good fun to play with at Christmas.

MTW

www.mathszone.co.uk
www.southbury.enfield.sch.uk
____________________________________________

Mark Evans

unread,
Feb 14, 2003, 3:44:16 AM2/14/03
to

Actually for plenty of real world problems
using recursion (either direct or mutual)
makes for considerably easier coding.

--
Mark Evans
St. Peter's CofE High School
Phone: +44 1392 204764 X109
Fax: +44 1392 204763

0 new messages