jon3de Posted January 26, 2016 Share Posted January 26, 2016 I want to copy objects on points and randomize them in rotation (e.g. Y axis) from 0° to 360° but in 90° steps. I think I need kind of an expression like " (round(rand($PT))*90)" but this gives me only 0° or 90°. I do not quite come up with the right solution for 360°. Would be nice to get some help with that. kind regards Jon rotateIn90degreeSteps.hipnc Quote Link to comment Share on other sites More sharing options...
davpe Posted January 26, 2016 Share Posted January 26, 2016 (edited) (round(rand($PT)*4)*90) ?? Edited January 26, 2016 by davpe 1 Quote Link to comment Share on other sites More sharing options...
jon3de Posted January 26, 2016 Author Share Posted January 26, 2016 (edited) hm...I think rand($PT) gives me 0 or 1 and that *4*90 will give me 0° or 360° but nothing between ?! OH sorry davpe!!! you are right! Its works I was to fast sorry. Thank you! Edited January 26, 2016 by jon3de Quote Link to comment Share on other sites More sharing options...
davpe Posted January 26, 2016 Share Posted January 26, 2016 hehe sure, it happens to me all the time Quote Link to comment Share on other sites More sharing options...
Charlietbr Posted September 4, 2021 Share Posted September 4, 2021 Would there be a simple way of doing this while using a copytopoints node rather than a copystamp? New here, thanks! Quote Link to comment Share on other sites More sharing options...
toadstorm Posted September 5, 2021 Share Posted September 5, 2021 in a point wrangle: vector axis = set(0,1,0); float angle = rint(fit01(rand(@ptnum), 0,4)) * 90; p@orient = quaternion(radians(angle), axis); this creates an axis/angle rotation and sets it to the p@orient attribute, which copy to points reads natively. you could also try MOPs Randomize, it has a Step parameter that can lock to specific degrees. 1 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.