Jump to content

How to adjust the width of a point multiple times


kenneth0322

Recommended Posts

Hi. I am a beginner.
I understand myself that this is a stupid question, but I'm getting confused, so can someone please help me?

I have created a point using the addpoint function. I would like to change the interval of it multiple times, what should I do?
For example, I want 1~23 points to be spaced 1 meter apart, 24~86 points to be spaced 2.5 meters apart, 87~123 points to be spaced 5 meters apart, and so on. And those points are in a straight line.
If anyone can help me with this, please let me know.

Sorry if my English is bad. Thanks.

Link to comment
Share on other sites

Hi Ken,

set up a line with zero length, initialize transforms using rig doctor, and shift point positions in a rig wrangle:

int class = 0;
class += i@ptnum > 23;
class += i@ptnum > 87;

float spacing[] = array(1.0, 2.5, 5.0);
pretranslate(4@localtransform, set(0.0, 0.0, spacing[class]));

 

spacing_dots.hiplc

  • Thanks 1
Link to comment
Share on other sites

class += i@ptnum > 23;
class += i@ptnum > 87;

I like these two lines :)
I have to remember the trick
I've just converted the rig wrangle into a classic detail wrangle. May be more "classical" way.

@konstantin magnus
by the way, why do you use pretransform rather than transform (who seam to also work) ?

Classical vex way.hiplc

Edited by flcc
  • Thanks 1
Link to comment
Share on other sites

  • 2 weeks later...

Ok, then maybe this allows for testing a bit more:

int partition[] = array(12, 38);
float spacing[] = array(1.5, 2.5, 5.0);
float rotation[] = array(-3, 2, 18);

int class = 0;
foreach(int part; partition){
    class += i@ptnum > part;
}

translate(4@localtransform, set(0.0, 0.0, spacing[class]));
rotate(4@localtransform, radians(rotation[class]), {1,0,0});
i@class = class;

image.png.ad88f6eea6463dbba96d5fbbb49a2f79.png

 

spacing_roating_dots.hiplc

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

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