Jump to content

Line increasing in distance between points with gradient ramp


Recommended Posts

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.



Link to comment
Share on other sites

  • 3 weeks later...

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...




Link to comment
Share on other sites

  • 5 months later...

Hi bonassus, you can access the next point simply by putting @ptnum + 1 in a point function. distance() then does the measuring between the current point @P and the next one pos_next.

vector pos_next = point(0, "P", @ptnum + 1);
f@pscale = distance(@P, pos_next);
removepoint(0, @numpt - 1);

The last point on the line gets removed, because measuring would not work that way and because the stack of boxes would then overshoot the line. Make sure to move the box up by half it´s height, as well.


  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...