Show legend on cesium slope, aspect and elevation

First of all, I’m very thankful to you to help me out and for explaining very well it is useful but still, I’ve few queries which I need to explain to my client like:-

  1. Can u pls send me the origin of given formula if it is available - 0.1*[8777-(-414)] + (-414) = 505.1
    // elevationRamp * [maxHeight-(minHeight)]+(minHeight)
  2. In the same manner how I’ll get slope in degree and aspect sides(like north, south, east, west, north-south, etc.) as given in images I sent you, is there any formula for the slope and aspect.
    Aspect-Map-Legend SlopeMap

Thanks in Advance
Shashi