Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

Raw File Download

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
content badge
swh:1:cnt:48d320e994ada682f164ac2ebe1a495fa2bd9e25

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
(requires biblatex-software package)
Generating citation ...
We provide a reference implementation of the RedMax algorithm, written in object-oriented MATLAB (2018b). This code is not designed for performance but is rather designed for pedagogical purposes. To run the code, go to the directory containing testRedMax.m and type:

```
>> testRedMax(1,0)
```
This will show a swinging chain with alternating revolute/fixed joints. The first two arguments modify the integrator type and the scene ID:

	(1) `itype`: Integrator type
		- `1` Use the recursive O(n) algorithm [Kim and Pollard 2011; Kim 2012] with ode45.
		- `2` Use RedMax with ode45. This gives numerically the same solution as the recursive O(n) algorithm.
		- `3` Use RedMax with linearly implicit Euler. This is the most feature-rich option.
	(2) `sceneID`: There are many preset scenes. The first few are:
		- `0` Simple serial chain
		- `1` Different revolute axes
		- `2` Branching
		- `3` Spherical joint
		- `4` Loop
		- `5` ···

The full list of scenes is in testRedMax.m. The other arguments are used to control what gets displayed:

	(3) `drawScene`: Whether to draw the scene. Thiscansignificantly speed up the program, since drawing in MATLAB is very slow.
	(4) `plotH`: Whether to compute and plot the energy over time.

To run all the test cases, copy and paste the following into the command window:

```
clear; clc;
for itype = 1 : 3
  for sceneID = 0 : 35
    testRedMax(itype,sceneID,false,false);
  end
end
```

back to top

Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API