public void symmetric() {
		int i,j,segment=0;
		int symmetry = _geneticCode.getSymmetry();
		int mirror = _geneticCode.getMirror();
		int sequence = _segments / symmetry;
		int left=0, right=0, top=0, bottom=0;
		int centerX, centerY;
		double cx, cy;

		for (i=0; i<symmetry; i++) {
			for (j=0; j<sequence; j++,segment++) {
				// Here, we take the vector that forms the segment, scale it depending on
				// the relative size of the organism and rotate it depending on the
				// symmetry and mirroring.
				v.setModulus(_geneticCode.getGene(j).getLength()/Utils.scale[_growthRatio-1]);
				if (j==0) {
					_startPointX[segment] = 0;
					_startPointY[segment] = 0;
					if (mirror == 0 || i%2==0)
						v.setTheta(_geneticCode.getGene(j).getTheta()+i*2*Math.PI/symmetry);
					else {
						v.setTheta(_geneticCode.getGene(j).getTheta()+(i-1)*2*Math.PI/symmetry);
						v.invertX();
					}
				} else {
					_startPointX[segment] = _endPointX[segment - 1];
					_startPointY[segment] = _endPointY[segment - 1];
					if (mirror == 0 || i%2==0)
						v.addDegree(_geneticCode.getGene(j).getTheta());
					else
						v.addDegree(-_geneticCode.getGene(j).getTheta());
				}
				// Apply the vector to the starting point to get the ending point.
				_endPointX[segment] = (int) Math.round(v.getX() + _startPointX[segment]);
				_endPointY[segment] = (int) Math.round(v.getY() + _startPointY[segment]);
			    // Calculate the bounding rectangle of this organism
			    left = Math.min(left, _endPointX[segment]);
			    right = Math.max(right, _endPointX[segment]);
			    top = Math.min(top, _endPointY[segment]);
			    bottom = Math.max(bottom, _endPointY[segment]);
			}
		}
		_sizeRect.setBounds(left, top, right-left+1, bottom-top+1);
		// image center
		centerX = (left+right)>>1;
		centerY = (top+bottom)>>1;
		_mass = 0;
		_I = 0;
		for (i=0; i<_segments; i++) {
			// express points relative to the image center
			_startPointX[i]-=centerX;
			_startPointY[i]-=centerY;
			_endPointX[i]-=centerX;
			_endPointY[i]-=centerY;
			// calculate points distance of the origin and modulus
			_m1[i] = Math.sqrt(_startPointX[i]*_startPointX[i]+_startPointY[i]*_startPointY[i]);
			_m2[i] = Math.sqrt(_endPointX[i]*_endPointX[i]+_endPointY[i]*_endPointY[i]);
			_m[i] = Math.sqrt(Math.pow(_endPointX[i]-_startPointX[i],2) + 
					Math.pow(_endPointY[i]-_startPointY[i],2));
			_mass += _m[i];
			// calculate inertia moment
			// the mass center of a segment is its middle point
			cx = (_startPointX[i] + _endPointX[i]) / 2d;
			cy = (_startPointY[i] + _endPointY[i]) / 2d;
			// add the effect of this segment, following the parallel axis theorem
			_I += Math.pow(_m[i],3)/12d +
				_m[i] * cx*cx + cy*cy;// mass * length^2 (center is at 0,0)
		}
	}