Jump to content

Turn ramp position into an attribute


Recommended Posts

In attached hip file, I need to convert the ramp position into an attribute. I don't know how many positions therefore colours there will be.

I've tried by copying the parameter ramp1pos BUT it turns out it's only the first position, ramp1pos. There are apparently as many ramp#pos as there are colours.

How do I tell each point, this is your ramp position? how do I create an attribute from the ramp position procedurally not knowing how many colours there will be, it could change.

ramppos_B.png

ramppos_A.png

ramppos.hiplc

Edited by karen
Link to comment
Share on other sites

Try using a fit inside a point wrangle driven by your id and maximum expected id value.
 

int max_id_value = 5;
f@ramp_position = fit(i@id,0,max_id_value,0.0,1.0);

 

Edited by Atom
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.

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