From 92337732d437972e96fb86bb4f06d6c418fc9aa8 Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Fri, 17 Jan 2014 11:03:52 +0100 Subject: Make control points for O track counter-clockwise --- src/RaceTrack.java | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/src/RaceTrack.java b/src/RaceTrack.java index ea9694a..6662196 100644 --- a/src/RaceTrack.java +++ b/src/RaceTrack.java @@ -42,6 +42,7 @@ class RaceTrack extends BetterBase { * Array with control points for the custom track. */ private Vector[] controlPointsCustomTrack; + private Vector[] selectedControlPoints; private final RobotRace race; /** * Debug option: set to true to show control points. @@ -56,37 +57,36 @@ class RaceTrack extends BetterBase { // points are chosen such that the boundaries of a quarter lay // on a straight line (to get second-order continuity). - // top #---|#---# - // left ^- - - - - - - begin here (top right) - // # # - // | | (v then continue clock-wise) + // top #---#|--# this is the first control point of top-left, + // left ^- - - - - - and the last of top-right + // # top # + // | right | (^ then continue anti-clockwise) + // - | + // # # <- - - begin here (top-right) // | - - // # # <- - this point is the last of top-right, - // - | and the first of bottom-left // | bottom | // # left right # - // #----#|--# + // #--|#---# controlPointsOTrack = new Vector[] { // top-right - new Vector( 0, 15, 1), + new Vector( 15, 0, 1), + new Vector( 15, 8, 1), new Vector( 8, 15, 1), - new Vector( 15, 8, 1), - // bottom-right - new Vector( 15, 0, 1), - new Vector( 15, -8, 1), + // top-left + new Vector( 0, 15, 1), + new Vector( -8, 15, 1), + new Vector(-15, 8, 1), - new Vector( 8, -15, 1), // bottom-left - new Vector( 0, -15, 1), - new Vector( -8, -15, 1), - - new Vector(-15, -8, 1), - // top-left new Vector(-15, 0, 1), - new Vector(-15, 8, 1), + new Vector(-15, -8, 1), + new Vector( -8, -15, 1), - new Vector( -8, 15, 1), + // bottom-right + new Vector( 0, -15, 1), + new Vector( 8, -15, 1), + new Vector( 15, -8, 1), }; } -- cgit v1.2.1