List: discuss@lists.openscad.org
From: Sanjeev Prabhakar
Re: Generating a helix with linear extrude
Wed, Feb 28, 2024 11:04 AM
topolar2(p) = [
> norm(p),
> atan2(p.y, p.x)
> ];
>
> // Helix angle
> helix_a = atan2(pitch, helix_r*2*PI);
>
> // degrees per unit, along the circumference
> theta_scale = 360/(2*PI*helix_r);
>
> // Banana, algorithm A
> bananaA = function() [
> for (a=[0:359])
> torect2([helix_r, 0] + [r*cos(a), r * sin(a) * theta_scale / sin(helix_a)]