code: private static double getRasterFactor(int i, RasterData data)
      {
          Check.notNull(data);
  
          final double force = data.getForce();
          final double amplitude = data.getAmplitude();
          final int offset = data.getOffset();
  
          if (0 == data.getType())
          {
              return force * UtilMath.sin(i * amplitude + offset);
          }
          return force * UtilMath.cos(i * amplitude + offset);
      }
docs: Get raster color.
  
  @param i The color offset.
  @param data The raster data (must not be <code>null</code>).
  @return The rastered color.
  @throws LionEngineException If invalid arguments.