Peter de Jong Attractor in Python using PyGameAn attractor is defined as the smallest unit which cannot be itself decomposed into two or more attractors with distinct basins of attraction. This restriction is necessary since a dynamical system may have multiple attractors, each with its own basin of attraction. (Source: Wiki)
Topic like Attractors or Chaos Theory have found application in physical level security.Code :- https://gist.github.com/AnimeshShaw/267b7ba82ffe5e33b326This section is the main part where we get the coordinates of the points to plot.self.xn, self.yn = ( sin( self.constants["a"] * self.yn ) - cos ( self.constants["b"] \
* self.xn ) ), ( sin( self.constants["c"] * self.xn ) - cos( self.constants["d"] * self.yn ) )
# xn, yn = ( d * sin( a * xn ) - sin ( b * yn ) ), ( c * cos( a * xn ) + cos( b * yn ) )
self.coords.append( ( self.xn, self.yn ) )
pygame.draw.circle( self.screen, self.grayshade , ( self.width // 2 + \
int( 120 * self.xn ), self.height // 2 + int( 120 * self.yn ) ), 1, 1 )
I hope you like these. The better one's are on the way
I am making a gallery of "Art and Designs made with Code" which I will be posting shortly.
Thank you,
Sincerely,
Psycho_Coder.