back to math cats love MicroWorlds
MicroWorlds index
Hearts Overview
Go to the hearts project!
Get the MicroWorlds Web Player
so you can use the project

screenshot of hearts (inactive buttons)


To use this project, you need the free MicroWorlds Web Player, but you do not need to know anything about MicroWorlds.

This project creates many different heart designs. Each button launches a different heart-design procedure. You control the number of hearts and their size, color, and thickness with sliders. Here are some examples.

If you own MicroWorlds and would like to create your own heart design project from scratch, here are the procedures. Create buttons and sliders as shown. (There is also an invisible textbox named "pagenumber" for use in the slideshow.)

* * * * *

Procedures for Hearts:

to heart
setpensize pensize.
pd make "heart.heading heading repeat 11 [fd heart# * 2 rt 20]
fd heart# * 16.5
pu seth :heart.heading fd heart# * 14.5
pd repeat 11 [fd heart# * 2 lt 20]
fd heart# * 16.5
end

to nesting.heart
setc pencolor
heart
pu seth :heart.heading fd heart# * 14.5
end

to head-to-toe.heart
setc pencolor
heart
pu
end

to erase.all
clean seth 0 pu setpos [50 15] pd setbg 0
end

to spin.heart
heart
pu seth :heart.heading
end

to spin.hearts
setc pencolor
repeat how.many [spin.heart rt 360 / how.many]
end

to travel.hearts
setc pencolor
repeat how.many [spin.heart rt 360 / how.many setc color + 1]
end

to many.travel.hearts
pu sety 50 setx -30 pd
setc pencolor
repeat 5 [repeat how.many [spin.heart rt 360 / how.many setc color + 1] pu setx xcor + 60 ifelse color < 3 [setc 1] [setc color - 3]]
end

to spread.heart
setpensize pensize. setc pencolor
pu fd heart# * 29 pd
heart
pu seth :heart.heading
bk heart# * 14.5
end

to spread.hearts
repeat how.many [spread.heart rt 360 / how.many]
end

to good.color
make "good.colors [11 12 13 14 15 16 21 22 23 24 25 31 32 33 40 41 42 43 44 45 46 50 51 52 53 54 55 60 61 62 63 64 65 66 67 71 72 73 74 75 76 81 82 83 84 85 91 92 93 94 95 101 102 103 104 105 110 111 112 113 114 115 121 122 123 124 125 131 132 133 134 135 ]
end

to fill.hearts
good.color repeat how.many [fill.heart rt 360 / how.many setc pick :good.colors]
end

to fill.hearts8
repeat how.many [fill.heart rt 360 / how.many ]
end

to fill.heart
setpensize pensize.
pu fd heart# * 29
heart
pu seth :heart.heading fd heart# * 5 fill
bk heart# * 19.5
end

to change.background
setbg bgcolor
end

* * * * * * * * * * * * * * * * *

to save.picture
snapshot
newpage ht
restore
page1
announce [Your picture has been saved on a new page.]
end

to slideshow
make "howmanytimes 3 * count pagelist
repeat :howmanytimes [make "thispage# bf bf bf bf first pagelist
make "nextpage# :thispage# + 1
if :nextpage# > count pagelist [make "nextpage# 1]
pagenumber, ct insert "page insert :nextpage#
getpage pagenumber
wait speed]
end

© copyright 2001 -   Wendy Petti of Math Cats.   All Rights Reserved.