# Randomly shifting/moving height on points in a curve?

**URL:** <https://discourse.mcneel.com/t/randomly-shifting-moving-height-on-points-in-a-curve/116836>\
**Category:** Grasshopper\
**Created:** [January 22, 2021, 6:26pm UTC](https://discourse.mcneel.com/t/randomly-shifting-moving-height-on-points-in-a-curve/116836 "2021-01-22T18:26:48Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![closedcurve](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/closedcurve/32/546537_2.png) [@closedcurve](https://discourse.mcneel.com/u/closedcurve)\
**Post date:** [January 22, 2021, 6:26pm UTC](https://discourse.mcneel.com/t/randomly-shifting-moving-height-on-points-in-a-curve/116836/1 "2021-01-22T18:26:48Z")

</div>

Using control points in Rhino I can easily manipulate the heights of the points without losing any XY accuracy. How can I do that in Grasshopper? I don’t like the divide curve/move point method because it wants to rebuild the entire curve and I either end up loosing curve integrity or having to add too many points.

I also want to shift points in random vectors potentially, is there an easier way of doing that than assigning a unique random component to each XYZ point movement? Kind of the same question as above, I ultimately want to create semi-randomly undulating surfaces, but I want better control than I feel Divide Curve provides. Maybe that is the best I can hope for however?

This is a pewter cast I did a couple years ago from Rhino curves and some clever 3D printed molds. Trying to recreate this with random iterations for a series.

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/6/5/8/6584bb9f20dc8e560258958f6f06644a2b388921.jpeg)  
 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/a/2/a/a2a5478c633fcbb5c2c9bbed4a501fd349511b77.jpeg)  
 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/3/a/6/3a63735883b35d89d4adac255d60bfc2387f8928.jpeg)

