Creating Circular Spiral Pattern

Hi everyone,

I’m trying to create something like a pattern of circular spiral.

I have tried to create polycurve, then offset it multiple times and stopped trying to trim and connect the ends of the curves. Not sure if that’s the right way to do it. Or even the dynamo is not a good tool to create something like that. Maybe some python code?

Find my script below.
V2_TESTING.dyn (65.2 KB)

Anything helps. Especially if someone has a good idea how to this patter suppose to look like in formulas etc. Thanks.

BTW I’m using Dyn 2.0.2

V619_TESTING.dyn (48.0 KB)

Hope this will solve your problem.
there is 3 input parameter required for making this type of spiral.

1 Like

Probably a macabre show of Python inabilities and inadequate commented code, but I’m currently picking up on Python and I got triggered by your initial post of circular patterns, so I figured why not share it. Comments more than welcome, Learning is always fun! :wink:
(Doesn’t necessarily solve your problem, but anyways…)

# Load the Python Standard and DesignScript Libraries
import sys
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *

# The inputs to this node will be stored as a list in the IN variables.
dataEnteringNode = IN

countSpirals = IN[0]
startLen = IN[1]
startDir = IN[2]
# Place your code below this line
points = []
startPt = Point.ByCoordinates(0,0,0)
nrOfSpirals = range(4*countSpirals)

for i in nrOfSpirals:
	if i == 0:
		points.append(startPt)
	else:
		startLen += 1
		_countLst = []
		line = Line.ByStartPointDirectionLength(startPt,startDir,startLen)
		points.append(line.EndPoint)
		if len(_countLst) < 2:
			_countLst.append(startLen)
		else:
			_countLst = []
			startLen += 1
		
		startDir = line.Direction.Rotate(Vector.ZAxis(), 90)
		startPt = line.EndPoint

# Assign your output to the OUT variable.
OUT = points

Fun to play with as well! :slight_smile:

5 Likes

That’s some intriguing shape!

@jostein_olsen & @honeyjain619 - amazing work guys! This is something that I was looking for quite a while. I was asking how to create spiral pattern, so I would say that both suggestions are solutions.

Even if it’s not exactly what I’m looking for. At least I can use both suggestions and try generate my idea further.

Just a few questions for both of you.

Is there a way to create such a pattern starting not from the middle point, but having the outer point?
So the idea would be to make as many curves as possible and stop by (for example) minimum point direction length…or if the minimum length off the point to the nearest curve is less than …?

In both ways we do have spiral pattern which is kind of square. Is is even possible to make something like I have uploaded before? Let’s say polygon with 8 corners? 6 corners?


I think this is something that requires some more coding and digging even more deeper. What do you think?

And the last question would be - is it possible to create these curves at the beginning having a polygon which is not closed. See my picture above (I had a polygon at the beginning and tried to offset it as many times as possible).

I’m glad that we have this discussion.

Thank you once again for your ideas and thoughts.

Certainly doable:

A simplified, node based version which only produces the middle curve not the surface or colors:

3 Likes

@JacobSmall, I have tried to use your node base version and I ended up with this problem:

Looks like your lines aren’t connecting ‘wave n’ to ‘wave n+1’, likely an issue in tbe 2nd to lst grouping. Hard to know but disable all of your geometry preview prior to that group and see where your lines are being drawn by the last node in that group. In particular look at the List.Drop nodes.

Actually, I haven’t changed anything in your node base version. Even the initial building curve outlines are the same. If you’re sure that everything is correct on your end, I will try match my nodes with yours and find an error or smth.
Otherwise, I will try to fix this as per your comment. Thx

I am certain that the sequence I used produces the spiral. Feel free to post your current DYN and I’ll try and look it over later today.

UPDATE:

I was copy - pasting a very first code block with a negative number. Just found that the second code block supposed to be positive number. My bad. Just a small thing, but makes a big difference. @JacobSmall, thank you for your input in helping me out.

1 Like

Glad it worked out - hopefully this does what you’re after, or at least gives you enough of a clue to understand the logic behind it.

1 Like