public Point2D getNormalAt( double position ) {
		if( position < 0 || position > 1 ) {
			throw new IllegalArgumentException( "position out ouf range: " + position );
		}

		int segment = segmentAt( position );

		Point2D start = segments[segment];
		Point2D end = segments[segment + 1];

		double distance = segmentLengths[segment];
		if( distance == 0 ) {
			return new Point2D.Double( 0, 0 );
		}
		double dx = (end.getX() - start.getX()) / distance;
		double dy = (end.getY() - start.getY()) / distance;

		return new Point2D.Double( dy, -dx );
	}