java.lang.Object
imagingbook.common.geometry.line.AlgebraicLine
imagingbook.common.geometry.line.SlopeInterceptLine
- All Implemented Interfaces:
Primitive2d,ShapeProducer
This class represents a line in slope-intercept form: y = k x + d. Instances are immutable. Not all possible lines in
the 2D plane can be represented. A SlopeInterceptLine is merely a AlgebraicLine with a special
constructor and getter methods for k, d. See Sec. 10.1 and Appendix F.1 of [1] for details.
[1] W. Burger, M.J. Burge, Digital Image Processing – An Algorithmic Introduction, 3rd ed, Springer (2022).
- Version:
- 2022/11/18
-
Field Summary
Fields inherited from class imagingbook.common.geometry.line.AlgebraicLine
A, B, C -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class imagingbook.common.geometry.line.AlgebraicLine
equals, equals, from, from, from, from, getClosestLinePoint, getDistance, getDistance, getParameters, getShape, getShape, getSignedDistance, getSignedDistance, getSquareError, getXref, getYref, intersectMethods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface imagingbook.common.geometry.shape.ShapeProducer
getShape, getShapes, getShapes
-
Constructor Details
-
SlopeInterceptLine
-
SlopeInterceptLine
-
-
Method Details
-
getK
-
getD
-
getY
Returns the line's y-value for the specified x-position.- Parameters:
x- position along the x-axis- Returns:
- the associated y-value
-
toString
- Overrides:
toStringin classAlgebraicLine
-