%  platform  category

Animated drawing of geometry in AutoCAD.

The LISP function (grdraw) for drawing temporary geometry can help to replace the drawing of real DWG geometry with animated "strokes" of drawing line segments, vectors. This animation, phased painting, can be provided by the auxiliary function aGrDraw, part of the LISP library AnimDraw.lsp, which can be downloaded from the Helpdesk of the authors - ARKANCE. You can use it to create similar outputs:

In addition to specifying the end points of the geometry, you only need to specify the animation speed, the accuracy of the approximation and the colour of the drawing.

In the LISP file itself (and in the video) you can see examples of such animated drawing:

• geometry specified by coordinates - e.g. you can create an animation of a green crossed square using:

``` (aGrDraw '(-5 -5 0) '(5 -5 0) 3) ; CROSS-BOX
(aGrDraw '(5 -5 0) '(5 5 0) 3)
(aGrDraw '(5 5 0) '(-5 5 0) 3)
(aGrDraw '(-5 5 0) '(-5 -5 0) 3)
(aGrDraw '(-5 -5 0) '(5 5 0) 3)
(aGrDraw '(-5 5 0) '(5 -5 0) 3)
```

The yellow sine wave is then drawn/animated using:

``` (repeat 75 ; SINUS
(aGrDraw (list i (sin i) 0) (list (setq i (+ 0.177 i))(sin i) 0) 2)
)
```
• interpretation of an X-Y data stream (e.g. ECG curve) or even multiple streams at once - simulated in the example by a definition of data table:

``` (setq EKGdata '( (2 81) ; data set - EKG
(3 83) (4 88) (5 98) (6 92) (7 85) (8 73) (9 71)
(10 70) (11 83) (12 73) ...
```
• connection to 2DPLOT - the utility 2Dplot creates an auxiliary data table after generating a mathematical curve, which can then be drawn (if the AnimDraw library is loaded) as animated - by calling the LISP function (2dplotanim)

 See also: Tip 12448: Pan view (change view target) in multiple viewports of a layout. Tip 12446: Quick 1-/2-click dimensioning in AutoCAD. Tip 11354: Animate dyn.block parameters and dim.constraints in AutoCAD DWGs. Tip 11295: Iterative Move, Scale and Rotate - till boundary touch. Tip 8241: An overview of web addresses (URLs) for Autodesk Cloud services and apps.