How to use PlotMorph?

Raymond Asselin raymondasselin at sympatico.ca
Mon Feb 2 22:33:57 UTC 2004


The 2004/02/02, Kwiyi Woo <kwiyi at hotmail.com> wrote :

>Also I don't 
>know how to plot a curve at specified function. Could anyone give me
some 
>suggestion for it?

Hi Kwiyi,   surprisingly I was looking at PlotMorph this weekend.  I
also found the explanations limited.  

What I have found (in the test4) is this:

³   function := [:x | x degreesToRadians sin / 5 + ((x / 10)
degreesToRadians cos + (x / 10) degreesToRadians sin) * 100].
    0
        to: 3000
        by: 5
        do: [:x | pm series: #test2 addPoint: x
                    @ (function value: x)].
    pm openInWorld  ³
    
-   where a mathematical function is defined within a  bloc Π[ :x | x
blabla....]¹  and assigned to the variable Œfunction¹, to be used in the
loop below where  the Œy¹ value of a point is compute with that
Œfunction¹ .  So is you change the mathematical function in that bloc
you¹ll have the result you are looking for.

Hope this help.
Ray



More information about the Squeak-dev mailing list