diff --git a/Scale.md b/Scale.md index b45f7ba..7c936d8 100644 --- a/Scale.md +++ b/Scale.md @@ -62,3 +62,28 @@ set {_scaled::*} to {_circle::*} scaled at player by 1 in direction of vector 2, The result is an ellipse that has a two times larger radius in the x-direction than in the z-direction. Image with the green particles showing the original circle and the flame particles showing the ellipse: ![](https://i.imgur.com/e6W2mhm.png) + +*** + +The same is possible with 3D shapes like spheres, which we can scale in all 3 dimensions at once: +``` +set {_sphere::*} to sphere with radius 1 and density 5 +set {_scaled::*} to {_sphere::*} scaled by 2 in direction of vector 1, 2, 3 +``` +With locations: +``` +set {_sphere::*} to sphere at player with radius 1 and density 5 +set {_scaled::*} to {_sphere::*} scaled at player by 2 in direction of vector 1, 2, 3 +``` +Which results in an ellipsoid: + +![](https://i.imgur.com/ZG5uT2C.png) + +Note also that the ellipsoid has not more points than the sphere. Sometimes it is therefore more useful to make a bigger shape and then shrink it to keep a high density of points. We can change the previous example to use a big sphere and then shrink it: +``` +set {_sphere::*} to sphere with radius 6 and density 5 +set {_scaled::*} to {_sphere::*} scaled by 1 in direction of vector 1/3, 1/2, 1 +``` + +Which results in an ellipsoid with a lot more points: +![](https://i.imgur.com/UEJKC5E.png)