else if ( dJ == dI )
else if ( ChartUtil.mathEqual( dJ, dI ) )
	protected final void renderPlane( IPrimitiveRenderer ipr, Object oSource,			Location[] loaFront, Fill f, LineAttributes lia, ChartDimension cd,			double dSeriesThickness, boolean bDeferred ) throws ChartException	{		PolygonRenderEvent pre;		if ( cd.getValue( ) == ChartDimension.TWO_DIMENSIONAL )		{			// RENDER THE POLYGON			pre = (PolygonRenderEvent) ( (EventObjectCache) ipr ).getEventObject( oSource,					PolygonRenderEvent.class );			pre.setPoints( loaFront );			pre.setBackground( f );			pre.setOutline( lia );			ipr.fillPolygon( pre );			ipr.drawPolygon( pre );			return;		}		final boolean bSolidColor = f instanceof ColorDefinition;		Fill fDarker = null, fBrighter = null;		if ( cd.getValue( ) == ChartDimension.TWO_DIMENSIONAL_WITH_DEPTH				|| cd.getValue( ) == ChartDimension.THREE_DIMENSIONAL )		{			fDarker = f;			if ( fDarker instanceof ColorDefinition )			{				fDarker = ( (ColorDefinition) fDarker ).darker( );			}			fBrighter = f;			if ( fBrighter instanceof ColorDefinition )			{				fBrighter = ( (ColorDefinition) fBrighter ).brighter( );			}		}		final int nSides = loaFront.length;		final Location[][] loaa = new Location[nSides + 1][];		Location[] loa;		double dY, dSmallestY = 0;		for ( int j, i = 0; i < nSides; i++ )		{			j = i + 1;			if ( j >= loaFront.length )				j = 0;			loa = new Location[4];			loa[0] = LocationImpl.create( loaFront[i].getX( ),					loaFront[i].getY( ) );			loa[1] = LocationImpl.create( loaFront[j].getX( ),					loaFront[j].getY( ) );			loa[2] = LocationImpl.create( loaFront[j].getX( )					+ dSeriesThickness, loaFront[j].getY( ) - dSeriesThickness );			loa[3] = LocationImpl.create( loaFront[i].getX( )					+ dSeriesThickness, loaFront[i].getY( ) - dSeriesThickness );			loaa[i] = loa;		}		loaa[nSides] = loaFront;		// SORT ON MULTIPLE KEYS (GREATEST Y, SMALLEST X)		double dI, dJ;		Location[] loaI, loaJ;		for ( int i = 0; i < nSides - 1; i++ )		{			loaI = loaa[i];			for ( int j = i + 1; j < nSides; j++ )			{				loaJ = loaa[j];				dI = getY( loaI, IConstants.AVERAGE );				dJ = getY( loaJ, IConstants.AVERAGE );				if ( dJ > dI ) // SWAP				{					loaa[i] = loaJ;					loaa[j] = loaI;					loaI = loaJ;				}				else if ( dJ == dI )				{					dI = getX( loaI, IConstants.AVERAGE );					dJ = getX( loaJ, IConstants.AVERAGE );					if ( dI > dJ )					{						loaa[i] = loaJ;						loaa[j] = loaI;						loaI = loaJ;					}				}			}		}		int iSmallestYIndex = 0;		for ( int i = 0; i < nSides; i++ )		{			dY = getY( loaa[i], IConstants.AVERAGE );			if ( i == 0 )			{				dSmallestY = dY;			}			else if ( dSmallestY > dY )			{				dSmallestY = dY;				iSmallestYIndex = i;			}		}		ArrayList alModel = new ArrayList( nSides + 1 );		Fill fP;		for ( int i = 0; i <= nSides; i++ )		{			pre = (PolygonRenderEvent) ( (EventObjectCache) ipr ).getEventObject( oSource,					PolygonRenderEvent.class );			pre.setOutline( lia );			pre.setPoints( loaa[i] );			if ( i < nSides ) // OTHER SIDES (UNKNOWN ORDER) ARE DEEP			{				pre.setDepth( -dSeriesThickness );			}			else			// FRONT FACE IS NOT DEEP			{				pre.setDepth( 0 );			}			if ( i == nSides )			{				fP = f;			}			else if ( i == iSmallestYIndex )			{				fP = fBrighter;			}			else			{				fP = fDarker;			}			pre.setBackground( fP );			if ( bDeferred )			{				alModel.add( pre.copy( ) );			}			else			{				ipr.fillPolygon( pre );			}			if ( i == nSides )			{			}			else if ( i == iSmallestYIndex )			{				// DRAW A TRANSLUCENT LIGHT GLASS PANE OVER THE BRIGHTER SURFACE				// (IF NOT A SOLID COLOR)				if ( !bSolidColor )				{					pre.setBackground( LIGHT_GLASS );				}				if ( bDeferred )				{					alModel.add( pre.copy( ) );				}				else				{					ipr.fillPolygon( pre );				}			}			else			{				// DRAW A TRANSLUCENT DARK GLASS PANE OVER THE DARKER SURFACE				// (IF NOT A SOLID COLOR)				if ( !bSolidColor )				{					pre.setBackground( DARK_GLASS );				}				if ( bDeferred )				{					alModel.add( pre.copy( ) );				}				else				{					ipr.fillPolygon( pre );				}			}			if ( !bDeferred )			{				ipr.drawPolygon( pre );			}		}		if ( !alModel.isEmpty( ) )		{			dc.addModel( new WrappedInstruction( getDeferredCache( ),					alModel,					PrimitiveRenderEvent.FILL ) );		}	}