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
Hypnotic pookkalam
By
Aditya Aravind
Run
from math import cos, sin screen = rectangle(w=300, h=300, fill="black") def drawSpiral(x,y, color, width=100, cycles=2): global screen buffer = [] step = (3.14 * cycles ) / width for i in range(width): p = point(x+ i * sin(i * step),y + i * cos(i * step)) buffer.append(p) screen += polyline(buffer, stroke=color , stroke_width=2) drawSpiral(0,0, "red", width=300, cycles=16) drawSpiral(8,0, "blue", width=300, cycles=16) show(screen)
Comments
Want to discuss?
Post it here, our mentors will help you out.
Login