# Spiral from point to point with non constant slope

**URL:** <https://discourse.mcneel.com/t/spiral-from-point-to-point-with-non-constant-slope/129600>\
**Category:** Grasshopper\
**Tags:** mac\
**Created:** [September 2, 2021, 7:53am UTC](https://discourse.mcneel.com/t/spiral-from-point-to-point-with-non-constant-slope/129600 "2021-09-02T07:53:24Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![arten](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/arten/32/697219_2.png) [@arten](https://discourse.mcneel.com/u/arten)\
**Post date:** [September 2, 2021, 7:53am UTC](https://discourse.mcneel.com/t/spiral-from-point-to-point-with-non-constant-slope/129600/1 "2021-09-02T07:53:25Z")

</div>

Hi guys,

I know how to make a spiral using polar component. But what I am trying to make is to have

1. Two points which I can move on a circle and these point will always be an end of spiral curve
2. And spiral between these two points should have variable slope.

For second question I thought to use graph mapper

Hope images will help  
[CustomSpiral.gh](https://discourse.mcneel.com/uploads/short-url/f3sMmuJzWjBc9VYUhBbjTe1yZN4.gh) (6.4 KB)

 ![Screenshot 2021-09-02 at 08.43.45](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/e/0/7/e0777e36097a0cca809db701d1337f955f6aa33d.jpeg)  
 ![Screenshot 2021-09-02 at 08.44.01](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/4/e/4/4e4d9ca89c9971e1ce78fab80ef2f00cdc461c1e.png)

---

<div class="post-metadata">

**Author:** ![martinsiegrist](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/martinsiegrist/32/772775_2.png) [@martinsiegrist](https://discourse.mcneel.com/u/martinsiegrist)\
**Post date:** [September 2, 2021, 8:39am UTC](https://discourse.mcneel.com/t/spiral-from-point-to-point-with-non-constant-slope/129600/2 "2021-09-02T08:39:49Z")

</div>

I’m not a Graph Mapper specialist but it can be used to do what you want.

In my case I used a python script to generate the spiral. I needed to divide the resulting curve and deconstruct the points to get the Z values of the points.

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/0/0/a/00a75839c1d7a61b68fa88a4a5b1c40b3f408ee8.png)

[CustomSpiral.gh](https://discourse.mcneel.com/uploads/short-url/1HnbHFuhbZYFgNRk0q1tHAlOtcT.gh) (20.8 KB)

---

<div class="post-metadata">

**Author:** ![Adam\_M](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/adam_m/32/769331_2.png) [@Adam\_M](https://discourse.mcneel.com/u/Adam_M)\
**Post date:** [September 2, 2021, 8:47am UTC](https://discourse.mcneel.com/t/spiral-from-point-to-point-with-non-constant-slope/129600/3 "2021-09-02T08:47:19Z")

</div>

Here is a similar method to Martin, but without creating the initial spiral:

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/5/a/2/5a26245b191345dae2d085b9712f9ab5cab36442.jpeg)  
[CustomSpiral\_V2.gh](https://discourse.mcneel.com/uploads/short-url/8B0neDyTF8cVkD0ZNhBiKqzxfCC.gh) (10.6 KB)

---

<div class="post-metadata">

**Author:** ![arten](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/arten/32/697219_2.png) [@arten](https://discourse.mcneel.com/u/arten)\
**Post date:** [September 2, 2021, 8:55am UTC](https://discourse.mcneel.com/t/spiral-from-point-to-point-with-non-constant-slope/129600/4 "2021-09-02T08:55:37Z")

</div>

Thank you guys,  
@Adam_M I did something similar to yours but,

Not sure how to keep track of the angle between two points?  
You see when I past 180 degrees it doesn’t work ?

 ![Screenshot 2021-09-02 at 09.52.30](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/4/9/4/494f431e5ef1e3a297f0d3410076e592257ea3f5.png)  
[CustomSpiral.gh](https://discourse.mcneel.com/uploads/short-url/u3RIE0wLPT7OWmy0CVGLDQ1nzPv.gh) (16.4 KB)  
 ![Screenshot 2021-09-02 at 09.52.50](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/2/b/a/2ba55cd8610ba9cf159875781cf5c1d18ab5bb9a.png)  
 ![Screenshot 2021-09-02 at 09.52.43](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/7/f/5/7f55f8dc3fc2c558f9ea32e88fad1f7a8ee370b1.jpeg)

---

<div class="post-metadata">

**Author:** ![arten](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/arten/32/697219_2.png) [@arten](https://discourse.mcneel.com/u/arten)\
**Post date:** [September 2, 2021, 9:04am UTC](https://discourse.mcneel.com/t/spiral-from-point-to-point-with-non-constant-slope/129600/5 "2021-09-02T09:04:30Z")

</div>

Basically how to fix this ? 🙂  
 ![spiral](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/4/b/7/4b77b59d1d97d6e71b740e702a3a4b8e8d258cf1.gif)

---

<div class="post-metadata">

**Author:** ![Mahdiyar](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/mahdiyar/32/472862_2.png) [@Mahdiyar](https://discourse.mcneel.com/u/Mahdiyar)\
**Post date:** [September 2, 2021, 9:19am UTC](https://discourse.mcneel.com/t/spiral-from-point-to-point-with-non-constant-slope/129600/6 "2021-09-02T09:19:29Z")

</div>

[CustomSpiral.gh](https://discourse.mcneel.com/uploads/short-url/3dKcuv5bIrylIqHcgu9Gr8f5wCA.gh) (15.8 KB)

---

<div class="post-metadata">

**Author:** ![arten](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/arten/32/697219_2.png) [@arten](https://discourse.mcneel.com/u/arten)\
**Post date:** [September 2, 2021, 4:11pm UTC](https://discourse.mcneel.com/t/spiral-from-point-to-point-with-non-constant-slope/129600/7 "2021-09-02T16:11:40Z")

</div>

Hi @Mahdiyar

Thank you. I made a wee progress on this.  
I am trying to build a second spiral on top of the first one.  
I was using the same principle but for some reason it is still misses the point (picture 1)

In the middle I do want the spiral to change its direction. (picture 2 is correct)

Thanks  
[CustomSpiral\_01.gh](https://discourse.mcneel.com/uploads/short-url/97XdVHPcgvX7INdAW6fONgJfIYK.gh) (26.1 KB)

 ![Screenshot 2021-09-02 at 17.08.07](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/9/3/e/93e7f0b96565da907536b9a143da60e682dd4a58.png)

 ![Screenshot 2021-09-02 at 17.08.24](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/7/9/4/7940b404acf5a3f107ae38fe9d33fd3aee1aae7a.png)

---

<div class="post-metadata">

**Author:** ![Adam\_M](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/adam_m/32/769331_2.png) [@Adam\_M](https://discourse.mcneel.com/u/Adam_M)\
**Post date:** [September 3, 2021, 6:37am UTC](https://discourse.mcneel.com/t/spiral-from-point-to-point-with-non-constant-slope/129600/8 "2021-09-03T06:37:06Z")

</div>

Like this?  
[CustomSpiral\_01\_v1.gh](https://discourse.mcneel.com/uploads/short-url/64jyRIrfkMR5WiBPtmB4c2rl9Be.gh) (30.6 KB)

---

<div class="post-metadata">

**Author:** ![arten](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/arten/32/697219_2.png) [@arten](https://discourse.mcneel.com/u/arten)\
**Post date:** [September 3, 2021, 9:25am UTC](https://discourse.mcneel.com/t/spiral-from-point-to-point-with-non-constant-slope/129600/9 "2021-09-03T09:25:44Z")

</div>

Thank you @Adam_M  
I solved it last night 🙂

---

<div class="post-metadata">

**Author:** ![arten](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/arten/32/697219_2.png) [@arten](https://discourse.mcneel.com/u/arten)\
**Post date:** [September 3, 2021, 2:20pm UTC](https://discourse.mcneel.com/t/spiral-from-point-to-point-with-non-constant-slope/129600/10 "2021-09-03T14:20:02Z")

</div>

Hey Adam,  
I still struggle to get the spiral look the way I want. Basically what ever I do two spiral curve are parallel ☹  
I want to be able to control the amount of squashiness , see image below… red line it is what I want

 ![Screenshot 2021-09-03 at 15.06.28](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/e/6/9/e69dc35000f42a050a3ed8ce59e3bf06110fe91c.png)  
[CustomSpiral\_03.gh](https://discourse.mcneel.com/uploads/short-url/kKQtdgJpBwnsTwy9mtncBxpn4zD.gh) (37.0 KB)

---

<div class="post-metadata">

**Author:** ![Adam\_M](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/adam_m/32/769331_2.png) [@Adam\_M](https://discourse.mcneel.com/u/Adam_M)\
**Post date:** [September 3, 2021, 3:17pm UTC](https://discourse.mcneel.com/t/spiral-from-point-to-point-with-non-constant-slope/129600/11 "2021-09-03T15:17:23Z")

</div>

I’m not sure exactly what you are looking for, but maybe this could give you some ideas:

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/c/3/6/c365ead6e80bc60e239a0f7568f15a5ba9a6fdfd.png)  
[CustomSpiral\_03\_v2.gh](https://discourse.mcneel.com/uploads/short-url/70bDCNVHnWSt7lWdBAku7nbRrf0.gh) (37.3 KB)

---

<div class="post-metadata">

**Author:** ![arten](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/arten/32/697219_2.png) [@arten](https://discourse.mcneel.com/u/arten)\
**Post date:** [September 3, 2021, 3:21pm UTC](https://discourse.mcneel.com/t/spiral-from-point-to-point-with-non-constant-slope/129600/12 "2021-09-03T15:21:39Z")

</div>

Thank you,  
Will take a look over weekend.  
Have a good weekend Adam, thanks for help

---

<div class="post-metadata">

**Author:** ![arten](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/arten/32/697219_2.png) [@arten](https://discourse.mcneel.com/u/arten)\
**Post date:** [September 3, 2021, 4:24pm UTC](https://discourse.mcneel.com/t/spiral-from-point-to-point-with-non-constant-slope/129600/13 "2021-09-03T16:24:11Z")

</div>

Well not exactly 🙂  
Two spiral curves have to start and end in opposite points 🙂

---

<div class="post-metadata">

**Author:** ![arten](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/arten/32/697219_2.png) [@arten](https://discourse.mcneel.com/u/arten)\
**Post date:** [September 4, 2021, 9:56am UTC](https://discourse.mcneel.com/t/spiral-from-point-to-point-with-non-constant-slope/129600/14 "2021-09-04T09:56:54Z")

</div>

@Adam_M , I thought about it and it looks like, I need

1. Two spiral curves which start fro opposite points , this is done
2. One of the curve has control of pitch or squishiness without actually increasing number of revolutions of the spiral.

So when I loft / rail between two curves profile appears squished at one side.

Hope my sketch will help.

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/d/d/9/dd9a60e0666dcd6629ceb00795d8e8913ab3812b.jpeg)

---

<div class="post-metadata">

**Author:** ![arten](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/arten/32/697219_2.png) [@arten](https://discourse.mcneel.com/u/arten)\
**Post date:** [September 6, 2021, 11:08am UTC](https://discourse.mcneel.com/t/spiral-from-point-to-point-with-non-constant-slope/129600/15 "2021-09-06T11:08:11Z")

</div>

Hi guys @Adam_M @martinsiegrist @Mahdiyar  
Apologies for asking to many questions.  
I made an experiment in rhino, to be able to get the shape I want I had to use mesh cage to deform curves.  
Is there a way I can do the same with graph mapper or scale within Grasshopper ?

 ![Screenshot 2021-09-06 at 12.03.20](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/4/4/7/44719fde3e3693731607fc8511822639dec9c364.png)

---

<div class="post-metadata">

**Author:** ![martinsiegrist](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/martinsiegrist/32/772775_2.png) [@martinsiegrist](https://discourse.mcneel.com/u/martinsiegrist)\
**Post date:** [September 6, 2021, 11:52am UTC](https://discourse.mcneel.com/t/spiral-from-point-to-point-with-non-constant-slope/129600/16 "2021-09-06T11:52:50Z")

</div>

![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/7/5/8/7585b0c546b609173e965921195b5406c8361bc4.jpeg)

[CustomSpiral.gh](https://discourse.mcneel.com/uploads/short-url/qArXymv9w755LuOE3RwcLYjr3L7.gh) (24.0 KB)

---

<div class="post-metadata">

**Author:** ![arten](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/arten/32/697219_2.png) [@arten](https://discourse.mcneel.com/u/arten)\
**Post date:** [September 6, 2021, 11:58am UTC](https://discourse.mcneel.com/t/spiral-from-point-to-point-with-non-constant-slope/129600/17 "2021-09-06T11:58:14Z")

</div>

Thank you @martinsiegrist  
I will take a look now.  
I was trying to do it with attracting points… to be able to have more control.  
Not sure how to fix the curve at ground floor though 🙂

 ![Screenshot 2021-09-06 at 12.57.45](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/a/5/f/a5f1467d3f6784130a40571c27bea17def8ed4e1.png)  
 ![Screenshot 2021-09-06 at 12.58.00](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/6/c/a/6ca13cdf38cf1e58c33298c9840525567de78380.png)

---

<div class="post-metadata">

**Author:** ![martinsiegrist](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/martinsiegrist/32/772775_2.png) [@martinsiegrist](https://discourse.mcneel.com/u/martinsiegrist)\
**Post date:** [September 6, 2021, 12:14pm UTC](https://discourse.mcneel.com/t/spiral-from-point-to-point-with-non-constant-slope/129600/18 "2021-09-06T12:14:42Z")

</div>

It is difficult to help you without a file.

---

<div class="post-metadata">

**Author:** ![arten](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/arten/32/697219_2.png) [@arten](https://discourse.mcneel.com/u/arten)\
**Post date:** [September 6, 2021, 12:44pm UTC](https://discourse.mcneel.com/t/spiral-from-point-to-point-with-non-constant-slope/129600/19 "2021-09-06T12:44:31Z")

</div>

Sorry @martinsiegrist  
See attached [CustomSpiral\_03.gh](https://discourse.mcneel.com/uploads/short-url/odMwzn8PtIfws69hbcbDQTMGVfX.gh) (55.1 KB)

I placed only one point for now, but I assume I can use multiple attraction points to control the curve. Almost the same way you did with graph mapper

---

<div class="post-metadata">

**Author:** ![martinsiegrist](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/martinsiegrist/32/772775_2.png) [@martinsiegrist](https://discourse.mcneel.com/u/martinsiegrist)\
**Post date:** [September 6, 2021, 1:57pm UTC](https://discourse.mcneel.com/t/spiral-from-point-to-point-with-non-constant-slope/129600/20 "2021-09-06T13:57:30Z")

</div>

Sorry can’t see the point because it’s not internalized.

[Next page](https://discourse.mcneel.com/t/spiral-from-point-to-point-with-non-constant-slope/129600.md?page=2)
