Giter Club home page Giter Club logo

meca3's People

Contributors

dependabot[bot] avatar samibendou avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

meca3's Issues

Construct trajectories with constant step

Description
Allow Trajectory constructor the create constant step trajectories

Context
The static method cstStep can already construct constant step trajectories

Acceptance criteria
Can replace cstStep everywhere

Design
Multi-type argument step of constructor

Test static methods

Description
Test all static methods

Context
Only a part of Vector3 static methods has been coded

Acceptance criteria
All methods must test simple cases
More complex methods must test edge cases

Design
Follow implementation of the tests

Diagonal matrix generators

Description
Generators of diagonal and tri-diagonal Matrix3

Context
Construction of the matrix is made component by component

Acceptance criteria
Check identity matrix, check diag(1, 2, 3)

Design
Static method

Setters and getters for position/speed of Point

Description
Get/set the current position and speed of a Point object

Context
see #50

Acceptance criteria

  • Cartesian coordinates
  • Cylindrical coordinates
  • Spherical coordinates

Design
Take the last position in trajectory and manipulate coordinates using relative vector

Sample trajectory

Description
Allow to get samples of a trajectory with a method .sample(t0, t1, n)

Context
The trajectory provides a t(s) method which returns the duration elapsed from the beginning of the trajectory.
The trajectory provides a at(s) method which returns the PointPair representing the position of the point.
Note : s is the curvilinear abscissa, a real between 0 and the number of elements in the trajectory

Acceptance criteria
With a constant step trajectory of size n and step h, .sample(0, n / h - 1, n) returns the pairs of the trajectory

Design
WIP

Euler implicit method solving

Description
Solve ODE using Euler implicit method

Context
Current solver is designed using Euler explicit method

Acceptance criteria
Same results as Euler explicit solving

Design
Implement Euler's implicit method into Solver class

manipulation of latitude and longitude of vectors

Description
Get/set latitude and longitude of a Vector3

Context
A function property is already available for the co-latitude phi and the angle theta

Acceptance criteria
Same behavior as phi and theta

Design
Use spherical coordinates with the relation between co-latitude and latitude

Interface between matrix and 1D arrays

Description
Create an interface between Matrix class and Javascript 1D Array.

Context
Matrix3 class actually provides an interface with Javascript 2D Array

Acceptance criteria
Arrays can be converted to matrix and reciprocally

Design
Same as 2D arrays interface

Step solving with Trajectory

Description
Allow step solving with trajectory and buffer trajectory objects

Context
see #6
step solving is implemented with Vector3 only

Acceptance criteria
Same result as current solving with Vector3

Design
Implement a stepFromOrigin() method into solver

Make modules compatible with browser

Description
Allow modules to be imported in node.js and browser.

Context
Modules can only be imported into node.js

Acceptance criteria
Import modules using require in node and <script src="./Vector3.mjs"></script> in browser

Design
Add each class of the module as property of window if module is undefined

function interface for rotation Matrix

Description
Redesign rotation matrices generators so generators return function of angle of rotation

Context
Current generators depend on given angle returns Matrix3 objects

Acceptance criteria
Rotation matrix returned by the generator is a function of angle that returns a Matrix3

Design
Same design as makeAffine() method

Create a PointPair by giving only a mobile

Description
Create a PointPair by providing only a Vector3

Context
PointPair constructor is written as follows : PointPair(origin, vector)

Acceptance criteria
Origin must be set to 0

Design
Static method

Add a cylindrical setter to vectors

Description
Set cylindrical coordinates of a Vector3

Context
Vector3 provides a setter for spherical coordinates

Acceptance criteria
Unit tests on rxy setter

Design
Create a rxy setter for the rxy property
Same as implementation style as setRThetaZ()

Automatic update of wiki

Description
Generate and update wiki pages automatically from code documentation

Context
Documentation is generated from code and manually using jsdoc2md and then pushed to wiki

Write geometrical transformations unit tests

Description
Write unit tests for PointPair and Trajectory geometrical transformation methods

Context
Geometrical transformations relies on Matrix3 and Vector3 addition, multiplication and liner mapping that are already tested

