Skip to content

Latest commit

 

History

History
140 lines (105 loc) · 4.07 KB

README.md

File metadata and controls

140 lines (105 loc) · 4.07 KB

Tessellate

3D scientific data visualization and plotting tool for Rust.

Inspired by pyvista and VTK.

Features

Data Loading and Creation.

Loading Existing Data.

Tessellate supports a wide range of file formats commonly used in scientific computing, including VTK (.vtk), STL (.stl), PLY (.ply), and many more (through integration with libraries like meshio). You can directly read data from these files into the objects for visualization and analysis.

Mesh Manipulation.

Creating Basic Geometries.

The library provides functions to create fundamental geometric shapes like: spheres, cubes, cuboids, cylinders, cones, rings, spheres, torus, planes and more from scratch. These objects serve as building blocks for more complex visualizations. The detailed example can be found in the basic_shapes example.

Creating parametric Geometric Objects

The library provides functions to create parametric geometric shapes like: supertoroids, parametric ellipsoids, partial parametric ellisoids, pseudospheres,spirals and more. The detailed example can be found in the parametric_shapes example.

Creating an Explicit Structured Grid

Creating a Structured Surface

Creating a Triangulated Surface

Platonic Solids

Point Cloud

Filtering

Boolean Operations.

Extract Cell Centers

Clipping with a Surface, plane and boxes

Collision Detection

Volumetric Analysis

Find and label connected regions.

Decimate a mesh

Extract Edges

Extract Surface

Gaussian Smoothing

Geodesic Paths

Interpolating

Computing Mesh Quality

Resampling

Surface Smoothing

Surface Reconstruction

Voxelize a Surface Mesh

Subdivide Cells

Advanced

Visualize the Moeller-Trumbore Algorithm

https://en.wikipedia.org/wiki/M%C3%B6ller%E2%80%93Trumbore_intersection_algorithm https://cadxfem.org/inf/Fast%20MinimumStorage%20RayTriangle%20Intersection.pdf

Ray Tracing

Project points to a plane and Tessellate

generate a 3D point cloud, project it to a plane, and tessellate it.

Visualization.

Interactive Plotting.

The library facilitates creating interactive 3D plots using a plotter object.

Color Mapping.

Assign colors to data points based on scalar values associated with the data.

Anti-Aliasing

Measuring distances and angles

Show Edges

Legends and glyphs

Lighting and Shading.

Control lighting effects and shading models to enhance the visual representation of your data. Explore options like smooth shading, ambient lighting, and directional lighting.

Applying Textures

Transparency.

Camera Control.

Animations.

Auxiliary Tools and Data Structures.

KDTree.

The library provides a KDTree implementation for efficient nearest neighbor searches in 3D space.

use crate::mesh::bool::kdtree::KDTree;
    use crate::mesh::parts::Vertex;
    use crate::mesh::shape::cone::Cone;
    use crate::mesh::HasMesh;

    #[test]
    fn kdtree_test() {
        let cone = Cone::default();
        let mesh = cone.mesh();
        let kdtree: KDTree = mesh.try_into().unwrap();

        let full_len = kdtree.nearest_neighbors(&Vertex::default(), None).count();
        let part_len = kdtree.nearest_neighbors(&Vertex::default(), Some(0.7)).count();

        assert_eq!(full_len, 62);
        assert_eq!(part_len, 14);

    }

BSP Tree.

The library provides a BSP Tree implementation for efficient point-in-polygon tests and spatial partitioning of 3D objects.

    fn bsp_tree_test() {
        let cone = Cone::default();
        let mesh = cone.mesh();
        let bsp: BSPTree = mesh.try_into().unwrap();
        for node in bsp.iter_inorder() {
            println!("{:?}", node);
        }
    }
    fn bsp_to_mesh_test() {
        turn_on_test_logs();
        let fig = Cone::default();
        let mesh = fig.mesh();
        let bsp: BSPTree = mesh.try_into().unwrap();
    
        let bsp_mesh = &bsp.mesh(Default::default());
        let planes = &bsp.plane_meshes(10.0,Color::default());
    
    }