A method to animate on a screen a virtual pen or the like, which writes and draws on said screen an output consisting of a drawing or grapheme by means of lines (1-9; 865; 852) in such a way it looks like a real pen used by a user, comprising the steps of: - creating the drawing or grapheme by the user as a sequence of line portions separated by knot points, each knot point having a pair of coordinates; - attributing to each knot point a parameter selected among: kind of interpolation and relative weights, pen status, that is pen up or down from the writing surface, duration of a possible pause, writing speed downstream of the knot point, thickness of the line downstream of the knot point, or a combination thereof; - storing said knot points and said parameters attributed to each knot point for each drawing or grapheme to be drawn; - generating from said stored knot points and parameters an output comprising a trajectory of said pen reaching said knot points; said trajectory being formed by visible line portions and invisible line portions between said knot points; wherein the trajectory of said pen takes into account values selected from the group consisting of: the values of said parameters of said knot points; the values of the parameter writing speed downstream of the knot point or the values of the parameter thickness of the line downstream of the knot point which are interpolated between said knot points; a combination thereof; - causing said virtual pen to appear on said screen and animating on said screen said virtual pen which writes and draws by drawing said line portions (1-9; 865; 852) of said trajectory one line after the other and reaching said knot points in such a way it looks like a real pen used by a teacher writing on a real blackboard. - creating the drawing or grapheme by the user as a sequence of line portions separated by knot points, each knot point having a pair of coordinates; - attributing to each knot point a parameter selected among: kind of interpolation and relative weights, pen status, that is pen up or down from the writing surface, duration of a possible pause, writing speed downstream of the knot point, thickness of the line downstream of the knot point, or a combination thereof; - storing said knot points and said parameters attributed to each knot point for each drawing or grapheme to be drawn; - generating from said stored knot points and parameters an output comprising a trajectory of said pen reaching said knot points; said trajectory being formed by visible line portions and invisible line portions between said knot points; wherein the trajectory of said pen takes into account values selected from the group consisting of: the values of said parameters of said knot points; the values of the parameter writing speed downstream of the knot point or the values of the parameter thickness of the line downstream of the knot point which are interpolated between said knot points; a combination thereof; - causing said virtual pen to appear on said screen and animating on said screen said virtual pen which writes and draws by drawing said line portions (1-9; 865; 852) of said trajectory one line after the other and reaching said knot points in such a way it looks like a real pen used by a teacher writing on a real blackboard.