Advertisement
Guest User

Untitled

a guest
Sep 14th, 2018
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.32 KB | None | 0 0
  1. #@gui CubeHelix: fx_cubehelix, fx_cubehelix_preview(1)
  2. #@gui : Convert to grayscale = bool(1)
  3. #@gui : Min threshold = float(0,0,100)
  4. #@gui : Max threshold = float(100,0,100)
  5. #@gui : Pre-normalise = bool(0)
  6. #@gui : Start colour = color(0,0,0)
  7. #@gui : End colour = color(255,255,255)
  8. #@gui : Start hue = float(1,0,3)
  9. #@gui : Rotations = float(-1.5,-20,20)
  10. #@gui : Hue intensity = float(1,0,5)
  11. #@gui : Gamma power = float(0,-4,4)
  12. #@gui : Flatten hues = float(0.5,0,1)
  13. #@gui : sep = separator(), Preview type = choice("Full","Forward horizontal","Forward vertical","Backward horizontal","Backward vertical","Duplicate top","Duplicate left","Duplicate bottom","Duplicate right","Duplicate horizontal","Duplicate vertical","Checkered","Checkered inverse"), Preview split = point(50,50,0,0,200,200,200,0,10,0)
  14. fx_cubehelix :
  15. repeat $! l[$>]
  16. if $1 to_gray fi to_rgb abs c 0,255 c $2%,$3% if $4 n 0,255 fi *. {1/255}
  17. f "angle=(2*pi*(($11/3)+1+$12*I));fract=(I^(2^($14^2)));amp=($13*fract*(1-fract)/2);
  18. helix=(amp*[-0.14861*cos(angle[0])+1.78277*sin(angle[0]),-0.29227*cos(angle[1])-0.90649*sin(angle[1]),1.97294*cos(angle[2])]);
  19. scale=([${8-10}]-[${5-7}])/255;
  20. ([${5-7}]/255)+(1-$15)*(fract*scale+helix)+$15*(fract+(helix*sign(scale)))*scale"
  21. c 0,1
  22. *. 255
  23. endl done
  24. fx_cubehelix_preview :
  25. gui_split_preview "fx_cubehelix $*",${-3--1}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement