Skip to content

Commit

Permalink
Add fbm Jordan and fbm Iq fractal function (#124)
Browse files Browse the repository at this point in the history
  • Loading branch information
otto-link committed Mar 6, 2024
1 parent e3562d1 commit be9d38e
Show file tree
Hide file tree
Showing 6 changed files with 223 additions and 498 deletions.
65 changes: 63 additions & 2 deletions HighMap/include/highmap/noise_function.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1017,13 +1017,13 @@ class GenericFractalFunction : public NoiseFunction
};

/**
* @brief Pingpong layering function
* @brief Fbm layering function
*/
class FbmFunction : public GenericFractalFunction
{
public:
/**
* @brief Construct a new Fbm Pingpong Function object.
* @brief Construct a new Fbm Function object.
*
* @param octaves Number of octaves.
* @param weigth Octave weighting.
Expand All @@ -1037,6 +1037,67 @@ class FbmFunction : public GenericFractalFunction
float lacunarity);
};

/**
* @brief Iq layering function
*/
class FbmIqFunction : public GenericFractalFunction
{
public:
/**
* @brief Construct a new Fbm Iq Function object
*
* @param octaves Number of octaves.
* @param weigth Octave weighting.
* @param persistence Octave persistence.
* @param lacunarity Defines the wavenumber ratio between each octaves.
* @param gradient_scale Gradient scale influence.
*/
FbmIqFunction(NoiseFunction *p_base,
int octaves,
float weight,
float persistence,
float lacunarity,
float gradient_scale);

protected:
float gradient_scale;
};

/**
* @brief Jordan layering function
*/
class FbmJordanFunction : public GenericFractalFunction
{
public:
/**
* @brief Construct a new Fbm Jordan Function object
*
* @param octaves Number of octaves.
* @param weigth Octave weighting.
* @param persistence Octave persistence.
* @param lacunarity Defines the wavenumber ratio between each octaves.
* @param warp0 Initial warp.
* @param damp0 Initial damp.
* @param warp_scale Warp scale.
* @param damp_scale Damp scale.
*/
FbmJordanFunction(NoiseFunction *p_base,
int octaves,
float weight,
float persistence,
float lacunarity,
float warp0,
float damp0,
float warp_scale,
float damp_scale);

protected:
float warp0;
float damp0;
float warp_scale;
float damp_scale;
};

/**
* @brief Pingpong layering function
*/
Expand Down
152 changes: 0 additions & 152 deletions HighMap/src/primitives/fbm_iq.cpp

This file was deleted.

Loading

0 comments on commit be9d38e

Please sign in to comment.