Skip to content

(duplicate 'rotation. . . )

Description

Constructs a mesh by duplication using a rotation. Points are extruded into lines, lines into quadri- laterals and quadrilaterals into hexahedras.

Syntax

(Duplicate 'rotation mesh rep. rotation-axis orig angle)

Parameters

mesh The mesh to be extruded by rotation. This mesh could be made of by points, lines or quadrilaterals. rep. Number of extrusion. rotation-axis Axis of rotation. For instance the z-axis can be given by the vector (vector 0 0 1). orig Origin of the rotation. The origin (x=0, y=0, z=0) is specified by (vector 0 0 0). angle Angle of rotation in degrees.

Examples

Duplicate a point into lines by rotation

Define a mesh named my-mesh which contain a single point giving its coordinates:

(define my-mesh ( make-mesh 'single-point (vector 0.1 0 0)))
;;;Here the coordinates of the point are (x=0.1, y=0, z=0).
;;; Duplicate the point into lines:
(duplicate 'rotation my-mesh 5 (vector 0 1 0) (vector 0 0 0) 30)
;;;The mesh my-mesh is now an arc which contains 5 lines generated
;;;by rotation of angle 30 degrees around the y-axis.
;;;Visualize the mesh:
(view 'mesh my-mesh)

Duplicate a line into quadrilaterals

Define a line by translation of a point (see duplicate 'translation. . . ). (define my-mesh ( make-mesh 'single-point (vector 0 0.1 0))) (duplicate 'translation my-mesh 1 (vector 0 0.O5 0)) (view 'mesh my-mesh)


Duplicate this line into quadrilaterals (duplicate 'rotation my-mesh 7 (vector 1 0 0) (vector 0 0 0) 10) (view 'mesh my-mesh) The mesh my-mesh is now a surface which contains 7 quadrilaterals generated by rotation of angle 10 degrees around the x-axis.

Duplicate quadrilaterals into hexahedras

Using the quadrilaterals from the previous example generate hexahedras by rotation (define my-mesh ( make-mesh 'single-point (vector 0 0.1 0))) (duplicate 'translation my-mesh 1 (vector 0 0.05 0)) (duplicate 'rotation my-mesh 7 (vector 1 0 0) (vector 0 0 0) 10) (duplicate 'rotation my-mesh 6 (vector 0 0 1) (vector 0 0 0) 15) (view 'mesh my-mesh)


The mesh my-mesh is now a volume which contains 42 hexahedras generated by rotation of angle 15 degrees around the z-axis.

See also

duplicate 'translation, make-mesh, transform, view.