79405422

Date: 2025-02-01 18:05:09
Score: 0.5
Natty:
Report link

When you draw the y_curve, rotate it in a different direction using the cosine of theta instead of the sine. Also, since you want to connect the lines, elevate the centre of the semicircle to be in between the two adjacent ones: (i + 0.5). Here's the line that shows the right y coordinates for me:

width = 10
spacing = 1
length = 10

for i in range(int(width // spacing)):
    theta = np.linspace(0, np.pi, 100)
    x_curve = length + (spacing / 2) * np.cos(theta)
    y_curve = (i + 0.5) * spacing + (spacing / 2) * np.cos(theta) # this is the line in qquestion
    print(f"X: {x_curve}\nY: {y_curve}")
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Starts with a question (0.5): When you
  • Low reputation (1):
Posted by: 3iM0ViY