My girlfriend wanted to learn about programming, so I gave her a few lessons in Codea and this is what she came up with. Extra points if you figure out the tv show reference.
-- emilia
-- Use this function to perform your initial setup
function setup()
FartSize=20
Angle=0
print("my life is like a fart")
end
-- This function gets called once every frame
function draw()
-- This sets a dark background color
background(41, 178, 23, 255)
-- This sets the line thickness
--rotate(Angle)
strokeWidth(5)
FartSize=20+math.random(10)
fontSize(FartSize)
fill(122, 0, 255, 255)
text("my life is like a fart",CurrentTouch.x,CurrentTouch.y)
-- Do your drawing here
if CurrentTouch.state== MOVING then
Angle = Angle + 10
end
translate(math.cos(ElapsedTime)*100+WIDTH/2,
math.sin(ElapsedTime)*100+HEIGHT/2)
drawSmiley()
end
function drawSmiley()
local e = 20 + math.random(13)
noStroke()
local red = 128 + math.random() * 128
local green = 128 + math.random() * 128
local blue = 128 + math.random() * 128
pushMatrix()
scale(CurrentTouch.x/WIDTH*5 +1)
fill(red,green,blue)
ellipse(0,0,100)
fill(255, 255, 255, 255)
ellipse(-25,25,e*.75)
ellipse(25,25,e)
local h = 20 + math.sin(ElapsedTime) * 20
ellipse(0,-25,60,h)
fill(0, 0, 0, 255)
popMatrix()
end