[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

LOGO-L> Re: Post on Comp.Lang.Logo



Zaheer Mohammad wrote:
> 
> Yehuda,
>      I cut 'n' pasted your code for the Russian Red Star and played
>      about with the parameters. Unfortunately, I was unable to see the
>      parameters you specified in your original post (my browser seems
>      to have skipped over the input text and straight onto the picture).
>       So, my question to you is what parameters do I need to enter in
>      order get produce   the wonderful piece of artistry.
> 
> Thanks in advance.
> 
> .. Zaheer


Ahlan ya akh Zaheer,

Here's again the code:

==============================================
to main
cs ht
pr[Input points, head angle, size and level]
do rw rw rw rw
end

to do :points :head_ang :size :level
if :level<1[stop]
rt 180
repeat :points[rt out_ang/2 shape rt out_ang/2]
fill_it
rt 180
end

to shape
fd :size lt :head_ang/2
do :points :head_ang .4*:size :level-1
lt :head_ang/2 bk :size
end

to out_ang
op 360/:points+:head_ang
end

to fill_it
pu bk 2 setfc :level fill fd 2 pd
end
==============================================

Now let's see what are the needed parameters to run it, in order to get
an inner 5-pointed red star:

The first input is the number of points, so it should be 5.

The second input it the stars point's head angle. Let it be 30 (you
        might try also other angles).

The third input is the sides size. It can be anything reasonable. Let's
        say 60.
The fourth input is the maximal level (=depth). Since we want the inner
        star to be red, and since the number of read is 4 (in the
        single index color system, which is now supported also by
	MSWLogo), and since the color in this program reflects the
	"depth" of each star in the framework of the image - it should 
	be 4.

To sum up, you might try the following inputs:

        5 30 60 4

I hope this helps, waila alliqaa,

[[Yehuda]]

GIF image



Global SchoolNet Foundation - Linking Kids Around the World!
Copyright GSN - All Rights Reserved - Comments & Questions
Visit GSN's Global Schoolhouse for more exciting learning resources!
Search our Site - Home