12.07.2015 Views

Chapter 13 - Davidson Physics

Chapter 13 - Davidson Physics

Chapter 13 - Davidson Physics

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CHAPTER 14. FRACTALS AND KINETIC GROWTH MODELS 524}pys [ n ] = ys [0]+ ny [ n ] ;s i t e [ pxs [ n ] ] [ pys [ n ] ] = ( byte ) 2 ;}perimeterNumber = 4 ;public void s t e p ( ) {i f ( perimeterNumber >0) {int p e r i m e t e r = ( int ) (Math . random ( ) * perimeterNumber ) ;int x = pxs [ p e r i m e t e r ] ;int y = pys [ p e r i m e t e r ] ;perimeterNumber −−;pxs [ p e r i m e t e r ] = pxs [ perimeterNumber ] ;pys [ p e r i m e t e r ] = pys [ perimeterNumber ] ;i f (Math . random()

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!