Hi, I’m fairly new to Codea and I was hoping that someone could help me with this, I’m trying to create a clas for creating arcs, and this is as far as I have gotten.
Please help
function Geometry:arc(x,y,r,d,a)
-- Codea does not automatically call this method
pushMatrix()
rotate(d,x,y)
pushMatrix()
rotate(d/2,x,y)
clip(x,y,r,r)
popMatrix()
pushMatrix()
rotate(-d/2,x,y)
clip(x,y,-r,r)
popMatrix()
ellipse(x,y,r,r)
clip()
popMatrix()
end