# Interlocked spirals

Trying some new stuffs (for me) with kind of interlocked spirals. It surely exists in some plugin but I didn’t search. The idea is simple, make sort of spiral between the center of a face mesh and vertex around. Spiral is done with a polyline, so discontinuities are also part of the look.

Looks like stuff presented there

9 Likes

THIS IS AWESOME.

um yes, it was.
LOL
lolol

Thanks
I find strange that this didn’t exist. It is surely in Mesh+ or Yellow …
The idea is so simple take a point on the center of a mesh face, take a point at a Vertex of the face. Put points between these points. Rotate each point around a vector with an angle depending on the number of point. Connect all the points,
Many variations possible

`````` public static Polyline GetPolyline1(Point3d p1, Vector3d v1, Point3d p2, Vector3d v2, double angle1, double angle2, double rmin, int n_divisions, double power, double powerLength)
{

rmin = Math.Min(0.9, Math.Max(0.01, rmin));
power = Math.Min(10, Math.Max(0.1, power));
Point3d departurePoint = p1 + (p2 - p1) * rmin;

List<Point3d> lst_points = new  List<Point3d>();

for (int i = 0; i < n_divisions; i++)
{
double t = (double) i / ((double) n_divisions - 1.0);
// double angle = angle1 - (angle2 - angle1) * Math.Pow((double) i / ((double) n_divisions - 1.0), power);
double angle = angle1 * SFunction(1 - t, power);
//Vector3d vect = v1 + (v2 - v1) * (double) i / ((double) n_divisions - 1.0);
Vector3d vect = v1;
Point3d pt = departurePoint + (p2 - departurePoint) * Math.Pow((double) i / ((double) n_divisions - 1.0), powerLength);
pt.Transform(Transform.Rotation(angle, vect, p1));
}
return new Polyline(lst_points);
}
public static double SFunction(double x, double puissance)
{
if (x < 0.0) x = 0.0;
if (x > 1.0) x = 1.0;
if (puissance <= 0.0) puissance = 0.001;
double output = 0.0;
if (x < 0.5)
{
output = 0.5 * Math.Pow(x * 2, puissance);
}
else
{
output = 1 - 0.5 * Math.Pow((1 - x) * 2, puissance);
}
return output;
}``````
4 Likes

Thanks for posting this Laurent. Wrote my own script for this a while back using fatten for mesh smoothing.

6 Likes