0
$\begingroup$

I need to create Convex Hull using QuickHull algorithm so I need to find two point for which x is smallest and largest and I need to check if the 3rd point is below or above. When I have points that are in $R^2$ I can detect if it's below of above line by creating function based on two points:

$ f(x) = \frac{y_2 - y_1}{x_2 - x_1} (x-x_1)+y_1 $

and then I can check if:

$ f(x_3) < y_3 $

How can I do the same but for $x \in R^3$ and $x \in R^n$?

  • 0
    How do you define *above* and *below*, if the line in $\Bbb{R}^2$ happens to be vertical? Similar definition must be given for $\Bbb{R}^n$. If the hyperplane does not pass thru the origin one way to "pick a side" could be to check whether a given point is on the same of opposite side in comparison to the origin. In general you could also pick a point not on any of the hyperplanes and use that point for comparison instead of the origin.2017-02-12
  • 0
    @JyrkiLahtonen isn't vertical lines not allowed as functions in $\mathbb R ^2$?2017-02-12
  • 0
    if $x_{min} = x_{max}$ there will be no convex hull i think.2017-02-12
  • 0
    Inner norm product2017-02-12
  • 0
    For example when you have two points with the minimum $x$-coordinate vertical lines as parts ot the boundary of the convex hull are unavoidable.2017-02-12
  • 0
    Find the convex hull of the following set of points $\{(0,0),(0,1),(0,2),(2,0),(2,1),(2,2)\}$ to see why your algorithm needs to be able to handle vertical line segments as parts of the boundary of the convex hull. Observe that $x_{min}2017-02-15

0 Answers 0