Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V0.1.1: Refactor and Optimize Fizicks Physics System #1

Merged
merged 16 commits into from
Aug 11, 2024
Merged

Commits on Aug 5, 2024

  1. Refactor physics system and introduce Space class

    - Add Space class to represent the physical environment
    - Introduce Fizicks class as a wrapper for physics simulation
    - Remove individual law classes (FirstLaw, SecondLaw, ThirdLaw)
    - Update Motion class to handle physics updates
    - Improve type hinting and documentation
    csmangum committed Aug 5, 2024
    Configuration menu
    Copy the full SHA
    7f9640a View commit details
    Browse the repository at this point in the history

Commits on Aug 6, 2024

  1. Implement Collision detection and resolution for Matter objects

    - Add Collision class with detect and resolve methods
    - Implement collision detection using distance calculation
    - Implement elastic collision resolution using vector decomposition
    - Include type hints and docstrings for better code clarity
    csmangum committed Aug 6, 2024
    Configuration menu
    Copy the full SHA
    52e42aa View commit details
    Browse the repository at this point in the history
  2. Implement collision detection and resolution with borders

    - Add detect_collision_with_border method to check for collisions
    - Add resolve_collision_with_border method to handle collisions
    - Include restitution coefficient for energy loss in collisions
    csmangum committed Aug 6, 2024
    Configuration menu
    Copy the full SHA
    4537f39 View commit details
    Browse the repository at this point in the history
  3. Refactor motion module and add collision handling

    - Update type hints and imports
    - Rename 'Space' to 'Area' for consistency
    - Add collision detection and resolution in Motion.update()
    - Minor code style improvements
    csmangum committed Aug 6, 2024
    Configuration menu
    Copy the full SHA
    ac70ea4 View commit details
    Browse the repository at this point in the history
  4. Add Area class to represent simulation space

    - Introduce Area class with dimensions and boundary properties
    - Dimensions represented by Vector
    - Option to set boundaries (default: False for toroidal space)
    csmangum committed Aug 6, 2024
    Configuration menu
    Copy the full SHA
    a145838 View commit details
    Browse the repository at this point in the history

Commits on Aug 7, 2024

  1. Update motion.py

    csmangum authored Aug 7, 2024
    Configuration menu
    Copy the full SHA
    5923e49 View commit details
    Browse the repository at this point in the history

Commits on Aug 10, 2024

  1. Implement spatial partitioning for optimized collision detection

    - Add SpatialPartitioning class for efficient object lookup
    - Create ImprovedMotionWithCollision class extending Motion
    - Update VisualDebugger to use spatial partitioning in simulation
    - Refactor Object class to include debt attribute
    - Add SimulationConfig class for centralized configuration
    csmangum committed Aug 10, 2024
    Configuration menu
    Copy the full SHA
    a9af5a7 View commit details
    Browse the repository at this point in the history
  2. Refactor collision detection and add border collision handling

    - Rename detect() and resolve() to detect_objects() and resolve_objects()
    - Add detect_border() and resolve_border() methods for space boundaries
    - Import Vector class directly for use in resolve_objects()
    csmangum committed Aug 10, 2024
    Configuration menu
    Copy the full SHA
    23f6953 View commit details
    Browse the repository at this point in the history
  3. Add Vector methods: modulo, magnitude, normalize, and dot product

    - Implement __mod__ for modular arithmetic
    - Add magnitude() method to calculate vector length
    - Implement normalize() to get unit vector
    - Add dot() method for dot product calculation
    csmangum committed Aug 10, 2024
    Configuration menu
    Copy the full SHA
    f8736f7 View commit details
    Browse the repository at this point in the history

Commits on Aug 11, 2024

  1. Update main.py

    csmangum authored Aug 11, 2024
    Configuration menu
    Copy the full SHA
    7027e0a View commit details
    Browse the repository at this point in the history
  2. Refactor Matter class and update physics calculations

    - Add type hints and improve docstrings
    - Move physics calculations to Fizicks class
    - Replace Area with Universe in update method
    - Simplify apply_force method
    - Remove collision detection and resolution methods
    csmangum committed Aug 11, 2024
    Configuration menu
    Copy the full SHA
    76fadcc View commit details
    Browse the repository at this point in the history
  3. Refactor Collision class for improved flexibility and toroidal univer…

    …se support
    
    - Update detect and resolve methods to handle both object-object and object-universe collisions
    - Add support for toroidal universe in border collision detection and resolution
    - Improve method naming and organization for better clarity
    - Update docstrings to reflect new functionality and parameters
    - Implement debt system for applying collision forces in next update
    csmangum committed Aug 11, 2024
    Configuration menu
    Copy the full SHA
    9031775 View commit details
    Browse the repository at this point in the history
  4. Refactor Matter class: Add properties and debt system

    - Replace apply_force with add_debt method
    - Implement position and velocity as properties
    - Add type hint for Vector
    - Update class docstring
    csmangum committed Aug 11, 2024
    Configuration menu
    Copy the full SHA
    28aaae9 View commit details
    Browse the repository at this point in the history
  5. Refactor Motion class and update physics laws

    - Replace Area with Universe in Motion.update
    - Add collision detection with universe boundaries
    - Update docstrings for clarity and consistency
    - Remove redundant code in SecondLaw.apply
    - Reorder collision checks in Motion.update
    csmangum committed Aug 11, 2024
    Configuration menu
    Copy the full SHA
    9030b48 View commit details
    Browse the repository at this point in the history
  6. Add Universe class and enhance Vector functionality

    - Introduce Universe class to store universe properties and constants
    - Add __iter__ and __call__ methods to Vector class
    - Implement copy() method for Vector class
    csmangum committed Aug 11, 2024
    Configuration menu
    Copy the full SHA
    413f4bf View commit details
    Browse the repository at this point in the history
  7. update

    csmangum committed Aug 11, 2024
    Configuration menu
    Copy the full SHA
    888315d View commit details
    Browse the repository at this point in the history