AsteroidShapeModels.jl
AsteroidShapeModels.AsteroidShapeModels
— ModuleAsteroidShapeModels
A Julia package for geometric processing and analysis of asteroid shape models.
This package provides comprehensive tools for working with polyhedral shape models of asteroids, including loading from OBJ files, computing geometric properties, ray-shape intersection, visibility analysis, and surface roughness modeling.
Main Types
ShapeModel
: Core data structure for polyhedral shapesRay
,BoundingBox
: Ray casting and acceleration structuresFaceVisibilityGraph
: CSR-style data structure for face-to-face visibility
Key Functions
- Shape I/O:
load_shape_obj
,load_obj
,load_shape_grid
- Geometric properties:
face_center
,face_normal
,face_area
,polyhedron_volume
- Ray intersection:
intersect_ray_triangle
,intersect_ray_shape
- Visibility:
build_face_visibility_graph!
,isilluminated
,view_factor
- Shape analysis:
equivalent_radius
,maximum_radius
,minimum_radius
Example
using AsteroidShapeModels
# Load an asteroid shape model with face-face visibility
shape = load_shape_obj("path/to/shape.obj", scale=1000, with_face_visibility=true) # Convert km to m
# Access to face properties
shape.face_centers # Center position of each face
shape.face_normals # Normal vector of each face
shape.face_areas # Area of of each face
See the documentation for detailed usage examples and API reference.
Overview
AsteroidShapeModels.jl
provides comprehensive tools for working with polyhedral shape models of asteroids. The package supports:
- Loading shape models from OBJ files
- Computing geometric properties (area, volume, normals)
- Ray-shape intersection testing
- Face-to-face visibility analysis
- Surface roughness modeling
- Illumination calculations
Installation
using Pkg
Pkg.add("AsteroidShapeModels")
Quick Start
using AsteroidShapeModels
# Load an asteroid shape model with face-face visibility
shape = load_shape_obj("path/to/shape.obj", scale=1000, with_face_visibility=true) # Convert km to m
# Access to face properties
shape.face_centers # Center position of each face
shape.face_normals # Normal vector of each face
shape.face_areas # Area of of each face
Features
Shape Model Management
- Load polyhedral models from OBJ files
- Automatic computation of face centers, normals, and areas
- Support for scaling and coordinate transformations
Geometric Analysis
- Face properties: center, normal, area
- Shape properties: volume, equivalent radius
- Bounding box computation
Ray Intersection
- Fast ray-triangle intersection
- Ray-shape intersection
- Bounding box acceleration
Visibility Analysis
- Face-to-face visibility computation
- View factor calculations
- Illumination determination
Surface Roughness
- Crater modeling
- Surface curvature analysis
Package Structure
types.jl
- Core data structures and type definitionsobj_io.jl
- OBJ file loading and parsingface_properties.jl
- Face geometric computations (center, normal, area)shape_operations.jl
- Shape-level operations (volume, radius calculations)ray_intersection.jl
- Ray casting and intersection algorithmsvisibility.jl
- Face-to-face visibility and illumination analysisgeometry_utils.jl
- Geometric helper functions and angle calculationsroughness.jl
- Surface roughness and crater modeling
Index
AsteroidShapeModels.AsteroidShapeModels
AsteroidShapeModels.BoundingBox
AsteroidShapeModels.FaceVisibilityGraph
AsteroidShapeModels.Ray
AsteroidShapeModels.RayShapeIntersectionResult
AsteroidShapeModels.RayTriangleIntersectionResult
AsteroidShapeModels.ShapeModel
AsteroidShapeModels.angle_deg
AsteroidShapeModels.angle_rad
AsteroidShapeModels.build_face_visibility_graph!
AsteroidShapeModels.compute_bounding_box
AsteroidShapeModels.concave_spherical_segment
AsteroidShapeModels.crater_curvature_radius
AsteroidShapeModels.equivalent_radius
AsteroidShapeModels.face_area
AsteroidShapeModels.face_center
AsteroidShapeModels.face_normal
AsteroidShapeModels.get_view_factors
AsteroidShapeModels.get_visible_face_data
AsteroidShapeModels.get_visible_face_directions
AsteroidShapeModels.get_visible_face_distances
AsteroidShapeModels.get_visible_face_indices
AsteroidShapeModels.grid_to_faces
AsteroidShapeModels.intersect_ray_bounding_box
AsteroidShapeModels.intersect_ray_shape
AsteroidShapeModels.intersect_ray_triangle
AsteroidShapeModels.isilluminated
AsteroidShapeModels.isobj
AsteroidShapeModels.load_obj
AsteroidShapeModels.load_shape_grid
AsteroidShapeModels.load_shape_obj
AsteroidShapeModels.maximum_radius
AsteroidShapeModels.minimum_radius
AsteroidShapeModels.num_visible_faces
AsteroidShapeModels.polyhedron_volume
AsteroidShapeModels.solar_elongation_angle
AsteroidShapeModels.solar_phase_angle
AsteroidShapeModels.view_factor