-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
It would be interesting to have a function that returns points equidistant on a circle.
points = points_on_circle(n=5, r=100)
shape = polygon(points)
These points can be used to create very intersting shapes by connecting to each other point etc. This will allow the students to achive all these shapes without worrying about sine and cosine.
I'm not particularly happy with the name points_on_circle. Another option is crange, just like range, but returns points on a circle.
pentagon = polygon(crange(n=5)) # r would default to 100
It feels quite useful, but at the same time it also feels like this function doesn't really belong to the joy library and doesn't go well with all other functions.
@amitkaps what do you think?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels