MayaFlux 0.2.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
MayaFlux::Kinesis Namespace Reference

Namespaces

namespace  Stochastic
 

Classes

struct  BasisMatrices
 
struct  ProximityConfig
 
struct  SamplerBounds
 Spatial domain for vertex generation. More...
 
struct  SampleResult
 Position and normalised color derived from spatial sampling. More...
 

Typedefs

using EdgeList = std::vector< std::pair< size_t, size_t > >
 

Enumerations

enum class  InterpolationMode : uint8_t {
  LINEAR , CATMULL_ROM , CUBIC_HERMITE , CUBIC_BEZIER ,
  QUADRATIC_BEZIER , BSPLINE , COSINE , CUSTOM
}
 Mathematical interpolation methods. More...
 
enum class  ProximityMode : uint8_t {
  K_NEAREST , RADIUS_THRESHOLD , MINIMUM_SPANNING_TREE , GABRIEL_GRAPH ,
  RELATIVE_NEIGHBORHOOD_GRAPH , SEQUENTIAL , NEAREST_NEIGHBOR , CUSTOM
}
 
enum class  SpatialDistribution : uint8_t {
  RANDOM_VOLUME , RANDOM_SURFACE , GRID , SPHERE_VOLUME ,
  SPHERE_SURFACE , UNIFORM_GRID , RANDOM_SPHERE , RANDOM_CUBE ,
  PERLIN_FIELD , BROWNIAN_PATH , STRATIFIED_CUBE , SPLINE_PATH ,
  LISSAJOUS , FIBONACCI_SPHERE , FIBONACCI_SPIRAL , TORUS ,
  EMPTY
}
 Spatial distribution mode for point cloud and particle generation. More...
 

Functions

std::vector< glm::vec3 > generate_circle (const glm::vec3 &center, float radius, size_t segments, const glm::vec3 &normal=glm::vec3(0, 0, 1))
 Generate vertices along a circular path.
 
std::vector< glm::vec3 > generate_ellipse (const glm::vec3 &center, float semi_major, float semi_minor, size_t segments, const glm::vec3 &normal=glm::vec3(0, 0, 1))
 Generate vertices along an elliptical path.
 
std::vector< glm::vec3 > generate_rectangle (const glm::vec3 &center, float width, float height, const glm::vec3 &normal=glm::vec3(0, 0, 1))
 Generate vertices of an axis-aligned rectangular path.
 
std::vector< glm::vec3 > generate_regular_polygon (const glm::vec3 &center, float radius, size_t sides, const glm::vec3 &normal=glm::vec3(0, 0, 1), float phase_offset=0.0F)
 Generate vertices of a regular n-gon.
 
void apply_transform (std::vector< glm::vec3 > &vertices, const glm::mat4 &transform)
 Apply rigid transformation to vertex set.
 
void apply_rotation (std::vector< glm::vec3 > &vertices, const glm::vec3 &axis, float angle, const glm::vec3 &origin=glm::vec3(0))
 Apply rotation to vertex set around arbitrary axis.
 
void apply_translation (std::vector< glm::vec3 > &vertices, const glm::vec3 &displacement)
 Apply translation to vertex set.
 
void apply_uniform_scale (std::vector< glm::vec3 > &vertices, float scale, const glm::vec3 &origin=glm::vec3(0))
 Apply uniform scaling to vertex set.
 
void apply_scale (std::vector< glm::vec3 > &vertices, const glm::vec3 &scale, const glm::vec3 &origin=glm::vec3(0))
 Apply non-uniform scaling to vertex set.
 
std::vector< Nodes::LineVertexcompute_path_normals (const std::vector< Nodes::LineVertex > &path_vertices, float normal_length, size_t stride=1)
 Compute normal vectors along a piecewise-linear path.
 
std::vector< Nodes::LineVertexcompute_path_tangents (const std::vector< Nodes::LineVertex > &path_vertices, float tangent_length, size_t stride=1)
 Compute tangent vectors along a piecewise-linear path.
 
std::vector< Nodes::LineVertexcompute_path_curvature (const std::vector< Nodes::LineVertex > &path_vertices, float curvature_scale, size_t stride=1)
 Compute curvature vectors along a path (2nd derivative approximation)
 
std::vector< glm::vec3 > sample_parametric_curve (const std::function< glm::vec3(float)> &curve, size_t samples)
 Sample parametric curve uniformly in parameter space.
 
std::vector< Nodes::LineVertexreparameterize_by_arc_length (const std::vector< Nodes::LineVertex > &path_vertices, size_t num_samples)
 Resample path vertices for arc-length parameterization.
 
void project_onto_plane (std::vector< glm::vec3 > &vertices, const glm::vec3 &plane_point, const glm::vec3 &plane_normal)
 Project vertices onto plane defined by normal.
 
std::vector< glm::vec3 > compute_convex_hull_2d (const std::vector< glm::vec3 > &vertices, const glm::vec3 &projection_normal=glm::vec3(0, 0, 1))
 Compute convex hull of vertex set (2D projection)
 
