Draw points in an animation plot with Maxima

146 Views Asked by At

I have to draw with Maxima 10 random points of f(x) = cos(x) and it has to be an animation.

I tried this:

l:makelist(random(4*float(%pi)),k,1,10)$
fl:f(l)$
lngth:length(l)$
delay: 50000$
for i:1 thru lngth do
    block(
        [dummy:1],
        while dummy < delay do 
            dummy: dummy+1,
            draw2d(
                            explicit(f,x,0,4*float(%pi)),
                            point_size = 3,
                            point_type = filled_circle,
                            points(firstn (l, i),firstn (fl, i))
    ));

But when the new window opens in the tool bar the window is not shown in the screen.

  • How can I fix this?
  • Is there a better way to do that?