CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products [www.cadforum.cz]
CZ | EN | DE
Login or
registration
  Visitors: 17881

CAD tip CAD tip # 9042:

   
Question CAD 
 %  platform  category 
Q - question

Random scatter of AutoCAD drawing objects - SCATTER.

A - answer With the freeware LISP utility CADstudio Scatter you can randomly scatter selected, regularly placed objects - e.g. from ARRAY, DIVIDE, MEASURE, etc. You can achieve more natural look of your projects by nudging such objects by small, random displacements. You can also randomly change their rotation, scale, thickness or color.

The application allows to choose displacements in 2D, in 3D or in a single axis only (e.g. only in Z), circular (random direction), along a selected curve (moves only on the curve), or perpendicular to a selected curve. Since V1.8 you can also scatter lines and meshes in the Vertex-mode. The specified distance is the maximum allowed displacement (linear or normal/gaussian distribution). Since V2.1, also associative arrays are supported, without need to be exploded first.

Since version 1.2 you can also use random rotation with a given max. angle (2D or 3D). Version 1.3 adds normal distribution (Gauss) and circular nudge. Version 1.4 adds optional random scaling (1/X-X). Version 1.6 adds random thickness (2D objects only) and random color from a preset palette. Version 1.8 adds vertex mode for nudging vertices in polylines and meshes. Use the scatterpalcustom LISP variable to preset a custom color palette - e.g.:
(setq scatterpalcustom '(1 2 3))

Since version 2.0 you can use the command DRAWRND to draw points, circles or insert blocks with preset random modifiers. You can also insert random blocks from the list (mask) of allowed names (e.g. different types of trees) - the modifier Blkname. To vary color, block entities must be drawn in the BYBLOCK color.

You can download the Scatter utility from Download, load it with APPLOAD and run with the SCATTER command.

1000 points located at 0,0 scattered +/- 100 units using different methods:

Exploded rectangular array of 1.0-diameter donuts scattered with zero displacement, random thickness (2.0) and random color (Modern palette):

Exploded array of mesh spheres, nudged, scaled and assigned random color (Rainbow):

See also the videos:

Since version 1.7 you can preset the LISP variable _scatter_drawline:

(setq _scatter_drawline T)

to draw link-lines between the original and the new nudged position of the individual objects.

Since version 1.9 you can preset a true random number generator by using (setq _scatter_truerandom T) before loading scatter.vlx.

You can use Scatter also in AutoCAD LT (since release 2024).

ACADADTCivilMapACLT
100% *  CAD 
20.1.2013    51635×   FAQ  

See also:
Tip 14017:Voronoi diagrams in AutoCAD.
Tip 13694:Individual modification of elements in AutoCAD dynamic arrays.
Tip 10976:DUP - easily duplicate AutoCAD drawing objects.
Tip 7811:Nature doesn't use right angles.
Tip 6485:AutoCAD: freehand style drawing (squiggle)


Back   All CAD Tips



Have we helped you? If you want to support the CAD Forum web service, consider buying one of our CAD applications, or our custom software development offerings, or donating via PayPal (see above). You may also add a link to your web - like this "fan" link: CAD Forum - tips, utilities, blocks for Autodesk products
CAD:    OS:    Categ: 
Text:  FAQ glossary   



Featuring:
Increase your productivity with our set of BIM add-on functions for Autodesk Revit
CADstudio Revit Tools More info


Please use these tips at your own risk.
Arkance Systems is not responsible for possible problems that may occur as a result of using any of these tips.
TOPlist