# vex How to adjust the width of a point multiple times

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

Some for loop ?

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

• 1

##### 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) ?

Edited by flcc
• 1

##### Share on other sites

I'm sorry for the late reply.
Thank you very much for the scene file!
Thanks to you, the problem has been solved!
Thank you very much, both of you!

Edited by kenneth0322

##### Share on other sites
On 1/15/2022 at 12:16 PM, flcc said:

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

In this particular case, pretransform and transform are identical, because there is no other kind of transform than translate.

##### Share on other sites

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]));
i@class = class;```

spacing_roating_dots.hiplc

• 1

##### Share on other sites

An example on curling multiple curves:

curling_curves.hiplc

## Create an account

Register a new account