for (int i = 0; i < lightSources.length; i++) {
int color = lightSourceColors [i].startsWith("#")
? Integer.parseInt(lightSourceColors [i].substring(1), 16)
: Integer.parseInt(lightSourceColors [i]);
// Create the matching light source, converting cm to percentage of width, depth and height
lightSources [i] = new LightSource(Float.parseFloat(lightSourceX [i]) / lightWidth,
Float.parseFloat(lightSourceY [i]) / lightDepth,
Float.parseFloat(lightSourceZ [i]) / lightHeight,
color,
lightSourceDiameters != null
? Float.parseFloat(lightSourceDiameters [i]) / lightWidth