# # MAPLE commands to visualize the cubehelix colour scheme # # Dave Green --- MRAO --- 1996 February 13th # 2011 September 3rd (updated: colour labels) # with(plots); Start := 0.5; Rotations := -1.5; Hue := 1.0; # here gamma is fixed as 1.0 ColourRGB := [max(min(t + Hue*t*(1-t)/2*(-0.1486*cos(2*Pi*(Start/3+Rotations*t+1)) +1.7823*sin(2*Pi*(Start/3+Rotations*t+1))),1),0), max(min(t + Hue*t*(1-t)/2*(-0.2923*cos(2*Pi*(Start/3+Rotations*t+1)) -0.9065*sin(2*Pi*(Start/3+Rotations*t+1))),1),0), max(min(t + Hue*t*(1-t)/2*(+1.9729*cos(2*Pi*(Start/3+Rotations*t+1))),1),0), t=0..1]: ColourHelix := tubeplot(ColourRGB, shading=xyz, style=PATCHNOGRID, radius=0.02, numpoints=100, tubepoints=20, axes=BOXED, scaling=CONSTRAINED); Diagonal := spacecurve([t,t,t], t=0..1, shading=xyz, style=HIDDEN, axes=NONE, scaling=CONSTRAINED, thickness=5); display([ColourHelix, Diagonal], labels=["red", "green", "blue"], axis[1]=[color=red],axis[2]=[color=green],axis[3]=[color=blue], title="`cubehelix' colour scheme");