refanw.blogg.se

Xline helper 2d
Xline helper 2d




xline helper 2d xline helper 2d

In OpenCV you may use either Mat::cross() or numpy.cross() to get cross product IMapWindow.IJ - for an Inline/Xline coordinate system IMapWindow.XY - for a XY based coordinate system IMapWindow.LATLONG - for a geodetic coordinate system Transformation for a seismic ILayer2D are provided to convert from XY to IJ and reverse.If ω is zero that means lines are parallel (have no single intersection point in Euclidean geometry). Cross product of two distinct lines in homogeneous coordinates gives homogeneous coordinate of their intersection point: (a₁, b₁, c₁) ✕ (a₂, b₂, c₂) = (x, y, ω).Cross product of two distinct points in homogeneous coordinates gives homogeneous line coordinates: (α.There're two interesting formulas that link together points and lines: Also, (nx, ny, d) is (cos φ, sin φ, ρ) where (φ, ρ) are polar coordinates of the line.Also, (a, b, c) corresponds to (nx, ny, d) where (nx, ny) is unit length normal vector and d is distance from the line to (0, 0).Each 2D line can be represented with three coordinates (a, b, c) which corresponds to 2D line equation: a.In OpenCV you may use convertPointsToHomogeneous() and convertPointsFromHomogeneous().It doesn't correspond to any point in 2D space. If ω is zero that means "point at infinity". Here's formula to convert homogeneous coordinates into 2D point: (x, y, ω) -> (x / ω, y / ω).Here's formula to convert 2D point into homogeneous coordinates: (x, y) -> (x, y, 1).y, β) correspond to the same point (x, y) in 2D space.Each 2D point (x, y) corresponds to a 3D line that passes through points (0, 0, 0) and (x, y, 1).In order to use this trick we represent each 2D point and each 2D line in homogeneous 3D coordinates. There's one cool trick in 2D geometry which I find to be very useful to calculate lines intersection.






Xline helper 2d