awacke1 commited on
Commit
7791160
·
verified ·
1 Parent(s): 7a37a91

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -2,6 +2,9 @@ import streamlit as st
2
  import matplotlib.pyplot as plt
3
  import numpy as np
4
 
 
 
 
5
  def generate_colored_circle_template(num_circles):
6
  fig, ax = plt.subplots(figsize=(6, 6))
7
  ax.set_xlim(0, 1)
@@ -35,10 +38,8 @@ def generate_symmetrical_circle_layout(num_layers):
35
  def generate_fibonacci_spiral_layout(num_points):
36
  fig, ax = plt.subplots(figsize=(6, 6))
37
  ax.axis('off')
38
- n = num_points
39
- golden_ratio = (1 + np.sqrt(5)) / 2
40
  radius = 0.05
41
- for i in range(n):
42
  angle = i * 2 * np.pi / golden_ratio
43
  distance = np.sqrt(i) * radius
44
  x = 0.5 + distance * np.cos(angle)
 
2
  import matplotlib.pyplot as plt
3
  import numpy as np
4
 
5
+ # Define golden_ratio as a global constant
6
+ golden_ratio = (1 + np.sqrt(5)) / 2
7
+
8
  def generate_colored_circle_template(num_circles):
9
  fig, ax = plt.subplots(figsize=(6, 6))
10
  ax.set_xlim(0, 1)
 
38
  def generate_fibonacci_spiral_layout(num_points):
39
  fig, ax = plt.subplots(figsize=(6, 6))
40
  ax.axis('off')
 
 
41
  radius = 0.05
42
+ for i in range(num_points):
43
  angle = i * 2 * np.pi / golden_ratio
44
  distance = np.sqrt(i) * radius
45
  x = 0.5 + distance * np.cos(angle)