Shake curves control points

Hi there,

I am trying to move the control points of a curve in x and y direction so I can make it more irregular, but something went off and I am having a lot of points in the 0,0,0 while my curve doesn’t close properly.
I want to be able to move the points in x and y cordinates but having a single graphmapper to each one.


shake curve.gh (9.5 KB)

Hi,

1 Like

There are many things here that don’t make any sense to me.

  • The Sub List output is identical to its input so what’s the point?
  • The output of Range is only a series of integers 0 to list length, which has one more value than the number of control points. The bounds of those values (0 to 26) must be remapped before connecting it to Graph Mapper. Normally that would be 0 to 1 but has been reconfigured to a non-standard domain.
  • You are remapping the Graph Mapper output for X but not for Y.
1 Like

Still don’t get why it has all those points on 0,0,0 coordination

It’s not complicated, I tried to explain it. Does this help?

Don’t change the default domain of Graph Mapper, remap to and from it instead.

P.S. One of the most essential keys to mastering Grasshopper is to examine and understand both the values and data tree structure going into and coming out of all components.

i already put the graph mapper for both x and y, and reseted it for the default… but still having the same problem

What range of values are you passing into Graph Mapper? When using the default, they must be remapped to the range of 0 to 1.

I’m sorry my words are apparently not helping. This bit of code distills what I was trying to say and show the correct way to use Graph Mapper (at least the way I use it). The values from Range you are using though, (0 to 25) still make no sense to me.


shake_curve_2021Jan11a.gh (15.4 KB)

because i want the control points to move more like a unit itself, not as a whole as much

GIGO

On two occasions I have been asked, “Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?” … I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.

Charles Babbage, Passages from the Life of a Philosopher

I started to look at this, but I don’t understand the desired behavior by reading the extremely brief explanation of the desired output, so I’m unable to help. Maybe if you can more clearly describe how you expect the points/curve to behave then people will be empowered to help to solve your problem.

Sorry, I want each unit of the control points to move in y and x directions, but not in a big range so it will distort the curve. all i want is to “rebuild” the curve as a more irregular one by moving the position of the control points but not all of them in the same time.

Maybe some marked up screenshots, often very telling, worth a thousand words as they say. Still not following the desire, maybe I’m dense.

Hi, I guess you are mixing two things here. Arranging controlpoints doesn’t make curve to follow the same shape. What you want is probally something different.
A.) you subdivide the curve into a equally spaced list of points and then you move them. After that you basically just interpolate them, with the disadvantage of having a very heavy Nurbs. So some sort of reapproximation/refitting/rebuild would benefical to reduce the amount of cps after doing that.
B.) you use the Greville points instead and move them. You then need to interpolate them, ideally with a ‘DeBoor-In-Reverse’ (which is not accessable from Grasshopper) or with the more generic Interpolation method. This way you could skip the refitting, but it likely does not result in the disered shape anyway. So you definitly should go for approach A.). GH has all the tools you need for this.

I understand that. Here’s a different way using random direction (0 to 359 degrees) and distance.


shake_curve_2021Jan12a.gh (16.3 KB)

If you look carefully, you’ll see three control points that have two white lines each instead of the expected one. That’s because your curve has three duplicate control points, as seen in the purple group. An argument can be made that those duplicate points should be moved together instead of in different directions and distances?

1 Like

Since your Nurbs curve is a ‘periodic’ one, so there would be always overlapped control points at the start and end.

If you’d like to move control points and preserve the properties of Nurbs curve, then you should provide the same values to the overlapped cp…


shake curve_re.gh (15.0 KB)

1 Like

yeah, the problem I am having is to rearrabge them in not a messy way as i am doing

in the end I think those 2 points wont be a problem, but ideally, they should move in different ways, but i think this isn’t possible.

Three points. Of course it’s possible!