Advertisement
Guest User

Untitled

a guest
Feb 26th, 2024
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. def create_golden_ratio_pattern(base_radius, num_circles):
  2. golden_ratio = 1.618
  3. base_x, base_y = 0, 0 # Starting point for the first circle
  4. circles = []
  5.  
  6. for i in range(num_circles):
  7. radius = base_radius * (golden_ratio ** i)
  8. x, y = base_x, base_y # Adjust x, y based on your pattern's requirements
  9. circles.append((x, y, radius))
  10.  
  11. return circles
  12.  
  13. # Example usage
  14. base_radius = 10
  15. num_circles = 10
  16. pattern = create_golden_ratio_pattern(base_radius, num_circles)
  17.  
  18. # Now you have a list of tuples, each containing the x, y coordinates and radius of each circle
  19.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement