A PHP Error was encountered

Severity: Notice

Message: Undefined offset: 0

Filename: controllers/web.php

Line Number: 169

A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: controllers/web.php

Line Number: 169

A PHP Error was encountered

Severity: Notice

Message: Undefined offset: 0

Filename: controllers/web.php

Line Number: 198

A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: controllers/web.php

Line Number: 198

A PHP Error was encountered

Severity: Notice

Message: Undefined offset: 0

Filename: controllers/web.php

Line Number: 199

A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: controllers/web.php

Line Number: 199

A PHP Error was encountered

Severity: Notice

Message: Undefined offset: 0

Filename: controllers/web.php

Line Number: 200

A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: controllers/web.php

Line Number: 200

Topics

Topic Description:

No topic description available.

File: spatial/slope.r

Package Source Not Available No help file available

Function: calc.directionslope

Function Description: calc.directionslope


Function Arguments:

ArgumentDefault Value
z1
z2
x1
x2
y1
y2

Function Source:

calc.directionslope=function(z1,z2,x1,x2,y1,y2)
{
normal=c(z1*y2-z2*y1,z1*x2-z2*x1,y1*x2-y2*x1)
# browser()

if(normal[1]==0)
{
if(normal[2]>=0) direction=0
else direction=pi
}
else if(normal[1]>0) direction=pi/2-atan(normal[2]/normal[1])
else direction=3*pi/2-atan(normal[2]/normal[1])

slope=(-1)*tan(acos(normal[3]/sqrt(sum(normal^2))))

return(c(direction,slope))
}