my math is faulty. :(
In generate_spokes_path() I test for overlapping spokes at mount_radius.
If overlapping, I increase mount_radius.
My test is:
if spoke_width * spoke_count +0.5 >= two_pi * mount_radius:
My intention was to calculate the circumference assuming mount_radius and check to see if calculated spoke circumference was larger.
But I think a better calc is to calc angle subtended by N spokes (3 spokes=120 deg) vs calculated angle if isoceles tri had base of spoke_width.
i.e. radius = 2a cos(alpha) where a = spoke_width
but for low spoke_counts angle is > 90 so my math skills fail. (too tired - sad really...)
Also having failed the test - it seems like it should be possible to calculate by how much the mount radius should be increased so that the spokes do not overlap.
Can you help ?
my math is faulty. :(
In
generate_spokes_path()I test for overlapping spokes at mount_radius.If overlapping, I increase mount_radius.
My test is:
My intention was to calculate the circumference assuming mount_radius and check to see if calculated spoke circumference was larger.
But I think a better calc is to calc angle subtended by N spokes (3 spokes=120 deg) vs calculated angle if isoceles tri had base of spoke_width.
i.e. radius = 2a cos(alpha) where a = spoke_width
but for low spoke_counts angle is > 90 so my math skills fail. (too tired - sad really...)
Also having failed the test - it seems like it should be possible to calculate by how much the mount radius should be increased so that the spokes do not overlap.
Can you help ?