Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- 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.
Creating logarithmic spirals using a conic and a helix. Need some math help!
john_concannon
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:

https://cad.onshape.com/documents/8f65c1667813235a037348da/w/e6d6a886e68d914a56993e10/e/b02f51d28e59bd8b08e851b9
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?

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:

https://cad.onshape.com/documents/8f65c1667813235a037348da/w/e6d6a886e68d914a56993e10/e/b02f51d28e59bd8b08e851b9
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?
0
Best Answer
-
mahir
Member, Developers Posts: 1,320 ✭✭✭✭✭
The equation for a logarithmic spiral isr = 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.

4
Answers
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.
RENDERCAD
rendercad.ai - Photorealistic product rendering.
▚▞▚▞▚▞▚▞▚
________________________________________________________________________
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:
https://cad.onshape.com/documents/abb998532f54a132a42bea8b/w/b0d311a0342c2b1e722bdaf1/e/79973a...
And here is an example of how to model it in the part studio, and simply instantiate it using your custom feature:
https://cad.onshape.com/documents/bf218127a4290c050e205e75/w/42342e313f737ad5d1388f67/e/dd21cb39f...
RENDERCAD
rendercad.ai - Photorealistic product rendering.
▚▞▚▞▚▞▚▞▚
________________________________________________________________________
Boom! @mahir knows his spirals!
RENDERCAD
rendercad.ai - Photorealistic product rendering.
▚▞▚▞▚▞▚▞▚
________________________________________________________________________
And thank you Michael, I'll return to your examples when I start learning to write feature scripts.
Here's an example - I'm using Radians so t is bounded between -pi and pi (2 pi radians in a single rotation)
John
Just a heads up the formula for radius in this example is missing a factor of 2 it should be:
Radius = #a*exp(#b*2*PI*#c*#t)*mm
to match the theta formula
Theta = #c*#t*2*PI*rad
I thought my spiral was unwinding a bit too slow.