std::vector< Nodes::LineVertexapply_color_gradient (const std::vector< glm::vec3 > &positions, const std::vector< glm::vec3 > &colors, const std::vector< float > &color_positions={}, float default_thickness=1.0F)
 Apply color interpolation to position vertices.
 
std::vector< Nodes::LineVertexapply_uniform_color (const std::vector< glm::vec3 > &positions, const glm::vec3 &color, float default_thickness=1.0F)
 Apply uniform color to position vertices.
 
std::vector< Nodes::LineVertexapply_vertex_colors (const std::vector< glm::vec3 > &positions, const std::vector< glm::vec3 > &colors, float default_thickness=1.0F)
 Convert positions to LineVertex with per-vertex colors.
 
Eigen::VectorXd catmull_rom_spline (const Eigen::MatrixXd &control_points, double t, double tension=0.5)
 Catmull-Rom spline interpolation using Eigen matrices.
 
Eigen::VectorXd cubic_bezier (const Eigen::MatrixXd &control_points, double t)
 Cubic Bezier interpolation using Eigen matrices.
 
Eigen::VectorXd quadratic_bezier (const Eigen::MatrixXd &control_points, double t)
 Quadratic Bezier interpolation using Eigen matrices.
 
Eigen::VectorXd cubic_hermite (const Eigen::MatrixXd &endpoints, const Eigen::MatrixXd &tangents, double t)
 Cubic Hermite interpolation using Eigen matrices.
 
Eigen::VectorXd bspline_cubic (const Eigen::MatrixXd &control_points, double t)
 Uniform B-spline interpolation using Eigen matrices.
 
Eigen::VectorXd interpolate (const Eigen::MatrixXd &control_points, double t, InterpolationMode mode, double tension=0.5)
 Generic interpolation dispatcher.
 
Eigen::MatrixXd generate_interpolated_points (const Eigen::MatrixXd &control_points, Eigen::Index num_samples, InterpolationMode mode, double tension=0.5)
 Generate interpolated points from control points.
 
double compute_arc_length (const Eigen::MatrixXd &points)
 Compute arc length of curve using trapezoidal rule.
 
Eigen::VectorXd compute_arc_length_table (const Eigen::MatrixXd &points)
 Compute arc length parameterization table.
 
Eigen::MatrixXd reparameterize_by_arc_length (const Eigen::MatrixXd &points, Eigen::Index num_samples)
 Reparameterize curve by arc length.
 
Kakshya::DataVariant interpolate_nddata (const Kakshya::DataVariant &control_points, Eigen::Index num_samples, InterpolationMode mode, double tension=0.5)
 Process DataVariant through interpolation.
 
EdgeList sequential_chain (const Eigen::MatrixXd &points)
 Compute sequential chain graph.
 
EdgeList k_nearest_neighbors (const Eigen::MatrixXd &points, size_t k)
 Compute K-nearest neighbors graph.
 
EdgeList radius_threshold_graph (const Eigen::MatrixXd &points, double radius)
 Compute radius threshold graph.
 
EdgeList minimum_spanning_tree (const Eigen::MatrixXd &points)
 Compute minimum spanning tree (Prim's algorithm)
 
EdgeList gabriel_graph (const Eigen::MatrixXd &points)
 Compute Gabriel graph.
 
EdgeList nearest_neighbor_graph (const Eigen::MatrixXd &points)
 Compute nearest neighbor graph.
 
EdgeList relative_neighborhood_graph (const Eigen::MatrixXd &points)
 Compute relative neighborhood graph.
 
EdgeList custom_proximity_graph (const Eigen::MatrixXd &points, const std::function< EdgeList(const Eigen::MatrixXd &)> &connection_function)
 Custom proximity graph via user function.
 
EdgeList generate_proximity_graph (const Eigen::MatrixXd &points, const ProximityConfig &config)
 Generate proximity graph using specified mode.
 
std::vector< SampleResultgenerate_samples (SpatialDistribution distribution, size_t count, const SamplerBounds &bounds, Kinesis::Stochastic::Stochastic &rng)
 Generate a batch of spatially distributed samples.
 
SampleResult generate_sample_at (SpatialDistribution distribution, size_t index, size_t total, const SamplerBounds &bounds, Kinesis::Stochastic::Stochastic &rng)
 Generate a single sample at a specific index (for indexed/sequential modes).
 
std::vector< Nodes::PointVertexto_point_vertices (std::span< const SampleResult > samples, glm::vec2 size_range={ 8.0F, 12.0F })
 Batch-project SampleResult vector to PointVertex.
 
std::vector< Nodes::LineVertexto_line_vertices (std::span< const SampleResult > samples, glm::vec2 thickness_range={ 1.0F, 2.0F })
 Batch-project SampleResult vector to LineVertex.
 
Nodes::PointVertex to_point_vertex (const SampleResult &s, glm::vec2 size_range={ 8.0F, 12.0F }) noexcept
 Project SampleResult to PointVertex.
 
Nodes::LineVertex to_line_vertex (const SampleResult &s, glm::vec2 thickness_range={ 1.0F, 2.0F }) noexcept
 Project SampleResult to LineVertex.