Squeak
  links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
Cardioid (MathMorphs)
Last updated at 6:01 pm UTC on 25 May 2017
| plotter a cardioidFunction |
plotter := ThetaRhoPlotter new.
plotter dotSize: 3.
plotter drawSteps: 12.

a := 10.
cardioidFunction := Function fromBlock: [:theta | 2*a*(1 + theta cos)].
plotter addFunction: cardioidFunction.
plotter domain: (ClosedInterval from: 0 to: 2 * Float pi).
plotter directDrawEnable: true.
plotter plot asMorph openInWorld.


cardioid.png
| plotter a cardioidFunction |
plotter := ThetaRhoPlotter new.
plotter dotSize: 3.
plotter drawSteps: 12.

a := 1.
cardioidFunction := Function fromBlock: [:theta | 2*a*(1 - theta sin)].
plotter addFunction: cardioidFunction.
plotter domain: (ClosedInterval from: 0 to: 2 * Float pi).
plotter directDrawEnable: true.
plotter plot asMorph openInWorld.

Cardioid_sin.png