CGGeometry+IDPExtensions -> added the affine transforms for origin
IDPMath -> changed the  random number function to comply with guidelines