Explore
Courses
Batches
Sketches
Statistics
Code a Pookkalam
Jobs
Devsprint
People
Course Creation
Create a Course
Guidelines
Resources
Support
Blogs
My Profile
About Us
Login
Sketches
0
star with functions
By
ARJUN
Run
#inspired by nadeem(star) r= rectangle(x=0,y=0,w=300,h=300,fill="black") show(r) def star(size): p1 = point(x=-size/2, y=0) p2 = point(x=0, y=2*size) p3 = point(x=size/2, y=0) p4 = point(x=0, y=-2*size) shape1 = polygon([p1, p2, p3, p4], fill="silver", stroke="none") shape2 = shape1 | rotate(45) shape3 = shape1 | rotate(90) shape4 = shape1 | rotate(135) return(shape1+shape2+shape3+shape4) s = star(50) show(s)
Comments
Want to discuss?
Post it here, our mentors will help you out.
Login