Squeak
  links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
Markus Gaelli
Last updated at 1:45 pm UTC on 16 January 2006
Hi,

I am a PhD student at the SoftwareCompositionGroup in Berne, and I want to work on making objects more accessable by having examples everywhere...
See Eg and my wiki-pages about an ExampleBrowser.
See also the Example Group (Eg)

Programs for Squeak (under the Squeak Licence as far as my code is concerned...)

Why I like Squeak so much...

Sierpinski Triangle

Variant 1

Uploaded Image: variant1.gif

Display restoreAfter: [
  |aTriangle aPoint|
  aTriangle := {0@Display height. Display width / 2@0. Display extent}.
  aPoint := Display center.
  Display fillWithColor: Color white.
  [Sensor anyButtonPressed] whileFalse: [
    aPoint := (aPoint + aTriangle atRandom / 2) rounded.
    Display colorAt: aPoint put: Color black]]

Variant 2

Uploaded Image: variant2.gif

Display restoreAfter: [
  Display fillWhite.
	  (1 to: Display extent x) do: [:anX |
	    (1 to: Display extent y) do: [:anY |
			    ((anX bitAnd: anY) = 0 ) ifTrue: [Display colorAt: (anX@anY) put: Color black]]].
	      [Sensor anyButtonPressed] whileFalse: []]


gaelli@emergent.de