![]() Another way to do rotation is with a matrix. That all works, but gets a little tricky if you want to do rotations that aren't perfectly aligned on the x/y/z axis. y = cos ( amount + angle + twirl ) * r Rotate with a matrix x = sin ( amount + angle + twirl ) * r P. y )) float amount = radians ( ch ( 'amount' )) float twirl = r * ch ( 'twirl' ) P. Scatter some points, put down a wrangle with this:įloat angle = atan ( P. Here's the more common ones:Įxample: Random delete points by thresholdĪfter Matt Ebb showed me this, I use it a million times a day. There's a few built in variables you can use, easiest way to see them is to put down a point vop, and look at the global params. Eg, measure the distance of a point from the origin: dist = distance() - measure the distance between two points: dist = attributes length() - measure the length of a vector.radians() - convert a number from degrees to radians: foo = radians(90).Usually feed it the point id, so each point gets a random number: foo = sin(), cos() - as you'd expect, but in radians. rand() - generate a random number between 0 and 1. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |