Displaying 2 results from an estimated 2 matches for "abstand".
2008 Mar 01
1
jpeg and margin text
...(par("usr")[2] + 11.5,par("usr")[2] +
11.5),c(Maximum+0.1,0.25),xpd=TRUE)
lines(c(par("usr")[2] + 0.9,par("usr")[2] +
0.9),c(Maximum+0.1,0.25),xpd=TRUE)
lines(c(par("usr")[2] + 3.45,par("usr")[2] +
3.45),c(Maximum+0.1,0.25),xpd=TRUE)
Abstand<-Maximum-0.15
# aktueller Standpunkt
for(i in 1:20){
lines(c(par("usr")[2] + 0.4,par("usr")[2] +
11.5),c(Maximum+0.1-Abstand*(i-1)/20,Maximum+0.1-Abstand*(i-1)/20),xpd=TRUE)
}
lines(c(par("usr")[2] + 0.4,par("usr")[2] + 11.5),c(0.25,0.2...
2009 Jul 06
1
how to apply a self-written function to a data frame
...py * abs(ty - fy)
# Koordinaten des Mittelpunkts
fx=512
fy=393
# Transformation auf Mittelpunkt (von links/oben auf Zentrum von T und P)
# tx=tx+90
# ty=ty-90
# px=px+90
# py=py-90
# Gerade f-t
a=(ty-fy)/(tx-fx)
b=(fx*ty-fy*tx)/(tx-fx)
# Senkrechte von gaze auf Gerade f-t
as=-1/a
bs=gy-gx*as
# Abstand gaze von Gerade f-t
lx=-(b-bs)/(a-as)
ly=((a+as)*lx+(b+bs))/2
# Vorzeichen
vp=2*(py<a*px+b)-1
vg=2*(gy<a*gx+b)-1
# gerichteter Abstand gaze von Gerade f-t (in pixel)
vg*vp*sqrt((lx-gx)^2+(ly-gy)^2)
}
thanks a lot in advance
Jens B?lte