Attributes

Attributes

The attributes of a geometric object are

They are attributed by providing key=value parameters in the construction of the object or by assignement

obj[:key]=value

Color

Axl.ColorType.

Color represented by the r, g, b components (Int64 between 0 and 255) and a transparency component t (Float64 between 0.0 and 1.0).

source

Here is an example of a sphere, with the attribute color set to the red color.

S = sphere(point(0.,1.,0.), 0.5, color=Color(255,0,0))

Color

Fields

Axl.DirFieldType.

Scalar field described by a vector dir. The field value at a point is obtained by taking the scalar product with the vector.

source

Here is an example of a cylinder, with a directional field for the direction [1,1,0].

C = cylinder(point(0.,0.,0.), point(0.,1.,0.), 0.5, field=DirField(1.,1.,0.))

DirField

Axl.DistFieldType.

Scalar field described by the point pt. The field value at a point is obtained by computing the distance to the point pt.

source
C = cone(point(0.,0.,0.), point(0.,1.,0.), 0.5, field=DistField(0.5,0.,0.))

DistField

A field can also be described by an array of values, attached for instance to the vertices of a mesh.

C = cube(point(0.,0.,0.), 0.5, field=[Float64(i) for i in 1:8])

DistField