Welcome to od|forum

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.


Line increasing in distance between points with gradient ramp

I'm trying to arrange (or add) points on a line so that the distance between them decreases based on a ramp. I have a ramp controlling Cd on the line using:

@ptnum/(@numpt -1)

I tried using a scatter node and generating the points based on Density Attribute Cd. But this results in some randomness in the decreasing distance. 

I thought I could use the resample node's distance attribute. but i haven't figured it out. 

I could one could shed some light here I would appreciate.



Share this post

Link to post
Share on other sites

Hi bonassus,

create a line with say 50 points and attach a point wrangle, e.g.

@P.y = chramp('shift', @P.y);


float shift = chf('shift');
@P.y = pow(@P.y, shift);

and click on the little icon appearing on the right of your code.


1 person likes this

Share this post

Link to post
Share on other sites

Thanks again for your response and to my last question. I'm wondering if you could help me with an other question relating to this set up. If you took the line described above for which the distance between the points decrease. Is there a way to get the distances between each point? Say for use in copying boxes to the points whose heights decrease in proportion to the point distances? Sorry of the convoluted questions. feel free to completely ignore this...




Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now