kenneth0322 Posted January 14, 2022 Share Posted January 14, 2022 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. Quote Link to comment Share on other sites More sharing options...
flcc Posted January 14, 2022 Share Posted January 14, 2022 Some for loop ? Quote Link to comment Share on other sites More sharing options...
konstantin magnus Posted January 15, 2022 Share Posted January 15, 2022 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 Quote Link to comment Share on other sites More sharing options...
flcc Posted January 15, 2022 Share Posted January 15, 2022 (edited) 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 January 15, 2022 by flcc 1 Quote Link to comment Share on other sites More sharing options...
kenneth0322 Posted January 16, 2022 Author Share Posted January 16, 2022 (edited) 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 January 16, 2022 by kenneth0322 Quote Link to comment Share on other sites More sharing options...
raincole Posted January 29, 2022 Share Posted January 29, 2022 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. Quote Link to comment Share on other sites More sharing options...
konstantin magnus Posted January 29, 2022 Share Posted January 29, 2022 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; spacing_roating_dots.hiplc 1 Quote Link to comment Share on other sites More sharing options...
konstantin magnus Posted January 29, 2022 Share Posted January 29, 2022 An example on curling multiple curves: curling_curves.hiplc Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.