|
Blender V4.5
|
#include <Python.h>#include "BLI_math_vector.h"#include "BLI_noise.h"#include "BLI_utildefines.h"#include "DNA_texture_types.h"#include "../generic/py_capi_utils.hh"#include "mathutils.hh"#include "mathutils_noise.hh"Go to the source code of this file.
Macros | |
| #define | N 624 |
| #define | M 397 |
| #define | MATRIX_A 0x9908b0dfUL |
| #define | UMASK 0x80000000UL |
| #define | LMASK 0x7fffffffUL |
| #define | MIXBITS(u, v) |
| #define | TWIST(u, v) |
| #define | BPY_NOISE_BASIS_ENUM_DOC |
| #define | BPY_NOISE_METRIC_ENUM_DOC |
| #define | DEFAULT_NOISE_TYPE TEX_STDPERLIN |
| #define | DEFAULT_METRIC_TYPE TEX_DISTANCE |
Functions | |
| static void | init_genrand (ulong s) |
| static void | next_state () |
| static void | setRndSeed (int seed) |
| static float | frand () |
| static void | rand_vn (float *array_tar, const int size) |
| static void | noise_vector (float x, float y, float z, int nb, float v[3]) |
| static float | turb (float x, float y, float z, int oct, int hard, int nb, float ampscale, float freqscale) |
| static void | vTurb (float x, float y, float z, int oct, int hard, int nb, float ampscale, float freqscale, float v[3]) |
| PyDoc_STRVAR (M_Noise_doc, "The Blender noise module") | |
| PyDoc_STRVAR (M_Noise_random_doc, ".. function:: random()\n" "\n" " Returns a random number in the range [0, 1).\n" "\n" " :return: The random number.\n" " :rtype: float\n") | |
| static PyObject * | M_Noise_random (PyObject *) |
| PyDoc_STRVAR (M_Noise_random_unit_vector_doc, ".. function:: random_unit_vector(size=3)\n" "\n" " Returns a unit vector with random entries.\n" "\n" " :arg size: The size of the vector to be produced, in the range [2, 4].\n" " :type size: int\n" " :return: The random unit vector.\n" " :rtype: :class:`mathutils.Vector`\n") | |
| static PyObject * | M_Noise_random_unit_vector (PyObject *, PyObject *args, PyObject *kw) |
| PyDoc_STRVAR (M_Noise_random_vector_doc, ".. function:: random_vector(size=3)\n" "\n" " Returns a vector with random entries in the range (-1, 1).\n" "\n" " :arg size: The size of the vector to be produced.\n" " :type size: int\n" " :return: The random vector.\n" " :rtype: :class:`mathutils.Vector`\n") | |
| static PyObject * | M_Noise_random_vector (PyObject *, PyObject *args, PyObject *kw) |
| PyDoc_STRVAR (M_Noise_seed_set_doc, ".. function:: seed_set(seed)\n" "\n" " Sets the random seed used for random_unit_vector, and random.\n" "\n" " :arg seed: Seed used for the random generator.\n" " When seed is zero, the current time will be used instead.\n" " :type seed: int\n") | |
| static PyObject * | M_Noise_seed_set (PyObject *, PyObject *args) |
| PyDoc_STRVAR (M_Noise_noise_doc, ".. function:: noise(position, noise_basis='PERLIN_ORIGINAL')\n" "\n" " Returns noise value from the noise basis at the position specified.\n" "\n" " :arg position: The position to evaluate the selected noise function.\n" " :type position: :class:`mathutils.Vector`\n" BPY_NOISE_BASIS_ENUM_DOC " :return: The noise value.\n" " :rtype: float\n") | |
| static PyObject * | M_Noise_noise (PyObject *, PyObject *args, PyObject *kw) |
| PyDoc_STRVAR (M_Noise_noise_vector_doc, ".. function:: noise_vector(position, noise_basis='PERLIN_ORIGINAL')\n" "\n" " Returns the noise vector from the noise basis at the specified position.\n" "\n" " :arg position: The position to evaluate the selected noise function.\n" " :type position: :class:`mathutils.Vector`\n" BPY_NOISE_BASIS_ENUM_DOC " :return: The noise vector.\n" " :rtype: :class:`mathutils.Vector`\n") | |
| static PyObject * | M_Noise_noise_vector (PyObject *, PyObject *args, PyObject *kw) |
| PyDoc_STRVAR (M_Noise_turbulence_doc, ".. function:: turbulence(position, octaves, hard, noise_basis='PERLIN_ORIGINAL', " "amplitude_scale=0.5, frequency_scale=2.0)\n" "\n" " Returns the turbulence value from the noise basis at the specified position.\n" "\n" " :arg position: The position to evaluate the selected noise function.\n" " :type position: :class:`mathutils.Vector`\n" " :arg octaves: The number of different noise frequencies used.\n" " :type octaves: int\n" " :arg hard: Specifies whether returned turbulence is hard (sharp transitions) or " "soft (smooth transitions).\n" " :type hard: bool\n" BPY_NOISE_BASIS_ENUM_DOC " :arg amplitude_scale: The amplitude scaling factor.\n" " :type amplitude_scale: float\n" " :arg frequency_scale: The frequency scaling factor\n" " :type frequency_scale: float\n" " :return: The turbulence value.\n" " :rtype: float\n") | |
| static PyObject * | M_Noise_turbulence (PyObject *, PyObject *args, PyObject *kw) |
| PyDoc_STRVAR (M_Noise_turbulence_vector_doc, ".. function:: turbulence_vector(position, octaves, hard, " "noise_basis='PERLIN_ORIGINAL', amplitude_scale=0.5, frequency_scale=2.0)\n" "\n" " Returns the turbulence vector from the noise basis at the specified position.\n" "\n" " :arg position: The position to evaluate the selected noise function.\n" " :type position: :class:`mathutils.Vector`\n" " :arg octaves: The number of different noise frequencies used.\n" " :type octaves: int\n" " :arg hard: Specifies whether returned turbulence is hard (sharp transitions) or " "soft (smooth transitions).\n" " :type hard: bool\n" BPY_NOISE_BASIS_ENUM_DOC " :arg amplitude_scale: The amplitude scaling factor.\n" " :type amplitude_scale: float\n" " :arg frequency_scale: The frequency scaling factor\n" " :type frequency_scale: float\n" " :return: The turbulence vector.\n" " :rtype: :class:`mathutils.Vector`\n") | |
| static PyObject * | M_Noise_turbulence_vector (PyObject *, PyObject *args, PyObject *kw) |
| PyDoc_STRVAR (M_Noise_fractal_doc, ".. function:: fractal(position, H, lacunarity, octaves, noise_basis='PERLIN_ORIGINAL')\n" "\n" " Returns the fractal Brownian motion (fBm) noise value from the noise basis at the " "specified position.\n" "\n" " :arg position: The position to evaluate the selected noise function.\n" " :type position: :class:`mathutils.Vector`\n" " :arg H: The fractal increment factor.\n" " :type H: float\n" " :arg lacunarity: The gap between successive frequencies.\n" " :type lacunarity: float\n" " :arg octaves: The number of different noise frequencies used.\n" " :type octaves: int\n" BPY_NOISE_BASIS_ENUM_DOC " :return: The fractal Brownian motion noise value.\n" " :rtype: float\n") | |
| static PyObject * | M_Noise_fractal (PyObject *, PyObject *args, PyObject *kw) |
| PyDoc_STRVAR (M_Noise_multi_fractal_doc, ".. function:: multi_fractal(position, H, lacunarity, octaves, " "noise_basis='PERLIN_ORIGINAL')\n" "\n" " Returns multifractal noise value from the noise basis at the specified position.\n" "\n" " :arg position: The position to evaluate the selected noise function.\n" " :type position: :class:`mathutils.Vector`\n" " :arg H: The fractal increment factor.\n" " :type H: float\n" " :arg lacunarity: The gap between successive frequencies.\n" " :type lacunarity: float\n" " :arg octaves: The number of different noise frequencies used.\n" " :type octaves: int\n" BPY_NOISE_BASIS_ENUM_DOC " :return: The multifractal noise value.\n" " :rtype: float\n") | |
| static PyObject * | M_Noise_multi_fractal (PyObject *, PyObject *args, PyObject *kw) |
| PyDoc_STRVAR (M_Noise_variable_lacunarity_doc, ".. function:: variable_lacunarity(position, distortion, " "noise_type1='PERLIN_ORIGINAL', noise_type2='PERLIN_ORIGINAL')\n" "\n" " Returns variable lacunarity noise value, a distorted variety of noise, from " "noise type 1 distorted by noise type 2 at the specified position.\n" "\n" " :arg position: The position to evaluate the selected noise function.\n" " :type position: :class:`mathutils.Vector`\n" " :arg distortion: The amount of distortion.\n" " :type distortion: float\n" " :arg noise_type1: Enumerator in ['BLENDER', 'PERLIN_ORIGINAL', 'PERLIN_NEW', " "'VORONOI_F1', 'VORONOI_F2', " "'VORONOI_F3', 'VORONOI_F4', 'VORONOI_F2F1', 'VORONOI_CRACKLE', " "'CELLNOISE'].\n" " :type noise_type1: str\n" " :arg noise_type2: Enumerator in ['BLENDER', 'PERLIN_ORIGINAL', 'PERLIN_NEW', " "'VORONOI_F1', 'VORONOI_F2', " "'VORONOI_F3', 'VORONOI_F4', 'VORONOI_F2F1', 'VORONOI_CRACKLE', " "'CELLNOISE'].\n" " :type noise_type2: str\n" " :return: The variable lacunarity noise value.\n" " :rtype: float\n") | |
| static PyObject * | M_Noise_variable_lacunarity (PyObject *, PyObject *args, PyObject *kw) |
| PyDoc_STRVAR (M_Noise_hetero_terrain_doc, ".. function:: hetero_terrain(position, H, lacunarity, octaves, offset, " "noise_basis='PERLIN_ORIGINAL')\n" "\n" " Returns the heterogeneous terrain value from the noise basis at the specified position.\n" "\n" " :arg position: The position to evaluate the selected noise function.\n" " :type position: :class:`mathutils.Vector`\n" " :arg H: The fractal dimension of the roughest areas.\n" " :type H: float\n" " :arg lacunarity: The gap between successive frequencies.\n" " :type lacunarity: float\n" " :arg octaves: The number of different noise frequencies used.\n" " :type octaves: int\n" " :arg offset: The height of the terrain above 'sea level'.\n" " :type offset: float\n" BPY_NOISE_BASIS_ENUM_DOC " :return: The heterogeneous terrain value.\n" " :rtype: float\n") | |
| static PyObject * | M_Noise_hetero_terrain (PyObject *, PyObject *args, PyObject *kw) |
| PyDoc_STRVAR (M_Noise_hybrid_multi_fractal_doc, ".. function:: hybrid_multi_fractal(position, H, lacunarity, octaves, offset, gain, " "noise_basis='PERLIN_ORIGINAL')\n" "\n" " Returns hybrid multifractal value from the noise basis at the specified position.\n" "\n" " :arg position: The position to evaluate the selected noise function.\n" " :type position: :class:`mathutils.Vector`\n" " :arg H: The fractal dimension of the roughest areas.\n" " :type H: float\n" " :arg lacunarity: The gap between successive frequencies.\n" " :type lacunarity: float\n" " :arg octaves: The number of different noise frequencies used.\n" " :type octaves: int\n" " :arg offset: The height of the terrain above 'sea level'.\n" " :type offset: float\n" " :arg gain: Scaling applied to the values.\n" " :type gain: float\n" BPY_NOISE_BASIS_ENUM_DOC " :return: The hybrid multifractal value.\n" " :rtype: float\n") | |
| static PyObject * | M_Noise_hybrid_multi_fractal (PyObject *, PyObject *args, PyObject *kw) |
| PyDoc_STRVAR (M_Noise_ridged_multi_fractal_doc, ".. function:: ridged_multi_fractal(position, H, lacunarity, octaves, offset, gain, " "noise_basis='PERLIN_ORIGINAL')\n" "\n" " Returns ridged multifractal value from the noise basis at the specified position.\n" "\n" " :arg position: The position to evaluate the selected noise function.\n" " :type position: :class:`mathutils.Vector`\n" " :arg H: The fractal dimension of the roughest areas.\n" " :type H: float\n" " :arg lacunarity: The gap between successive frequencies.\n" " :type lacunarity: float\n" " :arg octaves: The number of different noise frequencies used.\n" " :type octaves: int\n" " :arg offset: The height of the terrain above 'sea level'.\n" " :type offset: float\n" " :arg gain: Scaling applied to the values.\n" " :type gain: float\n" BPY_NOISE_BASIS_ENUM_DOC " :return: The ridged multifractal value.\n" " :rtype: float\n") | |
| static PyObject * | M_Noise_ridged_multi_fractal (PyObject *, PyObject *args, PyObject *kw) |
| PyDoc_STRVAR (M_Noise_voronoi_doc, ".. function:: voronoi(position, distance_metric='DISTANCE', exponent=2.5)\n" "\n" " Returns a list of distances to the four closest features and their locations.\n" "\n" " :arg position: The position to evaluate the selected noise function.\n" " :type position: :class:`mathutils.Vector`\n" BPY_NOISE_METRIC_ENUM_DOC " :arg exponent: The exponent for Minkowski distance metric.\n" " :type exponent: float\n" " :return: A list of distances to the four closest features and their locations.\n" " :rtype: list[list[float] | list[:class:`mathutils.Vector`]]\n") | |
| static PyObject * | M_Noise_voronoi (PyObject *, PyObject *args, PyObject *kw) |
| PyDoc_STRVAR (M_Noise_cell_doc, ".. function:: cell(position)\n" "\n" " Returns cell noise value at the specified position.\n" "\n" " :arg position: The position to evaluate the selected noise function.\n" " :type position: :class:`mathutils.Vector`\n" " :return: The cell noise value.\n" " :rtype: float\n") | |
| static PyObject * | M_Noise_cell (PyObject *, PyObject *args) |
| PyDoc_STRVAR (M_Noise_cell_vector_doc, ".. function:: cell_vector(position)\n" "\n" " Returns cell noise vector at the specified position.\n" "\n" " :arg position: The position to evaluate the selected noise function.\n" " :type position: :class:`mathutils.Vector`\n" " :return: The cell noise vector.\n" " :rtype: :class:`mathutils.Vector`\n") | |
| static PyObject * | M_Noise_cell_vector (PyObject *, PyObject *args) |
| PyMODINIT_FUNC | PyInit_mathutils_noise () |
Variables | |
| static ulong | state [N] |
| static int | left = 1 |
| static int | initf = 0 |
| static ulong * | next |
| static float | state_offset_vector [3 *3] |
| static PyC_FlagSet | bpy_noise_types [] |
| static PyC_FlagSet | bpy_noise_metrics [] |
| static PyMethodDef | M_Noise_methods [] |
| static PyModuleDef | M_Noise_module_def |
This file defines the 'noise' module, a general purpose module to access blenders noise functions.
Definition in file mathutils_noise.cc.
| #define BPY_NOISE_BASIS_ENUM_DOC |
Definition at line 148 of file mathutils_noise.cc.
Referenced by PyDoc_STRVAR(), PyDoc_STRVAR(), PyDoc_STRVAR(), PyDoc_STRVAR(), PyDoc_STRVAR(), PyDoc_STRVAR(), PyDoc_STRVAR(), PyDoc_STRVAR(), and PyDoc_STRVAR().
| #define BPY_NOISE_METRIC_ENUM_DOC |
Definition at line 155 of file mathutils_noise.cc.
Referenced by PyDoc_STRVAR().
| #define DEFAULT_METRIC_TYPE TEX_DISTANCE |
Definition at line 179 of file mathutils_noise.cc.
Referenced by M_Noise_voronoi().
| #define DEFAULT_NOISE_TYPE TEX_STDPERLIN |
Definition at line 162 of file mathutils_noise.cc.
Referenced by M_Noise_fractal(), M_Noise_hetero_terrain(), M_Noise_hybrid_multi_fractal(), M_Noise_multi_fractal(), M_Noise_noise(), M_Noise_noise_vector(), M_Noise_ridged_multi_fractal(), M_Noise_turbulence(), M_Noise_turbulence_vector(), and M_Noise_variable_lacunarity().
| #define LMASK 0x7fffffffUL |
Definition at line 52 of file mathutils_noise.cc.
| #define M 397 |
Definition at line 49 of file mathutils_noise.cc.
Referenced by btDeformableNeoHookeanForce::addScaledCofactorMatrixDifferential(), iTaSC::Armature::addSegment(), adjoint_m2_m2(), adjoint_m3_m3(), adjoint_m4_m4(), BKE_ocean_is_valid(), bsdf_hair_huang_eval_residual(), SubPatch::calc_num_inner_verts(), SubPatch::calc_num_triangles(), Freestyle::SilhouetteGeomEngine::CameraToImage(), CreateMatrix(), dot_m3_v3_row_x(), dot_m3_v3_row_y(), dot_m3_v3_row_z(), dot_m4_v3_row_x(), dot_m4_v3_row_y(), dot_m4_v3_row_z(), EIG_invert_m4_m4(), EIG_linear_solver_solve(), libmv::euclidean_resection::EuclideanResectionAnsarDaniilidis(), libmv::euclidean_resection::EuclideanResectionEPnP(), eulO_to_mat3(), SubPatch::get_vert_along_grid_edge(), blender::math::invert(), Freestyle::NodeTransform::isScaled(), mat3_to_size(), mat4_to_size(), mat4_to_size_fix_shear(), mat4_to_size_max_axis(), Freestyle::VecMat::Matrix< T, M, N >::Matrix(), mul_m3_v3(), mul_m3_v3_db(), mul_m4_v3(), mul_transposed_m3_v3(), mul_transposed_mat3_m4_v3(), mul_v2_m3v3(), mul_v3_m3v3(), mul_v3_m3v3_db(), mul_v3m3_dq(), mul_v4_m4v3(), next_state(), normalize_m2_m2(), normalize_m3_m3(), Freestyle::VecMat::operator*(), Freestyle::VecMat::Matrix< T, M, N >::operator*=(), Freestyle::VecMat::Matrix< T, M, N >::operator+=(), Freestyle::VecMat::Matrix< T, M, N >::operator-=(), Freestyle::VecMat::Matrix< T, M, N >::operator/=(), Freestyle::VecMat::operator<<(), Freestyle::VecMat::Matrix< T, M, N >::operator=(), blender::geometry::p_chart_correct_degenerate_triangle_point(), blender::geometry::p_chart_correct_degenerate_triangles2(), projection_inverse(), projection_inverse_impl(), Freestyle::SilhouetteGeomEngine::ProjectSilhouette(), KDL::RotationVel::Rot2(), Freestyle::VecMat::Matrix< T, M, N >::rows(), SIM_mass_spring_add_block(), iTaSC::WSDLSSolver::solve(), btLemkeSolver::solveMLCP(), Freestyle::SphericalGrid::Transform::sphericalProjection(), Freestyle::SphericalGrid::Transform::Transform(), transform_decompose(), blender::math::transform_point(), Freestyle::VecMat::Matrix< T, M, N >::transpose(), transpose_m3_m3(), transpose_m3_m4(), transpose_m4_m4(), EdgeDice::tri_dice(), IK_QSphericalSegment::UpdateAngle(), IK_QSwingSegment::UpdateAngle(), Freestyle::SilhouetteGeomEngine::WorldToImage(), and Freestyle::VecMat::Matrix< T, M, N >::~Matrix().
| #define MATRIX_A 0x9908b0dfUL |
Definition at line 50 of file mathutils_noise.cc.
| #define MIXBITS | ( | u, | |
| v ) |
Definition at line 53 of file mathutils_noise.cc.
| #define N 624 |
Definition at line 48 of file mathutils_noise.cc.
| #define TWIST | ( | u, | |
| v ) |
| #define UMASK 0x80000000UL |
Definition at line 51 of file mathutils_noise.cc.
|
static |
Definition at line 126 of file mathutils_noise.cc.
References frand(), left, next, next_state(), and y.
Referenced by frand(), M_Noise_random(), and rand_vn().
|
static |
Definition at line 63 of file mathutils_noise.cc.
References ARRAY_SIZE, init_genrand(), initf, left, N, state, and state_offset_vector.
Referenced by init_genrand(), next_state(), and setRndSeed().
|
static |
Definition at line 1040 of file mathutils_noise.cc.
References BLI_noise_cell(), M_Noise_cell(), and mathutils_array_parse().
Referenced by M_Noise_cell().
|
static |
Definition at line 1067 of file mathutils_noise.cc.
References BLI_noise_cell_v3(), M_Noise_cell_vector(), mathutils_array_parse(), and Vector_CreatePyObject().
Referenced by M_Noise_cell_vector().
|
static |
Definition at line 619 of file mathutils_noise.cc.
References BLI_noise_mg_fbm(), bpy_noise_types, DEFAULT_NOISE_TYPE, H, M_Noise_fractal(), mathutils_array_parse(), and PyC_FlagSet_ValueFromID().
Referenced by M_Noise_fractal().
|
static |
Definition at line 801 of file mathutils_noise.cc.
References BLI_noise_mg_hetero_terrain(), bpy_noise_types, DEFAULT_NOISE_TYPE, H, M_Noise_hetero_terrain(), mathutils_array_parse(), and PyC_FlagSet_ValueFromID().
Referenced by M_Noise_hetero_terrain().
|
static |
Definition at line 863 of file mathutils_noise.cc.
References BLI_noise_mg_hybrid_multi_fractal(), bpy_noise_types, DEFAULT_NOISE_TYPE, H, M_Noise_hybrid_multi_fractal(), mathutils_array_parse(), and PyC_FlagSet_ValueFromID().
Referenced by M_Noise_hybrid_multi_fractal().
|
static |
Definition at line 669 of file mathutils_noise.cc.
References BLI_noise_mg_multi_fractal(), bpy_noise_types, DEFAULT_NOISE_TYPE, H, M_Noise_multi_fractal(), mathutils_array_parse(), and PyC_FlagSet_ValueFromID().
Referenced by M_Noise_multi_fractal().
|
static |
Definition at line 401 of file mathutils_noise.cc.
References BLI_noise_generic_noise(), bpy_noise_types, DEFAULT_NOISE_TYPE, M_Noise_noise(), mathutils_array_parse(), and PyC_FlagSet_ValueFromID().
Referenced by M_Noise_noise().
|
static |
Definition at line 444 of file mathutils_noise.cc.
References bpy_noise_types, DEFAULT_NOISE_TYPE, M_Noise_noise_vector(), mathutils_array_parse(), noise_vector(), PyC_FlagSet_ValueFromID(), and Vector_CreatePyObject().
Referenced by M_Noise_noise_vector().
|
static |
Definition at line 296 of file mathutils_noise.cc.
References frand(), and M_Noise_random().
Referenced by M_Noise_random().
|
static |
Definition at line 312 of file mathutils_noise.cc.
References M_Noise_random_unit_vector(), norm(), normalize_vn(), rand_vn(), and Vector_CreatePyObject().
Referenced by M_Noise_random_unit_vector().
|
static |
Definition at line 348 of file mathutils_noise.cc.
References M_Noise_random_vector(), rand_vn(), and Vector_CreatePyObject_alloc().
Referenced by M_Noise_random_vector().
|
static |
Definition at line 928 of file mathutils_noise.cc.
References BLI_noise_mg_ridged_multi_fractal(), bpy_noise_types, DEFAULT_NOISE_TYPE, H, M_Noise_ridged_multi_fractal(), mathutils_array_parse(), and PyC_FlagSet_ValueFromID().
Referenced by M_Noise_ridged_multi_fractal().
|
static |
Definition at line 380 of file mathutils_noise.cc.
References M_Noise_seed_set(), and setRndSeed().
Referenced by M_Noise_seed_set().
|
static |
Definition at line 497 of file mathutils_noise.cc.
References bpy_noise_types, DEFAULT_NOISE_TYPE, M_Noise_turbulence(), mathutils_array_parse(), PyC_FlagSet_ValueFromID(), and turb().
Referenced by M_Noise_turbulence().
|
static |
Definition at line 558 of file mathutils_noise.cc.
References bpy_noise_types, DEFAULT_NOISE_TYPE, M_Noise_turbulence_vector(), mathutils_array_parse(), PyC_FlagSet_ValueFromID(), Vector_CreatePyObject(), and vTurb().
Referenced by M_Noise_turbulence_vector().
|
static |
Definition at line 733 of file mathutils_noise.cc.
References BLI_noise_mg_variable_lacunarity(), bpy_noise_types, DEFAULT_NOISE_TYPE, M_Noise_variable_lacunarity(), mathutils_array_parse(), and PyC_FlagSet_ValueFromID().
Referenced by M_Noise_variable_lacunarity().
|
static |
Definition at line 984 of file mathutils_noise.cc.
References BLI_noise_voronoi(), bpy_noise_metrics, DEFAULT_METRIC_TYPE, i, M_Noise_voronoi(), mathutils_array_parse(), PyC_FlagSet_ValueFromID(), ret, v, and Vector_CreatePyObject().
Referenced by M_Noise_voronoi().
|
static |
Definition at line 89 of file mathutils_noise.cc.
References init_genrand(), initf, left, M, N, next, next_state(), state, and TWIST.
Referenced by frand(), and next_state().
|
static |
Definition at line 203 of file mathutils_noise.cc.
References BLI_noise_generic_noise(), noise_vector(), state_offset_vector, v, x, y, and z().
Referenced by M_Noise_noise_vector(), noise_vector(), and vTurb().
| PyDoc_STRVAR | ( | M_Noise_cell_doc | , |
| ".. function:: cell(position)\n" "\n" " Returns cell noise value at the specified position.\n" "\n" " :arg position: The position to evaluate the selected noise function.\n" " :type position: :class:`mathutils.Vector`\n" " :return: The cell noise value.\n" " :rtype: float\n" | ) |
References PyDoc_STRVAR().
| PyDoc_STRVAR | ( | M_Noise_cell_vector_doc | , |
| ".. function:: cell_vector(position)\n" "\n" " Returns cell noise vector at the specified position.\n" "\n" " :arg position: The position to evaluate the selected noise function.\n" " :type position: :class:`mathutils.Vector`\n" " :return: The cell noise vector.\n" " :rtype: :class:`mathutils.Vector`\n" | ) |
References PyDoc_STRVAR().
| PyDoc_STRVAR | ( | M_Noise_doc | , |
| "The Blender noise module" | ) |
References PyDoc_STRVAR().
| PyDoc_STRVAR | ( | M_Noise_fractal_doc | , |
| ".. function:: fractal(position, H, lacunarity, octaves, noise_basis='PERLIN_ORIGINAL')\n" "\n" " Returns the fractal Brownian motion (fBm) noise value from the noise basis at the " "specified position.\n" "\n" " :arg position: The position to evaluate the selected noise function.\n" " :type position: :class:`mathutils.Vector`\n" " :arg H: The fractal increment factor.\n" " :type H: float\n" " :arg lacunarity: The gap between successive frequencies.\n" " :type lacunarity: float\n" " :arg octaves: The number of different noise frequencies used.\n" " :type octaves: int\n" BPY_NOISE_BASIS_ENUM_DOC " :return: The fractal Brownian motion noise value.\n" " :rtype: float\n" | ) |
References BPY_NOISE_BASIS_ENUM_DOC, and PyDoc_STRVAR().
| PyDoc_STRVAR | ( | M_Noise_hetero_terrain_doc | , |
| ".. function:: hetero_terrain(position, H, lacunarity, octaves, offset, " "noise_basis='PERLIN_ORIGINAL')\n" "\n" " Returns the heterogeneous terrain value from the noise basis at the specified position.\n" "\n" " :arg position: The position to evaluate the selected noise function.\n" " :type position: :class:`mathutils.Vector`\n" " :arg H: The fractal dimension of the roughest areas.\n" " :type H: float\n" " :arg lacunarity: The gap between successive frequencies.\n" " :type lacunarity: float\n" " :arg octaves: The number of different noise frequencies used.\n" " :type octaves: int\n" " :arg offset: The height of the terrain above 'sea level'.\n" " :type offset: float\n" BPY_NOISE_BASIS_ENUM_DOC " :return: The heterogeneous terrain value.\n" " :rtype: float\n" | ) |
References BPY_NOISE_BASIS_ENUM_DOC, and PyDoc_STRVAR().
| PyDoc_STRVAR | ( | M_Noise_hybrid_multi_fractal_doc | , |
| ".. function:: hybrid_multi_fractal(position, H, lacunarity, octaves, offset, gain, " "noise_basis='PERLIN_ORIGINAL')\n" "\n" " Returns hybrid multifractal value from the noise basis at the specified position.\n" "\n" " :arg position: The position to evaluate the selected noise function.\n" " :type position: :class:`mathutils.Vector`\n" " :arg H: The fractal dimension of the roughest areas.\n" " :type H: float\n" " :arg lacunarity: The gap between successive frequencies.\n" " :type lacunarity: float\n" " :arg octaves: The number of different noise frequencies used.\n" " :type octaves: int\n" " :arg offset: The height of the terrain above 'sea level'.\n" " :type offset: float\n" " :arg gain: Scaling applied to the values.\n" " :type gain: float\n" BPY_NOISE_BASIS_ENUM_DOC " :return: The hybrid multifractal value.\n" " :rtype: float\n" | ) |
References BPY_NOISE_BASIS_ENUM_DOC, and PyDoc_STRVAR().
| PyDoc_STRVAR | ( | M_Noise_multi_fractal_doc | , |
| ".. function:: multi_fractal(position, H, lacunarity, octaves, " "noise_basis='PERLIN_ORIGINAL')\n" "\n" " Returns multifractal noise value from the noise basis at the specified position.\n" "\n" " :arg position: The position to evaluate the selected noise function.\n" " :type position: :class:`mathutils.Vector`\n" " :arg H: The fractal increment factor.\n" " :type H: float\n" " :arg lacunarity: The gap between successive frequencies.\n" " :type lacunarity: float\n" " :arg octaves: The number of different noise frequencies used.\n" " :type octaves: int\n" BPY_NOISE_BASIS_ENUM_DOC " :return: The multifractal noise value.\n" " :rtype: float\n" | ) |
References BPY_NOISE_BASIS_ENUM_DOC, and PyDoc_STRVAR().
| PyDoc_STRVAR | ( | M_Noise_noise_doc | , |
| ".. function:: noise(position, noise_basis='PERLIN_ORIGINAL')\n" "\n" " Returns noise value from the noise basis at the position specified.\n" "\n" " :arg position: The position to evaluate the selected noise function.\n" " :type position: :class:`mathutils.Vector`\n" BPY_NOISE_BASIS_ENUM_DOC " :return: The noise value.\n" " :rtype: float\n" | ) |
References BPY_NOISE_BASIS_ENUM_DOC, and PyDoc_STRVAR().
| PyDoc_STRVAR | ( | M_Noise_noise_vector_doc | , |
| ".. function:: noise_vector(position, noise_basis='PERLIN_ORIGINAL')\n" "\n" " Returns the noise vector from the noise basis at the specified position.\n" "\n" " :arg position: The position to evaluate the selected noise function.\n" " :type position: :class:`mathutils.Vector`\n" BPY_NOISE_BASIS_ENUM_DOC " :return: The noise vector.\n" " :rtype: :class:`mathutils.Vector`\n" | ) |
References BPY_NOISE_BASIS_ENUM_DOC, and PyDoc_STRVAR().
| PyDoc_STRVAR | ( | M_Noise_random_doc | ) |
References PyDoc_STRVAR().
| PyDoc_STRVAR | ( | M_Noise_random_unit_vector_doc | , |
| ".. function:: random_unit_vector(size=3)\n" "\n" " Returns a unit vector with random entries.\n" "\n" " :arg size: The size of the vector to be | produced, | ||
| in the range .\n" " :type size:int\n" " :return:The random unit vector.\n" " :rtype::class:`mathutils.Vector`\n" | [2, 4] ) |
References PyDoc_STRVAR().
| PyDoc_STRVAR | ( | M_Noise_random_vector_doc | , |
| ".. function:: random_vector(size=3)\n" "\n" " Returns a vector with random entries in the range (-1, 1).\n" "\n" " :arg size: The size of the vector to be produced.\n" " :type size: int\n" " :return: The random vector.\n" " :rtype: :class:`mathutils.Vector`\n" | ) |
References PyDoc_STRVAR().
| PyDoc_STRVAR | ( | M_Noise_ridged_multi_fractal_doc | , |
| ".. function:: ridged_multi_fractal(position, H, lacunarity, octaves, offset, gain, " "noise_basis='PERLIN_ORIGINAL')\n" "\n" " Returns ridged multifractal value from the noise basis at the specified position.\n" "\n" " :arg position: The position to evaluate the selected noise function.\n" " :type position: :class:`mathutils.Vector`\n" " :arg H: The fractal dimension of the roughest areas.\n" " :type H: float\n" " :arg lacunarity: The gap between successive frequencies.\n" " :type lacunarity: float\n" " :arg octaves: The number of different noise frequencies used.\n" " :type octaves: int\n" " :arg offset: The height of the terrain above 'sea level'.\n" " :type offset: float\n" " :arg gain: Scaling applied to the values.\n" " :type gain: float\n" BPY_NOISE_BASIS_ENUM_DOC " :return: The ridged multifractal value.\n" " :rtype: float\n" | ) |
References BPY_NOISE_BASIS_ENUM_DOC, and PyDoc_STRVAR().
| PyDoc_STRVAR | ( | M_Noise_seed_set_doc | , |
| ".. function:: seed_set(seed)\n" "\n" " Sets the random seed used for | random_unit_vector, | ||
| and random.\n" "\n" " :arg seed:Seed used for the random generator.\n" " When seed is | zero, | ||
| the current time will be used instead.\n" " :type seed:int\n" | ) |
References PyDoc_STRVAR().
| PyDoc_STRVAR | ( | M_Noise_turbulence_doc | , |
| ".. function:: turbulence(position, octaves, hard, noise_basis='PERLIN_ORIGINAL', " "amplitude_scale=0.5, frequency_scale=2.0)\n" "\n" " Returns the turbulence value from the noise basis at the specified position.\n" "\n" " :arg position: The position to evaluate the selected noise function.\n" " :type position: :class:`mathutils.Vector`\n" " :arg octaves: The number of different noise frequencies used.\n" " :type octaves: int\n" " :arg hard: Specifies whether returned turbulence is hard (sharp transitions) or " "soft (smooth transitions).\n" " :type hard: bool\n" BPY_NOISE_BASIS_ENUM_DOC " :arg amplitude_scale: The amplitude scaling factor.\n" " :type amplitude_scale: float\n" " :arg frequency_scale: The frequency scaling factor\n" " :type frequency_scale: float\n" " :return: The turbulence value.\n" " :rtype: float\n" | ) |
References BPY_NOISE_BASIS_ENUM_DOC, and PyDoc_STRVAR().
| PyDoc_STRVAR | ( | M_Noise_turbulence_vector_doc | , |
| ".. function:: turbulence_vector(position, octaves, hard, " "noise_basis='PERLIN_ORIGINAL', amplitude_scale=0.5, frequency_scale=2.0)\n" "\n" " Returns the turbulence vector from the noise basis at the specified position.\n" "\n" " :arg position: The position to evaluate the selected noise function.\n" " :type position: :class:`mathutils.Vector`\n" " :arg octaves: The number of different noise frequencies used.\n" " :type octaves: int\n" " :arg hard: Specifies whether returned turbulence is hard (sharp transitions) or " "soft (smooth transitions).\n" " :type hard: bool\n" BPY_NOISE_BASIS_ENUM_DOC " :arg amplitude_scale: The amplitude scaling factor.\n" " :type amplitude_scale: float\n" " :arg frequency_scale: The frequency scaling factor\n" " :type frequency_scale: float\n" " :return: The turbulence vector.\n" " :rtype: :class:`mathutils.Vector`\n" | ) |
References BPY_NOISE_BASIS_ENUM_DOC, and PyDoc_STRVAR().
| PyDoc_STRVAR | ( | M_Noise_variable_lacunarity_doc | , |
| ".. function:: variable_lacunarity(position, distortion, " "noise_type1='PERLIN_ORIGINAL', noise_type2='PERLIN_ORIGINAL')\n" "\n" " Returns variable lacunarity noise | value, | ||
| a distorted variety of | noise, | ||
| from " "noise type 1 distorted by noise type 2 at the specified position.\n" "\n" " :arg position:The position to evaluate the selected noise function.\n" " :type position::class:`mathutils.Vector`\n" " :arg distortion:The amount of distortion.\n" " :type distortion:float\n" " :arg noise_type1:Enumerator in .\n" " :type noise_type1:str\n" " :arg noise_type2:Enumerator in .\n" " :type noise_type2:str\n" " :return:The variable lacunarity noise value.\n" " :rtype:float\n" | [ 'BLENDER', 'PERLIN_ORIGINAL', 'PERLIN_NEW', " " 'VORONOI_F1', 'VORONOI_F2', " " 'VORONOI_F3', 'VORONOI_F4', 'VORONOI_F2F1', 'VORONOI_CRACKLE', " " 'CELLNOISE'][ 'BLENDER', 'PERLIN_ORIGINAL', 'PERLIN_NEW', " " 'VORONOI_F1', 'VORONOI_F2', " " 'VORONOI_F3', 'VORONOI_F4', 'VORONOI_F2F1', 'VORONOI_CRACKLE', " " 'CELLNOISE'] ) |
References PyDoc_STRVAR().
| PyDoc_STRVAR | ( | M_Noise_voronoi_doc | , |
| ".. function:: voronoi(position, distance_metric='DISTANCE', exponent=2.5)\n" "\n" " Returns a list of distances to the four closest features and their locations.\n" "\n" " :arg position: The position to evaluate the selected noise function.\n" " :type position: :class:`mathutils.Vector`\n" BPY_NOISE_METRIC_ENUM_DOC " :arg exponent: The exponent for Minkowski distance metric.\n" " :type exponent: float\n" " :return: A list of distances to the four closest features and their locations.\n" " :rtype: list | list]\n" | [list[float][:class:`mathutils.Vector`] ) |
References BPY_NOISE_METRIC_ENUM_DOC, and PyDoc_STRVAR().
| PyMODINIT_FUNC PyInit_mathutils_noise | ( | ) |
Definition at line 1167 of file mathutils_noise.cc.
References M_Noise_module_def, PyInit_mathutils_noise(), and setRndSeed().
Referenced by PyInit_mathutils(), and PyInit_mathutils_noise().
|
static |
Definition at line 193 of file mathutils_noise.cc.
References frand(), i, rand_vn(), and size().
Referenced by M_Noise_random_unit_vector(), M_Noise_random_vector(), and rand_vn().
|
static |
Definition at line 115 of file mathutils_noise.cc.
References init_genrand(), and setRndSeed().
Referenced by M_Noise_seed_set(), PyInit_mathutils_noise(), and setRndSeed().
|
static |
Definition at line 215 of file mathutils_noise.cc.
References BLI_noise_generic_noise(), fabsf, i, out, turb(), x, y, and z().
Referenced by M_Noise_turbulence(), magic(), pointdensity(), and turb().
|
static |
Definition at line 241 of file mathutils_noise.cc.
References fabsf, i, noise_vector(), v, vTurb(), x, y, and z().
Referenced by M_Noise_turbulence_vector(), and vTurb().
|
static |
Definition at line 181 of file mathutils_noise.cc.
Referenced by M_Noise_voronoi().
|
static |
Definition at line 164 of file mathutils_noise.cc.
Referenced by M_Noise_fractal(), M_Noise_hetero_terrain(), M_Noise_hybrid_multi_fractal(), M_Noise_multi_fractal(), M_Noise_noise(), M_Noise_noise_vector(), M_Noise_ridged_multi_fractal(), M_Noise_turbulence(), M_Noise_turbulence_vector(), and M_Noise_variable_lacunarity().
|
static |
Definition at line 58 of file mathutils_noise.cc.
Referenced by init_genrand(), and next_state().
|
static |
Definition at line 57 of file mathutils_noise.cc.
Referenced by frand(), init_genrand(), and next_state().
|
static |
Definition at line 1094 of file mathutils_noise.cc.
|
static |
Definition at line 1153 of file mathutils_noise.cc.
Referenced by PyInit_mathutils_noise().
|
static |
Definition at line 59 of file mathutils_noise.cc.
Referenced by frand(), and next_state().
Definition at line 56 of file mathutils_noise.cc.
|
static |
Definition at line 60 of file mathutils_noise.cc.
Referenced by init_genrand(), and noise_vector().