
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
A node.js program for a fourbar position analysis using the vector method. This library encompasses the angles of all the links and their position vectors along with the transmission angle.
#FourBar Position Analysis
This library makes for quick and easy position analysis of a simple four bar linkage. Positions may be put through a simple derivative to obtain velocities and accelerations. For a better understanding of linkages and how to engineer linked mechanisms, see Robert L. Norton's Design of Machinery. Inside this text are in depth explanations of linkages and their uses.
##Methods
Method call | Parameters | Description |
---|---|---|
type | N/A | 'VectorMethod' |
linkageType | inputLength, couplerLength, outputLength, groundLength | Returns type of linkage |
couplerAngle | inputLength, couplerLength, outputLength, groundLength, inputAngle | Returns and Object with open and crossed configuration angles of coupler link from the positive x-axis based on the input link angle in Radians |
outputAngle | inputLength, couplerLength, outputLength, groundLength, inputAngle | Returns and Object with open and crossed configuration angles of output link from the positive x-axis based on input link angle in Radians |
couplerVector | inputLength, couplerLength, outputLength, groundLength, inputAngle, deltaAngle | Returns Objects of the real and imaginary components of both the crossed and open configurations based on the input angle in Radians + an optional delta as seen below |
outputVector | inputLength, couplerLength, outputLength, groundLength, inputAngle, deltaAngle | Returns Objects of the real and imaginary components of both the crossed and open configurations based on the input angle in Radians + an optional delta as seen below |
inputVector | inputLength, couplerLength, outputLength, groundLength, inputAngle, deltaAngle | Returns the real and imaginary components of the input link + an optional delta |
##Parameters
In the image below, input is represented by s, the coupler is p and the output is u. Driving angle is Theta 2 and the deltas are for creating ternary links.
##Example
Below is a vary basic example to show how fast calculations can be made
const FourBar = require('fourbar');
const four = new FourBar;
let output;
let coupler;
let transmission;
const link1 = 20;
const link2 = 10;
const link3 = 10;
const link4 = 10;
angle = (75 * (Math.PI/180));
output = four.outputAngle(link2, link3, link4, link1, angle);
coupler = four.couplerAngle(link2, link3, link4, link1, angle);
transmission = four.transmissionAngle(link2, link3, link4, link1, angle);
console.log(`Crossed output angle ${(output.crossed * (180/Math.PI))} \n`);
console.log(`Open output angle ${(output.open * (180/Math.PI))} \n`);
console.log(`Crossed coupler angle ${(coupler.crossed * (180/Math.PI))} \n`);
console.log(`Open coupler angle, ${(coupler.open * (180/Math.PI))} \n`);
console.log(`TYPE: ${four.linkageType(link2, link3, link4, link1, angle)} \n`);
console.log(`Crossed transmission angle ${(transmission.crossed * (180/Math.PI))} \n`);
console.log(`Open transmission angle ${(transmission.open * (180/Math.PI))} \n`);
FAQs
FourBar linkage vector analysis by vector method
The npm package fourbar receives a total of 3 weekly downloads. As such, fourbar popularity was classified as not popular.
We found that fourbar demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.