Skip to main content

Crate poincare_lib

Crate poincare_lib 

Source
Expand description

poincare-lib — a Mathematica-class 3D graphing library built on viewport-lib.

§Quick start

use poincare_lib::{GraphScene, Surface3D};
use viewport_lib::Camera;

let mut scene = GraphScene::new();
scene.add(Surface3D::from_fn(|x, y| x.sin() * y.cos()));

// Upload meshes once at startup (needs wgpu device + ViewportGpuResources).
scene.upload_meshes(device, renderer.resources_mut()).unwrap();

// Each frame:
let mut frame = scene.build_frame(&camera);
frame.camera.viewport_size = [width as f32, height as f32];

Re-exports§

pub use analysis::AnalysisCapability;
pub use analysis::AnalysisError;
pub use analysis::AnalysisKind;
pub use analysis::AnalysisOutput;
pub use analysis::AnalysisOutputKind;
pub use analysis::AnalysisProvenance;
pub use analysis::AnalysisReport;
pub use analysis::AnalysisRequest;
pub use analysis::AnalysisTable;
pub use analysis::AnalysisTarget;
pub use analysis::AnalysisTargetKind;
pub use analysis::SampleGroupsKind;
pub use analysis::available_analyses;
pub use analysis::run_analysis;
pub use analysis::sample_groups;
pub use axis::AxisConfig;
pub use coordinate::CoordinateSystem;
pub use coordinate::ParametricDomain;
pub use diagnostics::Diagnostic;
pub use diagnostics::DiagnosticKind;
pub use diagnostics::DiagnosticLocation;
pub use diagnostics::DiagnosticSeverity;
pub use diagnostics::ParseDiagnostic;
pub use diagnostics::ValidationDiagnostic;
pub use domain::DataBounds;
pub use domain::Domain;
pub use expressions::ParametricCurveExpr;
pub use expressions::ParametricSurfaceExpr;
pub use expressions::ScalarFieldExpr;
pub use expressions::VectorFieldExpr;
pub use expr_parser::AutoDetectResult;
pub use expr_parser::DetectedPlotType;
pub use expr_parser::ParsedExpr;
pub use expr_parser::auto_detect_plot_type;
pub use expr_parser::eval_curve_point;
pub use expr_parser::eval_surface;
pub use expr_parser::eval_with_vars;
pub use expr_parser::parse_csv_grid;
pub use expr_parser::parse_csv_points;
pub use expr_parser::parse_curve_expr;
pub use expr_parser::parse_expr_with_vars;
pub use expr_parser::parse_surface_expr;
pub use expr_parser::parse_triple_expr;
pub use graph_spec::ArrowAnnotation;
pub use graph_spec::GraphSpec;
pub use graph_spec::OptionalColumn;
pub use graph_spec::PlotDefinition;
pub use graph_spec::PlotSpec;
pub use graph_spec::PointAnnotation;
pub use graph_spec::SeedMode;
pub use graph_spec::SliceAxis;
pub use graph_spec::TableColumnMapping;
pub use graph_spec::TableDelimiter;
pub use graph_spec::TableImportDefinition;
pub use graph_spec::TablePlotTarget;
pub use graph_compile::GraphBuildError;
pub use label::WorldLabel;
pub use metadata::CoordinateSemantics;
pub use metadata::DomainEditorMetadata;
pub use metadata::PlotMetadata;
pub use metadata::StyleCapabilities;
pub use plot_object::GlyphInstance;
pub use plot_object::PlotComponent;
pub use plot_object::PlotGeometry;
pub use plot_object::PlotObject;
pub use plots::AnnotatedArrowsPlot;
pub use plots::AnnotatedPointsPlot;
pub use plots::ContourPlot3D;
pub use plots::Curve3D;
pub use plots::CurveInterpolation;
pub use plots::CurveInterpolationKind;
pub use plots::DensityPlot3D;
pub use plots::LevelSet3D;
pub use plots::PiecewisePlot;
pub use plots::PlaneVectorFieldPlot;
pub use plots::ScalarSlicePlot;
pub use plots::Scatter3D;
pub use plots::StreamPlot3D;
pub use plots::Surface3D;
pub use plots::TableVectorFieldPlot;
pub use plots::TableVectorSample;
pub use plots::VectorField3D;
pub use plots::default_slice_position;
pub use plots::sample_curve_points;
pub use resolution::Resolution;
pub use scene::GraphScene;
pub use scene::PointPickData;
pub use scene::PolylinePickData;
pub use scene::ProbePickData;
pub use scene::SurfacePickData;
pub use solvers::FiniteDifferenceConfig;
pub use solvers::finite_curl;
pub use solvers::finite_divergence;
pub use solvers::finite_gradient;
pub use solvers::generate_seeds;
pub use style::ColormapSource;
pub use style::ColourMode;
pub use style::MatcapSource;
pub use style::ParamVisSettings;
pub use style::PlotStyle;
pub use style::ShadingMode;
pub use style::SurfaceFaceQuantity;
pub use style::SurfaceLicSettings;
pub use style::SurfaceLicVectorField;
pub use style::TransferFunction;
pub use table_data::TableDataSet;
pub use table_data::TablePreview;
pub use table_data::TableRow;
pub use table_data::TableValidationError;
pub use table_data::build_curve_piecewise;
pub use table_data::build_curve_piecewise_with_interpolation;

Modules§

analysis
axis
Axis box, tick stubs, and label generation for 3D graphs.
coordinate
diagnostics
domain
expr_parser
Hand-rolled expression parser for math expressions used in interactive plotting.
expressions
graph_compile
graph_spec
label
World-space label type alias.
metadata
plot_object
plots
resolution
scene
solvers
style
table_data
ticks
Nice-number tick generation for axis labelling.

Enums§

GlyphType
Glyph shape type.