mirror of
https://github.com/revarbat/BOSL2.git
synced 2025-08-02 17:17:29 +02:00
Tweak color cubes in Mutators tutorial.
This commit is contained in:
@@ -253,9 +253,11 @@ easier to select colors using other color schemes. You can use the HSL or Hue-S
|
|||||||
color scheme with the `HSL()` module:
|
color scheme with the `HSL()` module:
|
||||||
|
|
||||||
```openscad
|
```openscad
|
||||||
for (h=[0:0.1:1], s=[0:0.1:1], l=[0:0.1:1]) {
|
n = 10; size = 100/n;
|
||||||
translate(100*[h,s,l]) {
|
for (a=count(n), b=count(n), c=count(n)) {
|
||||||
HSL(h*360,1-s,l) cube(10,center=true);
|
let( h=360*a/n, s=1-b/(n-1), l=c/(n-1))
|
||||||
|
translate(size*[a,b,c]) {
|
||||||
|
HSL(h,s,l) cube(size);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -263,9 +265,11 @@ for (h=[0:0.1:1], s=[0:0.1:1], l=[0:0.1:1]) {
|
|||||||
You can use the HSV or Hue-Saturation-Value color scheme with the `HSV()` module:
|
You can use the HSV or Hue-Saturation-Value color scheme with the `HSV()` module:
|
||||||
|
|
||||||
```openscad
|
```openscad
|
||||||
for (h=[0:0.1:1], s=[0:0.1:1], v=[0:0.1:1]) {
|
n = 10; size = 100/n;
|
||||||
translate(100*[h,s,v]) {
|
for (a=count(n), b=count(n), c=count(n)) {
|
||||||
HSV(h*360,1-s,v) cube(10,center=true);
|
let( h=360*a/n, s=1-b/(n-1), v=c/(n-1))
|
||||||
|
translate(size*[a,b,c]) {
|
||||||
|
HSV(h,s,v) cube(size);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
Reference in New Issue
Block a user