<!-- previously Copyright 2008 David Dodds All Rights Reserved code
copyright owner -->
<!-- view origin x,y = 0,0 is upper , left corner -->
<!-- true if x1,y1 is <= dist radial units away from x2,y2 -->
public boolean near2( int x1, int y1, int x2, int y2 )
{ int dist = 10;
//calculate radial dist from x2,y2 to x1,y1.
//use dist between two points calculation
// d= sqrt( (x2-x1)**2 + (y2-y1)**2 );
if ( round ( sqrt ( power ( (x2-x1), 2 ) + power ( (y2-y1), 2 ) ) ) <=
dist )
{
return true;
}
else
{
return false;
}
}
<!-- view origin x,y = 0,0 is upper , left corner -->
public real nearTo(int x1, int y1, int x2, int y2, int k(2))
{
nearTo = 1 - (1/2 + 1/PI*arctan( (sqrt ( power( (x2-x1),2) + power(
(y2-y1),2) ) ) - k(1)/k(2) ) ) ;
return nearTo;
}
<!-- view origin x,y is upper , left corner -->
<!-- true if x1,y1 is <= dist units away from x2,y2 in each of x,y
axis -->
public boolean near( int x1, int y1, int x2, int y2 )
{ int dist = 10;
if ( abs(x2 - x1) <= dist ) && ( abs(y2 - y1) <= dist )
{
return true;
}
else
{
return false;
}
}
<!-- view origin x,y is upper , left corner -->
<!-- true if x1 = x2, y1 = y2 -->
public boolean at( int x1, int y1, int x2, int y2 )
{
if (x1 == x2 ) && ( y1 == y2)
{
return true;
}
else
{
return false;
}
}
<!-- view origin x,y is upper , left corner -->
<!-- true if y1 below y2 & y2 above y1 -->
public boolean Below( int y1, int y2 )
{
if (y1 > y2 )
{
return true;
}
else
{
return false;
}
}
<!-- view origin x,y is upper , left corner -->
<!-- true if x1 left of x2, = x2 right of x1 -->
public boolean toRight( int x1, int x2 )
{
if (x1 < x2 )
{
return true;
}
else
{
return false;
}
}
<!-- view origin x,y is upper , left corner -->
<!-- true if y1 above y2 & y2 below y1 -->
public boolean Above( int y1, int y2 )
{
if (y1 < y2 )
{
return true;
}
else
{
return false;
}
}
<!-- view origin x,y is upper , left corner -->
<!-- true if x2 left of x1, = x1 right of x2 -->
public boolean toLeft( int x1, int x2 )
{
if (x1 > x2 )
{
return true;
}
else
{
return false;
}
}
<!-- view origin x,y is upper , left corner -->
<!-- true if x2 left of x1, = x1 right of x2 -->
public boolean sameX( int x1, int x2 )
{
if (x1 == x2 )
{
return true;
}
else
{
return false;
}
}
<!-- view origin x,y is upper , left corner -->
<!-- true if x2 left of x1, = x1 right of x2 -->
public boolean sameY( int y1, int y2 )
{
if (y1 == y2 )
{
return true;
}
else
{
return false;
}
}
<?xml version="1.0" standalone="yes" ?>
<!-- previously Copyright 2008 David Dodds All Rights Reserved code
copyright owner -->
<sqwirls xmlns = 'http://www.open-meta.com/sqwirls'>
<sqwirl node="1" ann="Ann Notation" > <!-- node annotation and
reference -->
<!-- David Dodds Processing Connection Service (PCS) -->
<fanio>
<fan pgms="foo" here="a" to="myfoo_barchart#originlabel" />
<fan pgms="majestic12" here="b"
to="myfoo_barchart#desc1.myfoo:contains" />
<fan pgms="bar" cmt="comment" here="c" to="myfoo_barchart#uplabel" />
<fan here="d" to="myfoo_barchart#bar1" />
<fan here="e" to="myfoo_barchart#text1" />
<fan here="f" to="myfoo_barchart#text2" />
<fan pgms="seq25" here="g" to="myfoo_barchart#bar3" />
<fan here="h" to="myfoo_barchart#bar5" />
<fan here="i" to="myfoo_barchart#bar7" />
<fan here="j" to="myfoo_barchart#bar9" />
<fan here="k" to="ann_GreenGables#here.a" />
</fanio>
<bagg> <!-- property-lists -->
<majic pt1="majestic1" pt2="orange" />
<majic pt1="colour27" pt2="lightgreen" />
</bagg>
</sqwirl>
<sqwirl node="379" ann="GreenGables" > <!-- node annotation and
reference -->
<!-- David Dodds Processing Connection Service (PCS) -->
<fanio>
<fan pgms="foo_ton" here="a" to="ann_Ann Notation" />
<fan pgms="majestic11" here="b" to="SWEET_numerics.owl#lessThan" />
<fan pgms="bar_tool"
cmt="SWEET ontology in post382" here="c" to="myfoo_barchart#below(2)" />
<fan here="d" to="SWEET_property.owl#hasWidth" />
<fan here="e" to="SWEET_property.owl#hasHeight" />
</fanio>
<bagg> <!-- property-lists -->
<majic pt1="area" pt2="50.5" />
<majic pt1="phrase" pt2="six2andeven" />
</bagg>
</sqwirl>
</sqwirls>