Acceptance criteria

  • Test simple cases transformations for each transformation method
  • Test edge cases

Design
Write simple tests for transformations methods
Write edges cases tests and simple tests for Matrix3 and Vector3 transformations

Multi-mode scaling structure

Description
Allow to choose scaling mode of Trajectory objects

Context
No scaling provided yet

Acceptance criteria
Provide the following scaling :

  • Constant position : #28
  • Constant speed : #27

Design
Use one function scale(s)

Operator syntax for vectors and matrices

Description
Override Javascript operators to allow addition +, multiplication x of Vector3, Matrix3 and number

Context
Object oriented syntax to perform operations

Acceptance criteria
Same behavior as object oriented syntax
Regular operators +, * , /
Assignment operators +=, *=, /=

Design
WIP

Allow solving ODE by giving duration and step

Description
Allows solving by giving only the time step and the duration

Context
Solving can be performed by setting the member step and then solve a fixed number of iterations

Acceptance criteria
Same output as already implemented solver

Design
Calculate the number of samples required and use the already implemented solver

Refacto step to dt

Description
Rename the property named step or steps which represents variable step Array/ constant step value number

Context
Trajectory and BufferTrajectory names the step step

Design
Rename steps and step to dt

Absolute Vector3 getter/setter

Description
Get/Set the absolute positions Vector3 of a Trajectory

Context
A getter/setter is already written for the origins Vector3

Acceptance criteria
Same behavior as .origins

Design
Property method

Matrix exponentiation

Description
Method to exponentiate Matrix3

Context
Algebraical operations for Matrix3 are already implemented

Acceptance criteria
Check on inversion
Check on square and cubic powers
Same results as product and inversion

Design
Fast exponentiation member method of Matrix3
Handle negative values by inverting the matrix

Create a string interface

Description
Create an interface between Matrix3 and Vector3 and Javascript string

Context
Both classes provides a toString() method

Acceptance criteria
the output of toString() method must be convertible to an object identical to the object that produced the string

Design
Same as 2D arrays interface

Allow providing Trajectory.at method with real values

Description
Allow to use at(t) method of a Trajectory when t is a real number

Context
The trajectory object has a at(t) method but it only accepts integer values of t that represents an index of the trajectory array.

Design
Create a method when t is integer so the behavior does not change.

Modify at() method in order to make linear interpolation with the values in trajectory[floor(t)] and trajectory[ceil(t)].

Allow to compute the derivative with constant step and default step

Description
Compute derivative of Vector3 with constant step and without specifying the step

Context
Vector3.der function allows to compute the derivative of a Vector3 array with variable step

Acceptance criteria
Allow to compute the derivative without specifying the derivation step
Allow to compute the derivative with a constant step

Design
Improve step argument handling in Vector3.der function.
Same default step argument management as Trajectory.constructor

Solve trajectory with constant origin

Description
Use solver to return trajectory from a fixed origin

Context
The solver has a method solve() that returns an Array of Vector3 representing the solution of the ODE.

Acceptance criteria
For each pair of the trajectory, the corresponding vector object is the same as the Vector3 returned by the solve() method

Design
Use the solve() method and create and cstOrigin() trajectory

Encapsulate initial conditions computation

Description
Create class method to compute initial conditions u0, u1 from initial conditions u0, v0.

Context
The initial conditions computation is performed in solve() method there is not method to do this

Acceptance criteria
Unit testing is functional for solver

Design
Reuse formulas given in solve() method and create a new method to return the output of the formulas

Syntax and warning cleaning

Description
Clean syntax to remove warnings and typos

Acceptance criteria
No warnings, no typos

Design
Node.js syntax cleaning with WebStorm

Spherical and Cylindrical static generators

Description
Construct Vector3 by given spherical and cylindrical coordinates

