% Input:
% l: 2d-vector (direction)
% spvalue: double (evaluation of the support function in direction l)

% Output:
% point1,point2: vector ( 2 points on the supporting hyperplane)
% k: double (Steigung der Geraden)
% t: double (Achsenabschnitt)

% Description:
% Computes the equation of the line representing the supporting hyperplane
% in the 2-dimensional space. For vertical lines k=inf  and x=t

% Beschreibung:
% berechnet die Geradengleichung der Gerade, die die supporting hyperplane
% darstellt. Für den Spezialfall einer senkrechten Gerade gilt k= Inf oder
% -Inf und t beschreibt die x Koordinate


function [point1,k,t,point2] = plothalfspaceEXT(l,spvalue)

point1 = spvalue*l/(norm(l,2)^2);

r = [-l(2) l(1)];
point2 = point1+r;
k = (point2(2)-point1(2))/((point2(1)-point1(1)));

if k == Inf || k == -Inf
    t = point1(1);    
else
    t = point1(2) - k*point1(1);
end;