Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
2. Need support? Ask a question to our Community Support category.
3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
4. Be respectful, on topic and if you see a problem, Flag it.

If you would like to contact our Community Manager personally, feel free to send a private message or an email.

Options

Creating logarithmic spirals using a conic and a helix. Need some math help!

Member Posts: 6
I've been trying to create logarithmic spirals in Onshape, and have found a few special features that other users have kindly developed, but none of these met my needs. You can project a regular (Archimedean) spiral on to a sketch easily enough using a conical helix:

But I wanted a logarithmic spiral (i.e. one where the distance between the turnings increase in geometric progression) and unfortunately you can't project a helix on to anything other than a cone or a cylinder. So instead, I used the loft feature to create a surface from a helix to its axis. I then created a horn shaped object by rotating a sketch with a conic about its axis. I then subtracted (Boolean) the horn from the surface. I could then 'use' (i.e. project) the inside edge of the surface on to a sketch in a perpendicular plane:

In this way the spiral shape is determined by only three variables: The radius of the horn's base:

the number of turns (rotations) the helix makes:

and the Rho of the conic used to sketch the horn's cross section.

The height of the horn has no influence.

What I would like to do is understand the relationship between these variables and the spiral's logarithmic ratio (the geometric progression of the distances between the turnings of the spiral), so that I can (a) figure out what variables to use to create a golden spiral (i.e. with a ratio equal to the golden ratio) and then perhaps at some future point once I've learned how, (b) incorporate these variables into a feature script that draws logarithmic spirals using just these three variables.

So, can anyone point me in the right direction?

• Options
Member, Developers Posts: 1,292 ✭✭✭✭✭
The equation for a logarithmic spiral is r = ae^(bθ). This can either be implemented via custom FS, or you can use my Parametric Curve FS to generate it. Here's an example.

• Options
Member Posts: 1,740 PRO

What exactly are you having trouble with? If you can make it in the part studio, it can be either instantiated or recreated via FS.

CADSharp  -  We make custom features and integrated Onshape apps!   cadsharp.com/featurescripts 💎
• Options
Member Posts: 6
I can make it in the part studio, and in time I’ll learn how to implement it in feature script, but what I want to do is understand the relationship between the independent variables (number of turns, and Rho) and the dependent variable, the ratio of the spirals’ increase in distance from the origin per turn.  Because ultimately, I want to be able to draw a golden spiral (i.e. one with a ratio equal to the golden ratio).
• Options
Member Posts: 1,740 PRO

Not sure I can help you with understanding the variables. But I can help with FeatureScript.

Here is an example of how to create a spiral from scratch within FS using solid modeling approaches:

And here is an example of how to model it in the part studio, and simply instantiate it using your custom feature:

CADSharp  -  We make custom features and integrated Onshape apps!   cadsharp.com/featurescripts 💎
• Options
Member, Developers Posts: 1,292 ✭✭✭✭✭
The equation for a logarithmic spiral is r = ae^(bθ). This can either be implemented via custom FS, or you can use my Parametric Curve FS to generate it. Here's an example.

• Options
Member Posts: 1,740 PRO

Boom! @mahir knows his spirals!

CADSharp  -  We make custom features and integrated Onshape apps!   cadsharp.com/featurescripts 💎
• Options
Member Posts: 6
Thank you Mahir. It certainly looks like I can use the Parametric Curve FS to create a golden spiral, a more direct method than I was aiming for, so I'll close this question as answered.

And thank you Michael, I'll return to your examples when I start learning to write feature scripts.
• Options
Member Posts: 43 EDU
Thank you Mahir.  I used your fine script and pushed the logarithmic curve into the 3rd dimension using "1 * t" as the last variable.  Would you know how to allow just one revolution?  Regards, Robert.
• Options
Member Posts: 6
Hi Robert. You can set upper and lower bounds for the angle of

Here's an example - I'm using Radians so t is bounded between -pi and pi (2 pi radians in a single rotation)

The document is here: Single rotation parametric curve

John
• Options
Member, Developers Posts: 1,292 ✭✭✭✭✭
Thank you Mahir.  I used your fine script and pushed the logarithmic curve into the 3rd dimension using "1 * t" as the last variable.  Would you know how to allow just one revolution?  Regards, Robert.
You can use @john_concannon 's method, but I personally prefer to leave #t bounded between 0 to 1 and instead vary the formula for #theta by replacing #t with #t*360*deg. That way the other formulas aren't impacted.