Skip to content

(duplicate 'reflection)

Description

Constructs a mesh by duplication using a reflection. Points are extruded into lines, lines into quadrilaterals and quadrilaterals into hexahedras.

Syntax

(duplicate 'reflection mesh normal invariant-point)

Parameters

mesh The mesh to be extruded by reflection. This mesh could consist of points, lines or quadrilaterals. normal The vector normal to the symetry plane. invariant-point Any point in the symetry plane.

Example

Duplicate a point into a line by reflection with the plane z = 0

;;;Define a point
(define my-mesh ( make-mesh 'single-point (vector 0 0 1)))
;;;Duplicate the point into a line by reflection
(duplicate 'reflection my-mesh (vector 0 0 1) (vector 0 0 0))
;;;The mesh my-mesh is now line of length 2 meters.
;;;To visualize the result with the symetry plane,
;;;construct a quadrilateral in the plane *z* = 0 and
;;;add it to the mesh line (see **duplicate 'translation** for details)
(define plane ( make-mesh 'single-point (vector -1 -1 0)))
(duplicate 'translation plane 1 (vector 2 0 0))
(duplicate 'translation plane 1 (vector 0 2 0))
(define my-mesh (make-mesh 'add (list my-mesh plane)))
(view 'mesh my-mesh)
In the medit application use keys 'P' and 'g'.

See also

transform 'reflection, make-mesh, view.