$SPAD/src/input arrows.input

Timothy Daly December 3, 2016

Abstract

Contents

2

1 License

— license —

--Copyright The Numerical Algorithms Group Limited 1991.

———-

— * —

)set break resume
)spool arrows.output
)set message test on
)set message auto off
)clear all
--S 1 of 3
arrowAngle:=%pi-%pi/10.0@SF
--R
--R
--R   (1)  2.8274333882308138
--R                                                            Type: DoubleFloat
--E 1
--S 2 of 3
arrowScale:=0.2@SF
--R
--R
--R   (2)  0.20000000000000001
--R                                                            Type: DoubleFloat
--E 2
--S 3 of 3
makeArrow(p1,p2) ==
    delta    :=p2 -p1
    len      := arrowScale * length delta
    theta := atan(delta.1, delta.2)
    c1:= len*cos(theta+arrowAngle)
    s1:= len*sin(theta+arrowAngle)
    c2:= len*cos(theta-arrowAngle)
    s2:= len*sin(theta-arrowAngle)
    z:= p2.3*(1-arrowScale)
    p3:=point[p2.1+c1,p2.2+s1,z,p2.4]
    p4:=point[p2.1+c2,p2.2+s2,z,p2.4]
    [[p1,p2,p3],[p2,p4]]
--R
--R                                                                   Type: Void
--E 3
)spool
)lisp (bye)

———- 4

References^{[1] nothing}

5