source("http://macosa.dima.unige.it/r.R") # If I have not already loaded the library ---------- ---------- ---------- ---------- ---------- ---------- ---------- ----------S18Animations

While | |

These commands can be used to create animations. If I want, I can store them in file that I can load with |

BF=4; HF=4 PLANE(-3,3, -3,3) q=1; POINT(q,0, "red"); line2p(-1,-2, -1,2, "red") parabola <- function(x,y) y^2-4*q*x CURVE(parabola, "black") fig <- recordPlot() # the superior part of the parabola f = function(x) sqrt(4*q*x) for(x in (22:0)/10) {wait(0.3);replayPlot(fig) POINT(q,0, "red"); line2p(-1,-2, -1,2, "red") CURVE(parabola, "black") y = f(x); POINT(x,y, "brown") polyL( c(-1,x,1), c(y,y,0), "brown")} # a moment of the animation -> |