# -*- tcl -*- tcl.tk//DSL diagram//EN//1.0
proc vector {p args} {
    circle radius 2 at $p color red
    arrow  {*}$args from [0 0] to $p 
}

set p [100  50]
set d [100 -50]

set P [vector $p        text P below]
set D [vector $d        text D above]
vector [$p + $d] text P+D above

arrow dotted from [$P end] to [[$P end] + $d]
arrow dotted from [$D end] to [[$D end] + $p]