Context
A setter for spherical coordinates has already been coded
The setter for cylindrical coordinates has not been coded yet (#20)

Acceptance criteria
Same behavior as setters

Design
Use static generators

Time scaling of Trajectory

Description
Allow to contract and extend the steps array

Context
The steps can only be step and get as array

Acceptance criteria
The trajectory is not changed during operation but the speed need to according to the transformation of the time step

Design
Change all steps at a time by multiplying by a scaling factor

Clean methods that return a reference to this

Description
Some methods that should return a reference to this does not actually

Context
in Vector3 class :

  • setRThetaPhi() does not return this
  • fill() does not return this
  • cross() does not return this

in Matrix3 class :

  • trans() method returns a reference to a copy of this
  • prod(m) method returns a reference to a copy of this
  • map(u) returns a reference to a copy to the given vector u

Acceptance criteria
All the methods that return an object of the same class of the calling object must return a reference to this and store the result in the calling object.

map should return a reference to the given vector which stores the output of the operation

Design
Stop copying during trans, prod, cross, map

Add more getters in Trajectory

Description
Get before last PointPair of a trajectory.

Context
last and first properties are implemented and return respectively last and first PointPair.

Acceptance criteria
nexto must be the PointPair right before last.

Design
Compute PointPair by calculating it directly from the pairs properties of this.

Spherical basis for vectors

Description
Provide a spherical basis for Vector3

Context
The Vector3 class provides a cartesian canonical basis e(k), ex, ey and ez getters

Acceptance criteria
Example for ex : er(ex) == ex, etheta(ex) == ey, ephi(ex) == ez

Design
Use static methods

Length scaling of Trajectory

Description
Allow to contract and extend the trajectory.

Context
The pairs can only be set and get as array members

Acceptance criteria
if the trajectory is scaled by x then the new length of the trajectory must be x times the old value of length

time step remains unchanged

the first point of the trajectory doesn't move

Design
change the distance between each pairs in pairs array of a Trajectory object

Clean module interface for imports

Description
Finalize module interface for npm

Context
Modules has to be imported using the following syntax :

const Vector3 = require("[path_to_meca3]/Vector3.mjs");

Acceptance criteria
Modules can be imported using the following syntax :

const meca3 = require("meca3");
const Vector3 = meca3.Vector3

Unit testing can be run by the package.json unit test entry point.

Design
Use node imports
Change .mjs files to .js files and add a main module file meca.js
Add a global testing interface

Generators for buffer trajectory

Description
Generators for BufferTrajectory class that allow creating a trajectory :

  • By giving time step and positions as PointPair
  • By giving time step and positions as Vector3
  • Without giving time step

Context
A BufferTrajectory can be created only with a size and a trajectory

Design
Create a new Trajectory with implemented generators and convert it to BufferTrajectory

Variable step solver

Description
Allow solving with variable step for Solver class. Specify steps manually with Javascript Array of number

Context
Solver allows constant step solving only

Acceptance criteria
Same behavior as constant step solving when specifying an Array filled with a single value

Design
Same design as Trajectory

Finalize documentation

Description
Documentation the methods in the code and clean existing documentation

Acceptance criteria
Documentation all methods

Redesign tensor product

Description
Redesign current tensor product of two vector available in Vector3

Context
current tensor product allows only to compute the tensor product of vector and itself

Acceptance criteria
Test against rotation matrix

Design
Only refacto

Get code coverage

Description
Find tools to generate code coverage from unit tests

Context
Unit tests are already written

Remove pos, speeds and accels methods

Description
Remove pos, speeds and accels methods from Trajectory class.

Context
Theses function are not consistent for inherited class and wont be implemented in this module.

Mass center and barycenter for Field

Description
Method to compute the mass center and the barycenter for Field objects

Context
See #50

Acceptance criteria
Test a static system centered

Design
Linear combination comb()

Fix length computation

Description
Length computation must be recoded since speeds method has been deleted

Acceptance criteria
Unit tests

Multi method solver structure

Description
Allow Solver class to perform a solve with various methods

Context
The solver provides explicit Euler's method solving only

Acceptance criteria
The solver allows to use :

  • Euler's explicit method
  • Euler's implicit method (#7)
  • Runge Kutta 4 method (#4)

Design
Create a step() method
Use a enumeration parameter to specify which solver to use when calling the step()

explicit Runge Kutta 4 solving

Description
Solve ODE using RK4 explicit method

Context
Current solver is designed using Euler explicit method

Acceptance criteria
Same results as Euler explicit solving

Design
WIP

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.