[curvy plane.gh](https://discourse.mcneel.com/uploads/short-url/zhKHr6tLeAATWUbFpfTQq3hImOo.gh) (10.6 KB)

---

<div class="post-metadata">

**Author:** ![Joseph\_Oster](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/joseph_oster/32/549124_2.png) [@Joseph\_Oster](https://discourse.mcneel.com/u/Joseph_Oster)\
**Post date:** [January 22, 2021, 6:40pm UTC](https://discourse.mcneel.com/t/randomly-shifting-moving-height-on-points-in-a-curve/116836/2 "2021-01-22T18:40:02Z")

</div>

You didn’t internalize your curves.

---

<div class="post-metadata">

**Author:** ![closedcurve](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/closedcurve/32/546537_2.png) [@closedcurve](https://discourse.mcneel.com/u/closedcurve)\
**Post date:** [January 22, 2021, 6:44pm UTC](https://discourse.mcneel.com/t/randomly-shifting-moving-height-on-points-in-a-curve/116836/3 "2021-01-22T18:44:24Z")

</div>

Sorry, rookie move! I’ll update the original post too.

[curvy plane.gh](https://discourse.mcneel.com/uploads/short-url/zhKHr6tLeAATWUbFpfTQq3hImOo.gh) (10.6 KB)

---

<div class="post-metadata">

**Author:** ![Joseph\_Oster](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/joseph_oster/32/549124_2.png) [@Joseph\_Oster](https://discourse.mcneel.com/u/Joseph_Oster)\
**Post date:** [January 22, 2021, 7:15pm UTC](https://discourse.mcneel.com/t/randomly-shifting-moving-height-on-points-in-a-curve/116836/4 "2021-01-22T19:15:43Z")

</div>

OK, I’m really surprised that works with the rails so far from the section curves.

Why is the geometry below the construction plane and not near the origin?

And what is it you want to do again? Move the control points of the three section curves randomly? Up and down or random polar offsets?

> [@Shake curves control points](https://discourse.mcneel.com/t/shake-curves-control-points/116031/24):
>
> 26 control points before and after, three of them duplicated. [shake\_curve\_2021Jan13a.gh](https://discourse.mcneel.com/uploads/short-url/nU3pJVKWXxBAzwXexGAw87iQbrN.gh) (17.7 KB)

---

<div class="post-metadata">

**Author:** ![HS\_Kim](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/hs_kim/32/473975_2.png) [@HS\_Kim](https://discourse.mcneel.com/u/HS_Kim)\
**Post date:** [January 22, 2021, 7:24pm UTC](https://discourse.mcneel.com/t/randomly-shifting-moving-height-on-points-in-a-curve/116836/5 "2021-01-22T19:24:42Z")

</div>

![Canvas at 04;22;37](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/5/4/4/5443db64b4c59e4a6ffc50d071343430168727dc.jpeg)  
[curvy plane\_re.gh](https://discourse.mcneel.com/uploads/short-url/aAykdbnrd42DcFYgL0F5i42ja3G.gh) (16.5 KB)

---

<div class="post-metadata">

**Author:** ![closedcurve](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/closedcurve/32/546537_2.png) [@closedcurve](https://discourse.mcneel.com/u/closedcurve)\
**Post date:** [January 22, 2021, 7:30pm UTC](https://discourse.mcneel.com/t/randomly-shifting-moving-height-on-points-in-a-curve/116836/6 "2021-01-22T19:30:31Z")

</div>

Me too tbh, that’s just how I built it before, I was trying to get rid of the flat ends but still only use a few curves. If def a stretch on the component, just like how loft does really weird but interesting shit sometimes.

To answer your question, both really, I have two projects I’m working on. This one, where I’m playing with random curve/point directions and a 3D cnc carving project where I want curves to shift up and down, following the dips with a V shaped bit creates a cool effect. I think maybe @HS_Kim got it.

---

<div class="post-metadata">

**Author:** ![Joseph\_Oster](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/joseph_oster/32/549124_2.png) [@Joseph\_Oster](https://discourse.mcneel.com/u/Joseph_Oster)\
**Post date:** [January 22, 2021, 7:32pm UTC](https://discourse.mcneel.com/t/randomly-shifting-moving-height-on-points-in-a-curve/116836/7 "2021-01-22T19:32:03Z")

</div>

This is a quick adaptation of the model referred to in the other thread:

 ![curvy plane_2021Jan22a](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/8/3/5/835cfd87dc0fedb44fac41dccaeab97ff84fdfda.png)  
[curvy plane\_2021Jan22a.gh](https://discourse.mcneel.com/uploads/short-url/4xC7Cxn3mQgC0wJ4expSnWwdLLG.gh) (21.5 KB)

Oops, too quick, I forgot to randomize Z… standby.

**P.S.** Added random Z _(but haven’t examined the code closely yet…)_:

 ![curvy plane_2021Jan22b](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/9/2/7/927fde846c168dc2836addae53ae3200cc8b37ee.png)  
[curvy plane\_2021Jan22b.gh](https://discourse.mcneel.com/uploads/short-url/kRhWATEQavqxmwZhAzWiFpGuMF3.gh) (23.3 KB)

---

<div class="post-metadata">

**Author:** ![closedcurve](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/closedcurve/32/546537_2.png) [@closedcurve](https://discourse.mcneel.com/u/closedcurve)\
**Post date:** [January 22, 2021, 7:47pm UTC](https://discourse.mcneel.com/t/randomly-shifting-moving-height-on-points-in-a-curve/116836/8 "2021-01-22T19:47:09Z")

</div>

That’s really smooth! I tied the seeds together for an animation. Interesting to see how the edges kinda break and get sharp (predictable) with some iterations,

 ![](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/9/4/4/9447244e5a72628d5b49bdd4b42b6bdfb19d78ed.gif)

---

<div class="post-metadata">

**Author:** ![Joseph\_Oster](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/joseph_oster/32/549124_2.png) [@Joseph\_Oster](https://discourse.mcneel.com/u/Joseph_Oster)\
**Post date:** [January 22, 2021, 8:29pm UTC](https://discourse.mcneel.com/t/randomly-shifting-moving-height-on-points-in-a-curve/116836/9 "2021-01-22T20:29:36Z")

</div>

> [@closedcurve](#):
>
> I tied the seeds together for an animation

I think it’s interesting to change each seed separately. This one maps Z to plus or minus values:

 ![curvy plane_2021Jan22c](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/9/6/5/965d27ff8cf8d8360bb3f73aa60f1c1014e6afb8.png)  
[curvy plane\_2021Jan22c.gh](https://discourse.mcneel.com/uploads/short-url/1ePajr8G55ohFC9878Be3Dky6v5.gh) (19.8 KB)

---

<div class="post-metadata">

**Author:** ![Joseph\_Oster](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/joseph_oster/32/549124_2.png) [@Joseph\_Oster](https://discourse.mcneel.com/u/Joseph_Oster)\
**Post date:** [January 22, 2021, 10:29pm UTC](https://discourse.mcneel.com/t/randomly-shifting-moving-height-on-points-in-a-curve/116836/10 "2021-01-22T22:29:06Z")

</div>

White group moves the new surface up, lofts it with the original and joins all surfaces to make a solid.

 ![curvy plane_2021Jan22d](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/c/6/5/c65c54c7e880dd740ef0ef337e9965292c65c639.jpeg)  
[curvy plane\_2021Jan22d.gh](https://discourse.mcneel.com/uploads/short-url/mNWQRwScivLpU4eHOKqqzIZ7bVE.gh) (23.6 KB)  
 ![curvy plane_2021Jan22d2](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/d/b/7/db7c135f2522cf13235409d4dc80cd2b0f6ec426.jpeg)  
 ![curvy plane_2021Jan22d3](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/d/c/8/dc82062fbe435da6f730ee0843f0bbf9051a4c79.jpeg)
