# title: circle of radius one with illumination to the right. # label: circle illum radius= getParam( 'radius', 1.0, 'radius of the circle' ) illumPos= getParam( 'illumPos', 'right', 'position of the illumination', [ 'right', 'left', 'top', 'bottom' ] ) sq1= cos(linspace(-PI/2,3*PI/2,37)) * radius sq2= sin(linspace(-PI/2,3*PI/2,37)) * radius if ( illumPos=='right' ): hsq1= sq1[0:19] hsq2= sq2[0:19] elif ( illumPos=='top' ): t= sq1 sq1= sq2 sq2= t hsq1= sq1[0:19] hsq2= sq2[0:19] elif ( illumPos=='bottom' ): sq1= sq1* -1 t= sq1 sq1= sq2 sq2= t sq1= sq1* -1 hsq1= sq1[0:19] hsq2= sq2[0:19] elif ( illumPos=='left' ): sq1= sq1* -1 hsq1= sq1[0:19] hsq2= sq2[0:19] ds= link( append( sq1, reverse(hsq1*0.9) ), append( sq2,reverse(hsq2*0.9) ) ) result= putProperty( ds, QDataSet.RENDER_TYPE, 'fillToZero>color=black&fillColor=black&symbol=none' )