# RoughEase with only positive increments

## Recommended Posts

Is there any way to apply RoughEase where the values only continue on a positive trajectory?

When I use the ease visualizer any graph I build will have drops into the negative (Dropbox screenshot), before rising again.

##### Share on other sites

Hey Matthew,

Technically the curve in the image that you linked to has four  "negative" values, not two. The other two are just more subtle. It's very hard to have a rough ease with 0 "negative" values because if you start out with a line who's slope is greater than 1 then you need to compensate for it going forward. The only case where a rough ease could only have "positive" points is if it looked something like an easeIn curve but with each segment happening to randomly all be slightly increasing in their slope (but not too much to where the average is greater than 1). Does that make sense?

With that being said, you could try blending a rough ease with another ease (like an easeIn) to try and get a curve that's more like this. For example, I used the code:

```var line1 = "power2.in",
line2 = RoughEase.ease.config({ template:  Power1.easeIn, strength: 1.5, points: 10, taper: "both", randomize:  true, clamp: true}),```

in our BlendEase helper pen (one of our many helper functions)

See the Pen JjPyWwx by GreenSock (@GreenSock) on CodePen

to generate a CustomEase of `CustomEase.create("custom", "M0,0,C0,0,0.117,-0.001,0.19,0.007,0.242,0.012,0.276,0.017,0.325,0.036,0.365,0.053,0.391,0.072,0.43,0.103,0.479,0.143,0.518,0.164,0.555,0.222,0.725,0.49,1,1,1,1")` but it ends up looking a lot like an easeIn curve (obviously).

• 1
##### Share on other sites

Thanks for the input @ZachSaucier, I'm probably just going to go the custom ease route.

##### Share on other sites

Hey @Matthew Severin. I'm curious about why you'd want only positive values. Like...what effect are you going for exactly? A RoughEase without any doubling-back wouldn't end up looking rough at all  But yeah, a CustomEase will give you whatever you're looking for. Again, I was just curious.

• 1
##### Share on other sites

Hey Jack so I was working on an animation where there is condensation on a can and drips would slowly be moving downwards because if gravity. Typically that kind of motion is erratic but always in one direction,  (in this case, down), never back tracking. I was looking for a shortcut to this.

• 2
##### Share on other sites

Rough ease in my mind still makes sense even if it’s consistently incremental or decremental.

##### Share on other sites

Ah, okay. Yeah, CustomEase seems like the most logical option then. ?

• 1
##### Share on other sites

18 hours ago, Matthew Severin said:

I was working on an animation where there is condensation on a can and drips would slowly be moving downwards because if gravity. Typically that kind of motion is erratic but always in one direction,  (in this case, down), never back tracking.

Interesting use case. To do it accurately you'd have to account for velocity, other water droplets, and things like that. But if you're just using ease you could make something similar to a stepped ease but with less regular intervals (using CustomEase).