This repository contains a C++ program that utilizes Newton's method as a root-finding algorithm to determine the earliest time at which the force acting on a robot becomes zero.
For the robot to perform its natural task, it needs to counteract a specific force. To achieve this, it is necessary to find the earliest time at which the force acting on the robot becomes null. The Newton's method, a root-finding algorithm, proves to be effective in predicting successive approximations of time for the given time-varying force. To improve the accuracy of these approximations, the convergence criteria can be adjusted.
- Implements Newton's method as a root-finding algorithm
- Utilizes a polymorphic function wrapper to enable the passing of different functions and their derivatives as parameters when creating objects of a class
- Provides a flexible approach to handle various force scenarios
Follow the steps below to get started with this program:
- Clone the repository:
git clone https://github.com/ShobhitManiar/Newton-RFA.git
- Change into the project directory:
cd Newton-RFA
- Compile and run the program:
g++ main.cpp -o main
./main
To use this program, you can modify the code to provide your specific force scenario. By adjusting the convergence criteria and implementing the appropriate function and its derivative, you can accurately find the earliest time at which the force acting on the robot becomes zero.
Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or create a pull request in this repository.
This project is licensed under the MIT License. You are free to use, modify, and distribute this code as per the terms of this license.
Thank you for your interest in this project. If you have any questions or need further assistance, please feel free to contact us.