Package org.djutils.draw.line
Class BezierTest
- java.lang.Object
-
- org.djutils.draw.line.BezierTest
-
public class BezierTest extends Object
Test the Bézier class.Copyright (c) 2013-2023 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.- Version:
- $Revision$, $LastChangedDate$, by $Author$, initial version Jan 2, 2017
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
-
-
Constructor Summary
Constructors Constructor Description BezierTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
bezierTest2d()
Test the various 2d methods in the Bezier class.void
bezierTest3d()
Test the various 3d methods in the Bezier class.void
compareBeziers(String description, PolyLine2d reference, PolyLine2d candidate, int numberOfPoints, double epsilon)
Compare Bézier curve approximations.void
testExceptions2d()
Test the various exceptions of the 2d methods in the Bezier class.void
testExceptions3d()
Test the various exceptions of the 3d methods in the Bezier class.
-
-
-
Method Detail
-
bezierTest2d
public final void bezierTest2d() throws DrawRuntimeException, DrawRuntimeException
Test the various 2d methods in the Bezier class.- Throws:
DrawRuntimeException
- when this happens uncaught this test has failedDrawRuntimeException
- when this happens uncaught; this test has failed
-
compareBeziers
public void compareBeziers(String description, PolyLine2d reference, PolyLine2d candidate, int numberOfPoints, double epsilon) throws DrawRuntimeException
Compare Bézier curve approximations.- Parameters:
description
- String; description of the testreference
- PolyLine2d; reference Bézier curve approximationcandidate
- PolyLine2d; candidate Bézier curve approximationnumberOfPoints
- int; number of point to compare the curves at, minus one; this method checks at 0% and at 100%epsilon
- double; upper limit of the distance between the two curves- Throws:
DrawRuntimeException
- if that happens uncaught; a test has failed
-
bezierTest3d
public final void bezierTest3d() throws DrawRuntimeException
Test the various 3d methods in the Bezier class.- Throws:
DrawRuntimeException
- when this happens uncaught this test has failed
-
testExceptions2d
public void testExceptions2d()
Test the various exceptions of the 2d methods in the Bezier class.
-
testExceptions3d
public void testExceptions3d()
Test the various exceptions of the 3d methods in the Bezier class.
-
-