I need help with my BM Trike! We have put WS2801 LED strips on

I need help with my BM Trike! We have put WS2801 LED strips on in a non rectangular order.I have put together a matrix table (stealing code from lots of other people on this group!) that I am trying to use so that we can get the LEDs to light up in order from the front to the back of the trike in a sweeping sort of motion. But for the life of me I cannot figure out how to access the table correctly. This is the code I currently have. When I use the fill rainbow function, it does fill the LEDs with rainbow colors, but they are not in the right order. Any help would be appreciated. I am really out of my league, but am desperately hoping to get this done so that we are not darkwads!

#include<FastLED.h>

#define DATA_PIN 2 //yellow serial date
#define CLK_PIN 3 //green serial clock
#define BRIGHTNESS 50 //0-255 for brightness
#define LED_TYPE WS2801
#define COLOR_ORDER GRB
#define FRAMES_PER_SECOND 40

// Params for width and height
const uint8_t kMatrixWidth = 6;
const uint8_t kMatrixHeight = 20;
const bool kMatrixSerpentineLayout = false;

#define NUM_LEDS (kMatrixWidth * kMatrixHeight)
#define MAX_DIMENSION ((kMatrixWidth>kMatrixHeight) ? kMatrixWidth : kMatrixHeight)

CRGB leds[ NUM_LEDS ];

#define LAST_VISIBLE_LED 62
uint8_t XY( uint8_t x, uint8_t y)
{
// any out of bounds address maps to the first hidden pixel
if( (x >= kMatrixWidth) || (y >= kMatrixHeight) ) {
return (LAST_VISIBLE_LED + 1);
}

const uint8_t Trike[] = {
33, 0, 0, 0, 0, 42,
32, 34, 0, 41, 0, 43,
31, 35, 0, 40, 0, 44,
36, 0, 0, 0, 0, 39,
30, 37, 0, 38, 0, 45,
29, 0, 0, 0, 0, 46,
28, 27, 26, 49, 48, 47,
25, 0, 0, 0, 0, 50,
12, 0, 24, 0, 0, 62,
11, 0, 23, 0, 0, 61,
10, 0, 22, 0, 0, 60,
9, 0, 21, 0, 0, 59,
8, 0, 20, 0, 0, 58,
7, 0, 19, 0, 0, 57,
6, 0, 18, 0, 0, 56,
5, 0, 17, 0, 0, 55,
4, 0, 16, 0, 0, 54,
3, 0, 15, 0, 0, 53,
2, 0, 14, 0, 0, 52,
1, 0, 13, 0, 0, 51,
};

uint8_t i = (y * kMatrixWidth) + x;
uint8_t j = Trike[i];
return j;

}

void setup() {
FastLED.addLeds<LED_TYPE, DATA_PIN, CLK_PIN, COLOR_ORDER>(leds, NUM_LEDS).setCorrection(TypicalLEDStrip);
FastLED.setBrightness( BRIGHTNESS );
}
uint8_t gHue = 0;
void loop()
{
fill_rainbow( leds, NUM_LEDS, 0, 5);
FastLED.show();

}

Can you post a photo of the LEDs actual set up? This xy map doesn’t look like the graph you used before

Also what controller are you using?

Also: the fill_rainbow function doesn’t “know” to use your XY function or Trike mapping; you’ll need to write a short loop just like fill_rainbow, but that uses the XY function and Trike array to get the order right. I can probably help a little later this morning, if it’s still needed!
The source for fill_rainbow is in here
https://github.com/FastLED/FastLED/blob/master/colorutils.cpp