mandel: use tri@ in scale-rgb
parent
fc9e87db1c
commit
1fa98e2121
|
@ -1,19 +1,19 @@
|
||||||
IN: benchmark.mandel
|
|
||||||
USING: arrays io kernel math math.order namespaces sequences
|
USING: arrays io kernel math math.order namespaces sequences
|
||||||
byte-arrays byte-vectors math.functions math.parser io.files
|
byte-arrays byte-vectors math.functions math.parser io.files
|
||||||
colors.hsv io.encodings.binary ;
|
colors.hsv io.encodings.binary ;
|
||||||
|
|
||||||
: max-color 360 ; inline
|
IN: benchmark.mandel
|
||||||
: zoom-fact 0.8 ; inline
|
|
||||||
: width 640 ; inline
|
: max-color 360 ; inline
|
||||||
: height 480 ; inline
|
: zoom-fact 0.8 ; inline
|
||||||
: nb-iter 40 ; inline
|
: width 640 ; inline
|
||||||
: center -0.65 ; inline
|
: height 480 ; inline
|
||||||
|
: nb-iter 40 ; inline
|
||||||
|
: center -0.65 ; inline
|
||||||
|
|
||||||
: scale 255 * >fixnum ; inline
|
: scale 255 * >fixnum ; inline
|
||||||
|
|
||||||
: scale-rgb ( r g b -- n )
|
: scale-rgb ( r g b -- n ) [ scale ] tri@ 3array ;
|
||||||
rot scale rot scale rot scale 3array ;
|
|
||||||
|
|
||||||
: sat 0.85 ; inline
|
: sat 0.85 ; inline
|
||||||
: val 0.85 ; inline
|
: val 0.85 ; inline
|
||||||
|
@ -30,7 +30,7 @@ colors.hsv io.encodings.binary ;
|
||||||
|
|
||||||
SYMBOL: cols
|
SYMBOL: cols
|
||||||
|
|
||||||
: x-inc width 200000 zoom-fact * / ; inline
|
: x-inc width 200000 zoom-fact * / ; inline
|
||||||
: y-inc height 150000 zoom-fact * / ; inline
|
: y-inc height 150000 zoom-fact * / ; inline
|
||||||
|
|
||||||
: c ( i j -- c )
|
: c ( i j -- c )
|
||||||
|
|
Loading…
Reference in New Issue