Igeo tensileNetwork

The class ITensileNetwork creates a network which consists of particles and tension lines. It has friction and strength of tension as physical properties, no gravity unfortunately!!

The code below produces five tension lines fixed at one end tied together from a common node, the result will be an equilibrium of forces, in other words the minimum total distance from a point to all fixed nodes.

code:

import processing.opengl.*;
import igeo.*;

size( 800, 600, IG.GL );

int ptsNo = 5;
ITensionLine[] links = new ITensionLine[ptsNo];
IVecI[] nodes = new IVec[1];
ITensileNet itn = new ITensileNet();

links[0] = new ITensionLine(IRandom.pt(0, 10), IRandom.pt(0, 10));
nodes[0] = new IVec(links[0].end());

for (int i=1; i<ptsNo; i++)
{
links[i] = new ITensionLine(links[i-1].pt(2), IRandom.pt(0, 10));
}

itn.create(links, nodes);

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.0 UK: England & Wales License.

About these ads

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.