public static void convexHull ( Point points [ ] , int n ) {
  if ( n < 3 ) return ;
  Vector < Point > hull = new Vector < Point > ( ) ;
  int l = 0 ;
  for ( int i = 1 ;
  i < n ;
  i ++ ) if ( points [ i ] . x < points [ l ] . x ) l = i ;
  int p = l , q ;
  do {
    hull . add ( points [ p ] ) ;
    q = ( p + 1 ) % n ;
    for ( int i = 0 ;
    i < n ;
    i ++ ) {
      if ( orientation ( points [ p ] , points [ i ] , points [ q ] ) == 2 ) q = i ;
    }
    p = q ;
  }
  while ( p != l ) ;
  for ( Point temp : hull ) System . out . println ( "(" + temp . x + ", " + temp . y + ")" ) ;
}

public static void convexHull ( Point points [ ] , int n ) { if ( n < 3 ) return ; Vector < Point > hull = new Vector < Point > ( ) ; int l = 0 ; for ( int i = 1 ; i < n ; i ++ ) if ( points [ i ] . x < points [ l ] . x ) l = i ; int p = l , q ; do { hull . add ( points [ p ] ) ; q = ( p + 1 ) % n ; for ( int i = 0 ; i < n ; i ++ ) { if ( orientation ( points [ p ] , points [ i ] , points [ q ] ) == 2 ) q = i ; } p = q ; } while ( p != l ) ; for ( Point temp : hull ) System . out . println ( " ( " + temp . x + " , ▁ " + temp . y + " ) " ) ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) name: (identifier) dimensions: (dimensions)) (formal_parameter type: (integral_type) name: (identifier))) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (return_statement)) (local_variable_declaration type: (generic_type (type_identifier) (type_arguments (type_identifier))) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (generic_type (type_identifier) (type_arguments (type_identifier))) arguments: (argument_list)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (identifier)) update: (update_expression (identifier)) body: (if_statement condition: (parenthesized_expression (binary_expression left: (field_access object: (array_access array: (identifier) index: (identifier)) field: (identifier)) right: (field_access object: (array_access array: (identifier) index: (identifier)) field: (identifier)))) consequence: (expression_statement (assignment_expression left: (identifier) right: (identifier))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (identifier)) declarator: (variable_declarator name: (identifier))) (do_statement body: (block (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (array_access array: (identifier) index: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) right: (identifier)))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (identifier)) update: (update_expression (identifier)) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (method_invocation name: (identifier) arguments: (argument_list (array_access array: (identifier) index: (identifier)) (array_access array: (identifier) index: (identifier)) (array_access array: (identifier) index: (identifier)))) right: (decimal_integer_literal))) consequence: (expression_statement (assignment_expression left: (identifier) right: (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (identifier)))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier)))) (enhanced_for_statement type: (type_identifier) name: (identifier) value: (identifier) body: (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (binary_expression left: (binary_expression left: (binary_expression left: (binary_expression left: (string_literal) right: (field_access object: (identifier) field: (identifier))) right: (string_literal)) right: (field_access object: (identifier) field: (identifier))) right: (string_literal))))))))