AsteroidShapeModels.jl

AsteroidShapeModels.AsteroidShapeModelsModule
AsteroidShapeModels

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 shapes
  • Ray, BoundingBox: Ray casting and acceleration structures
  • FaceVisibilityGraph: 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.

source

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 definitions
  • obj_io.jl - OBJ file loading and parsing
  • face_properties.jl - Face geometric computations (center, normal, area)
  • shape_operations.jl - Shape-level operations (volume, radius calculations)
  • ray_intersection.jl - Ray casting and intersection algorithms
  • visibility.jl - Face-to-face visibility and illumination analysis
  • geometry_utils.jl - Geometric helper functions and angle calculations
  • roughness.jl - Surface roughness and crater modeling

Index