karen Posted April 15, 2023 Share Posted April 15, 2023 attached hip, I need to rotate randomly each copy in a copy and transform sop. I know I can do that with a copy to points and orient, but I need each copy to be proprotoionally bigger than the previous, this isn't about random pscale, they have to be 10% bigger than the previous one, this is why I need to use the copy and transform, but then I've never randomised the rotation in a copy and transform sop. Any idea? randomly_rotate_copies_in_a_copy_and_transform.hiplc Quote Link to comment Share on other sites More sharing options...
Alain2131 Posted April 15, 2023 Share Posted April 15, 2023 (edited) Copy to Points can still be used. You just have to bake in the consideration you mentioned into the attributes you need. orient can be randomized as you pointed out. Then, you need pscale to be 10% bigger for each copies. Make as many points as you need (point generate, add, or whatever way to create points). Each point has a point number associated with them. If you set the pscale to the point number, then it'll go from 0 to 1, 2, 3, and so on for each points. That would be making each copies 100% bigger each time. If you multiply this by 0.1, then you get 0, 0.1, 0.2, 0.3, and so on. You need the scale to start at 100%, which is pscale 1, so add 1 to the result. You get 1.0, 1.1, 1.2, 1.3, and so on. And there you have it, each copies are 10% bigger than the previous one ! You can edit anything you want on the template points, such as the position (set the position to the point number multiplied by 5 in the y axis, for example). float scale_factor = 0.1; @pscale = @ptnum * scale_factor + 1; @P.y = @ptnum * 5; Edited April 16, 2023 by Alain2131 Quote Link to comment Share on other sites More sharing options...
hannes603 Posted April 17, 2023 Share Posted April 17, 2023 transform pieces ? randomly_rotate_copies_in_a_copy_and_transform_transpieces.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.