search for: senkrechte

Displaying 1 result from an estimated 1 matches for "senkrechte".

2009 Jul 06
1
how to apply a self-written function to a data frame
...py = 2*(pp%/%2)-1 px = fx + px * abs(tx - fx) py = fy + 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