Module Geometry

Scenes

# VPL.Geom.SceneType.

Scene(graph, Float64)

Create a 3D scene from a Graph object (g). By default, double floating precision will be used (Float64) but it is possible to generate a version with a different precision by specifying the corresponding type as in Scene(g, Float32). The Scene object contains a mesh of triangles as well as colors and materials associated to each primitive.

source

Scene(scenes)

Merge multiple Scene objects into one.

source

# VPL.add!Function.

add!(scene; mesh, color = nothing, material = nothing)

Manually add a 3D mesh to an existing Scene object (scene) with optional colors and materials

source

# VPL.Geom.colorsMethod.

colors(scene::Scene)

Extract the vector of Colorant objects stored inside a scene (used for rendering)

source

# VPL.Geom.meshMethod.

mesh(scene::Scene)

Extract the triangular mesh stored inside a scene (used for ray tracing & rendering)

source

# VPL.Geom.materialsMethod.

materials(scene::Scene)

Extract the vector of Material objects stored inside a scene (used for ray tracing)

source

Turtle geometry

# VPL.Geom.TurtleMethod.

Turtle(Float64, message)

Create a meshing turtle that can convert a Graph into a 3D mesh using turtle operators, geometry primitives and methods of feed!(). By default, the meshing turtle will generate geometry primitives with double floating precision (Float64) but it is possible to generate a version with lower precision as in Turtle(Float32). The argument message is any user-defined object.

source

# VPL.Geom.headMethod.

head(turtle)

Extract the direction vector (a Vec object) of the head of the turtle.

source

# VPL.Geom.upMethod.

up(turtle)

Extract the direction vector (a Vec object) of the back of the turtle.

source

# VPL.Geom.armMethod.

arm(turtle)

Extract the direction vector (a Vec object) of the arm of the turtle.

source

# VPL.Geom.posMethod.

pos(turtle)

Extract the current position of the turtle (a Vec object).

source

# VPL.Geom.geomsMethod.

geoms(turtle)

Extract the 3D mesh generated by the turtle (a Mesh object).

source

# VPL.Geom.colorsMethod.

colors(turtle)

Extract the color objects associated to each geometry primitive that was fed to the turtle.

source

# VPL.Geom.facesMethod.

geoms(turtle)

Extract the faces of the 3D mesh generated by the turtle.

source

# VPL.Geom.materialsMethod.

materials(turtle)

Extract the material objects associated to each geometry primitive that was fed to the turtle.

source

# VPL.Geom.feed!Function.

feed!(turtle::Turtle; mesh::Mesh, color::Colorant = nothing, mat::Material = nothing)

General purpose method to feed a mesh to a turtle together with color and material. Note that all primitives provided by VPL are implemented as meshes, but this is a generic method for meshes that are constructed directly by the user or imported from external software.

source

feed!(turtle::Turtle, node::Node, vars = nothing)

Default method for feed!() that does not do anything. This allows the user to include nodes in a graph without an associated geometry.

source

feed!(turtle::Turtle, g::Graph)

Process a Graph object with a turtle and generate the corresponding 3D mesh from executing the different feed!() methods associated to the nodes in the graph.

source

feed!(turtle::Turtle, collection::AbstractArray)
feed!(turtle::Turtle, collection::Tuple)

Feed a turtle an array or tuple of objects (collection) with existing feed!() methods.

source

# VPL.Geom.TType.

T(to::Vec)

Node that translates a turtle to the new position to (a Vec object).

source

# VPL.Geom.t!Method.

t!(turtle; to = O())

Translate a turtle to the new position to (a Vec object).

source

# VPL.Geom.ORType.

OR(head::Vec, up::Vec, arm::Vec)

Node that orients a turtle to a new direction by re-defining the local reference system.

source

# VPL.Geom.or!Method.

or!(turtle; head = Z(), up = X(), arm = Y())

Orient a turtle to a new direction by re-defining the local reference system. The arguments head, up and arm should be of type Vec.

source

# VPL.Geom.SETType.

SET(to, head, up, arm)

Node that sets the position and orientation of a turtle.

source

# VPL.Geom.set!Method.

set!(turtle; to = O(), head = Z(), up = X(), arm = Y())

Set position and orientation of a turtle. The arguments to, head, up and arm should be of type Vec and be passed as keyword arguments.

source

# VPL.Geom.RUType.

RU(angle)

Node that rotates a turtle around up axis. Angle must be in hexadecimal degrees and the rotation is clockwise.

source

# VPL.Geom.ru!Method.

ru!(turtle, angle)

Rotates a turtle around up axis. Angle must be in hexadecimal degrees and the rotation is clockwise.

source

# VPL.Geom.RAType.

RA(angle)

Node that rotates a turtle around arm axis. Angle must be in hexadecimal degrees and the rotation is clockwise.

source

# VPL.Geom.ra!Method.

ra!(turtle, angle)

Rotates a turtle around arm axis. Angle must be in hexadecimal degrees and the rotation is clockwise.

source

# VPL.Geom.RHType.

RH(angle)

Node that rotates a turtle around head axis. Angle must be in hexadecimal degrees and the rotation is clockwise.

source

# VPL.Geom.rh!Method.

rh!(turtle, angle)

Rotate turtle around head axis. Angle must be in hexadecimal degrees and the rotation is clockwise.

source

# VPL.Geom.FType.

F(dist)

Moves a turtle forward a given distance.

source

# VPL.Geom.f!Method.

f!(turtle, dist)

Move turtle forward a given distance.

source

# VPL.Geom.RVType.

RV(strength)

Rotates the turtle towards the Z axis. See documentation for rv! for details.

source

# VPL.Geom.rv!Method.

rv!(turtle, strength)

Rotates the turtle towards the Z axis. The angle of rotation is proportional to the cosine of the zenith angle of the turtle (i.e., angle between its head and the vertical axis) with the absolute value of strength being the proportion between the two. strength should vary between -1 and 1. If strength is negative, the turtle rotates downwards (i.e., towards negative values of Z axis), otherwise upwards.

source

3D vectors

# VPL.Geom.VecType.

Vec(x, y, z)

3D vector or point with coordinates x, y and z.

source

# VPL.Geom.OMethod.

O()

Returns the origin of the 3D coordinate system as a Vec object. By default, the coordinates will be in double floating precision (Float64) but it is possible to generate a version with lower floating precision as in O(Float32).

source

# VPL.Geom.XMethod.

X()

Returns an unit vector in the direction of the X axis as a Vec object. By default, the coordinates will be in double floating precision (Float64) but it is possible to generate a version with lower floating precision as in X(Float32).

source

# VPL.Geom.YMethod.

Y()

Returns an unit vector in the direction of the Y axis as a Vec object. By default, the coordinates will be in double floating precision (Float64) but it is possible to generate a version with lower floating precision as in Y(Float32).

source

# VPL.Geom.ZMethod.

Z()

Returns an unit vector in the direction of the Z axis as a Vec object. By default, the coordinates will be in double floating precision (Float64) but it is possible to generate a version with lower floating precision as in Z(Float32).

source

# VPL.Geom.XMethod.

X(s)

Returns scaled vector in the direction of the X axis with length s as a Vec object using the same floating point precision as s.

source

# VPL.Geom.YMethod.

Y(s)

Returns scaled vector in the direction of the Y axis with length s as a Vec object using the same floating point precision as s.

source

# VPL.Geom.ZMethod.

Z(s)

Returns scaled vector in the direction of the Z axis with length s as a Vec object using the same floating point precision as s.

source

Geometry primitives

Triangle

# VPL.Geom.TriangleMethod.

Triangle(;length = 1.0, width = 1.0

Create a triangle with dimensions given by length and width, standard location and orientation.

source

# VPL.Geom.Triangle!Method.

Triangle!(turtle; length = 1.0, width = 1.0, move = false,
          material = nothing, color = nothing)

Generate a triangle in front of the turtle and feed it to a turtle.

Arguments

  • turtle: The turtle that we feed the triangle to.
  • length: Length of the triangle.
  • width: Width of the triangle.
  • move: Whether to move the turtle forward or not (true or false).
  • material: The material object for the ray tracer (optional).
  • color: The color of the ellipse for rendering (optional).

Details

A triangle mesh will be generated representing the triangle. The triangle will be generated in front of the turtle, on the plane defined by the arm and head axes of the turtle. The argument length refers to the axis of the triangle aligned with the head axis of the turtle, whereas width refers to the orthogonal axis.

When move = true, the turtle will be moved forward by a distance equal to length.

The material object must inherit from Material (see ray tracing documentation for detail) and the color can be any type that inherits from Colorant (from ColorTypes.jl).

Return

Returns nothing but modifies the turtle as a side effect.

source

Rectangle

# VPL.Geom.RectangleMethod.

Rectangle(;length = 1.0, width = 1.0)

Create a rectangle with dimensions given by length and width, standard location and orientation.

source

# VPL.Geom.Rectangle!Method.

Rectangle!(turtle; length = 1.0, width = 1.0, move = false,
           material = nothing, color = nothing)

Generate a rectangle in front of the turtle and feed it to a turtle.

Arguments

  • turtle: The turtle that we feed the rectangle to.
  • length: Length of the rectangle.
  • width: Width of the rectangle.
  • move: Whether to move the turtle forward or not (true or false).
  • material: The material object for the ray tracer (optional).
  • color: The color of the ellipse for rendering (optional).

Details

A triangle mesh will be generated representing the rectangle. The rectangle will be generated in front of the turtle, on the plane defined by the arm and head axes of the turtle. The argument length refers to the axis of the rectangle aligned with the head axis of the turtle, whereas width refers to the orthogonal axis.

When move = true, the turtle will be moved forward by a distance equal to length.

The material object must inherit from Material (see ray tracing documentation for detail) and the color can be any type that inherits from Colorant (from ColorTypes.jl).

Return

Returns nothing but modifies the turtle as a side effect.

source

Trapezoid

# VPL.Geom.TrapezoidMethod.

Trapezoid(;length = 1.0, width = 1.0, ratio = 1.0)

Create a trapezoid with dimensions given by length and the larger width and the ratio between the smaller and larger widths. The trapezoid is generted at the standard location and orientation.

source

# VPL.Geom.Trapezoid!Method.

Trapezoid!(turtle; length = 1.0, width = 1.0, ratio = 1.0, move = false,
material = nothing, color = nothing)

Generate a trapezoid in front of the turtle and feed it to a turtle.

Arguments

  • turtle: The turtle that we feed the trapezoid to.
  • length: Length of the trapezoid.
  • width: Width of the base of the trapezoid.
  • ratio: Ratio between the width of the top and base of the trapezoid.
  • move: Whether to move the turtle forward or not (true or false).
  • material: The material object for the ray tracer (optional).
  • color: The color of the ellipse for rendering (optional).

Details

A triangle mesh will be generated representing the trapezoid. The trapezoid will be generated in front of the turtle, on the plane defined by the arm and head axes of the turtle. The argument length refers to the axis of the trapezoid aligned with the head axis of the turtle, whereas width refers to the orthogonal axis.

When move = true, the turtle will be moved forward by a distance equal to length.

The material object must inherit from Material (see ray tracing documentation for detail) and the color can be any type that inherits from Colorant (from ColorTypes.jl).

Return

Returns nothing but modifies the turtle as a side effect.

source

Ellipse

# VPL.Geom.EllipseMethod.

Ellipse(;length = 1.0, width = 1.0, n = 20)

Create an ellipse with dimensions given by length and width, discretized into n triangles (must be even) and standard location and orientation.

source

# VPL.Geom.Ellipse!Method.

Ellipse!(turtle; length = 1.0, width = 1.0, n = 20, move = false,
         material = nothing, color = nothing)

Generate an ellipse in front of a turtle and feed it to a turtle.

Arguments

  • turtle: The turtle that we feed the ellipse to.
  • length: Length of the ellipse.
  • width: Width of the ellipse.
  • n: Number of triangles of the mesh approximating the ellipse (an integer).
  • move: Whether to move the turtle forward or not (true or false).
  • material: The material object for the ray tracer (optional).
  • color: The color of the ellipse for rendering (optional).

Details

A triangle mesh will be generated with n triangles that approximates an ellipse. The ellipse will be generated in front of the turtle, on the plane defined by the arm and head axes of the turtle. The argument length refers to the axis of the ellipse aligned with the head axis of the turtle, whereas width refers to the orthogonal axis.

When move = true, the turtle will be moved forward by a distance equal to length.

The material object must inherit from Material (see ray tracing documentation for detail) and the color can be any type that inherits from Colorant (from ColorTypes.jl).

Return

Returns nothing but modifies the turtle as a side effect.

source

Hollow cylinder

# VPL.Geom.HollowCylinderMethod.

HollowCylinder(;length = 1.0, width = 1.0, height = 1.0, n = 40)

Create a hollow cylinder with dimensions given by length, width and height, discretized into n triangles (must be even) and standard location and orientation.

source

# VPL.Geom.HollowCylinder!Method.

HollowCylinder!(turtle; length = 1.0, width = 1.0, height = 1.0, n = 40, move = false,
material = nothing, color = nothing)

Generate a hollow cylinder in front of the turtle and feed it to a turtle.

Arguments

  • turtle: The turtle that we feed the hollow cylinder to.
  • length: Length of the ellipse at the base of the hollow cylinder.
  • width: Width of the ellipse at the base of the hollow cylinder.
  • height: Height of the hollow cylinder.
  • n: Number of triangles in the mesh (must be even).
  • move: Whether to move the turtle forward or not (true or false).
  • material: The material object for the ray tracer (optional).
  • color: The color of the ellipse for rendering (optional).

Details

A mesh will be generated with n triangles that approximate the hollow cylinder. The cylinder will be generated in front of the turtle, with the base on the plane defined by the arm and up axes of the turtle, centered at the head axis. The length argument refers to the up axis, whereas width refers to the arm axis and height is associated to the head axis.

When move = true, the turtle will be moved forward by a distance equal to height.

The material object must inherit from Material (see ray tracing documentation for detail) and the color can be any type that inherits from Colorant (from ColorTypes.jl).

Return

Returns nothing but modifies the turtle as a side effect.

source

# VPL.Geom.SolidCylinderMethod.

SolidCylinder(;length = 1.0, width = 1.0, height = 1.0, n = 80)

Create a solid cylinder with dimensions given by length, width and height, discretized into n triangles (must be even) and standard location and orientation.

source

# VPL.Geom.SolidCylinder!Method.

SolidCylinder!(turtle; length = 1.0, width = 1.0, height = 1.0, n = 80, move = false,
material = nothing, color = nothing)

Generate a solid cylinder in front of the turtle and feed it to a turtle.

Arguments

  • turtle: The turtle that we feed the solid cylinder to.
  • length: Length of the ellipse at the base of the solid cylinder.
  • width: Width of the ellipse at the base of the solid cylinder.
  • height: Height of the solid cylinder.
  • n: Number of triangles in the mesh (must be even).
  • move: Whether to move the turtle forward or not (true or false).
  • material: The material object for the ray tracer (optional).
  • color: The color of the ellipse for rendering (optional).

Details

A mesh will be generated with n triangles that approximate the solid cylinder. The cylinder will be generated in front of the turtle, with the base on the plane defined by the arm and up axes of the turtle, centered at the head axis. The length argument refers to the up axis, whereas width refers to the arm axis and height is associated to the head axis.

When move = true, the turtle will be moved forward by a distance equal to height.

The material object must inherit from Material (see ray tracing documentation for detail) and the color can be any type that inherits from Colorant (from ColorTypes.jl).

Return

Returns nothing but modifies the turtle as a side effect.

source

Hollow cone

# VPL.Geom.HollowConeMethod.

HollowCone(;length = 1.0, width = 1.0, height = 1.0, n = 20)

Create a hollow cone with dimensions given by length, width and height, discretized into n triangles (must be even) and standard location and orientation.

source

# VPL.Geom.HollowCone!Method.

HollowCone!(turtle; length = 1.0, width = 1.0, height = 1.0, n = 20, move = false,
material = nothing, color = nothing)

Generate a hollow cone in front of the turtle and feed it to a turtle.

Arguments

  • turtle: The turtle that we feed the hollow cone to.
  • length: Length of the ellipse at the base of the hollow cone.
  • width: Width of the ellipse at the base of the hollow cone.
  • height: Height of the hollow cone.
  • n: Number of triangles in the mesh.
  • move: Whether to move the turtle forward or not (true or false).
  • material: The material object for the ray tracer (optional).
  • color: The color of the ellipse for rendering (optional).

Details

A mesh will be generated with n triangles that approximate the hollow cone. The cone will be generated in front of the turtle, with the base on the plane defined by the arm and up axes of the turtle, centered at the head axis. The length argument refers to the up axis, whereas width refers to the arm axis and height is associated to the head axis.

When move = true, the turtle will be moved forward by a distance equal to height.

The material object must inherit from Material (see ray tracing documentation for detail) and the color can be any type that inherits from Colorant (from ColorTypes.jl).

Return

Returns nothing but modifies the turtle as a side effect.

source

# VPL.Geom.SolidConeMethod.

SolidCone(;length = 1.0, width = 1.0, height = 1.0, n = 40)

Create a solid cone with dimensions given by length, width and height, discretized into n triangles (must be even) and standard location and orientation.

source

# VPL.Geom.SolidCone!Method.

SolidCone!(turtle; length = 1.0, width = 1.0, height = 1.0, n = 40, move = false,
material = nothing, color = nothing)

Generate a solid frustum in front of the turtle and feed it to a turtle.

Arguments

  • turtle: The turtle that we feed the solid cone to.
  • length: Length of the ellipse at the base of the solid cone.
  • width: Width of the ellipse at the base of the solid cone.
  • height: Height of the solid cone.
  • n: Number of triangles in the mesh (must be even).
  • move: Whether to move the turtle forward or not (true or false).
  • material: The material object for the ray tracer (optional).
  • color: The color of the ellipse for rendering (optional).

Details

A mesh will be generated with n triangles that approximate the solid cone. The cone will be generated in front of the turtle, with the base on the plane defined by the arm and up axes of the turtle, centered at the head axis. The length argument refers to the up axis, whereas width refers to the arm axis and height is associated to the head axis.

When move = true, the turtle will be moved forward by a distance equal to height.

The material object must inherit from Material (see ray tracing documentation for detail) and the color can be any type that inherits from Colorant (from ColorTypes.jl).

Return

Returns nothing but modifies the turtle as a side effect.

source

Cube

# VPL.Geom.SolidCubeMethod.

SolidCube(;length = 1.0, width = 1.0, height = 1.0)

Create a solid cube with dimensions given by length, width and height, standard location and orientation.

source

# VPL.Geom.SolidCube!Method.

SolidCube!(turtle; length = 1.0, width = 1.0, height = 1.0, move = false,
material = nothing, color = nothing)

Generate a solid cube in front of the turtle and feed it to a turtle.

Arguments

  • turtle: The turtle that we feed the solid cube to.
  • length: Length of the rectangle at the base of the solid cube.
  • width: Width of the rectangle at the base of the solid cube.
  • height: Height of the solid cube.
  • move: Whether to move the turtle forward or not (true or false).
  • material: The material object for the ray tracer (optional).
  • color: The color of the ellipse for rendering (optional).

Details

A mesh will be generated of a solid cube. The cube will be generated in front of the turtle, with the base on the plane defined by the arm and up axes of the turtle, centered at the head axis. The length argument refers to the up axis, whereas width refers to the arm axis and height is associated to the head axis.

When move = true, the turtle will be moved forward by a distance equal to height.

The material object must inherit from Material (see ray tracing documentation for detail) and the color can be any type that inherits from Colorant (from ColorTypes.jl).

Return

Returns nothing but modifies the turtle as a side effect.

source

# VPL.Geom.HollowCubeMethod.

HollowCube(;length = 1.0, width = 1.0, height = 1.0)

Create a hollow cube with dimensions given by length, width and `height, standard location and orientation.

source

# VPL.Geom.HollowCube!Method.

HollowCube!(turtle; length = 1.0, width = 1.0, height = 1.0, move = false,
material = nothing, color = nothing)

Generate a hollow cube in front of the turtle and feed it to a turtle.

Arguments

  • turtle: The turtle that we feed the hollow cube to.
  • length: Length of the rectangle at the base of the hollow cube.
  • width: Width of the rectangle at the base of the hollow cube.
  • height: Height of the hollow cube.
  • move: Whether to move the turtle forward or not (true or false).
  • material: The material object for the ray tracer (optional).
  • color: The color of the ellipse for rendering (optional).

Details

A mesh will be generated of a hollow cube. The cube will be generated in front of the turtle, with the base on the plane defined by the arm and up axes of the turtle, centered at the head axis. The length argument refers to the up axis, whereas width refers to the arm axis and height is associated to the head axis.

When move = true, the turtle will be moved forward by a distance equal to height.

The material object must inherit from Material (see ray tracing documentation for detail) and the color can be any type that inherits from Colorant (from ColorTypes.jl).

Return

Returns nothing but modifies the turtle as a side effect.

source

Solid frustum

# VPL.Geom.SolidFrustumMethod.

SolidFrustum(;length = 1.0, width = 1.0, height = 1.0, n = 40)

Create a solid frustum with dimensions given by length, width and height, discretized into n triangles and standard location and orientation.

source

# VPL.Geom.SolidFrustum!Method.

SolidFrustum!(turtle; length = 1.0, width = 1.0, height = 1.0, n = 80, move = false,
material = nothing, color = nothing)

Generate a solid frustum in front of the turtle and feed it to a turtle.

Arguments

  • turtle: The turtle that we feed the solid frustum to.
  • length: Length of the ellipse at the base of the solid frustum.
  • width: Width of the ellipse at the base of the solid frustum.
  • height: Height of the solid frustum.
  • n: Number of triangles in the mesh (must be even).
  • move: Whether to move the turtle forward or not (true or false).
  • material: The material object for the ray tracer (optional).
  • color: The color of the ellipse for rendering (optional).

Details

A mesh will be generated with n triangles that approximate the solid frustum. The frustum will be generated in front of the turtle, with the base on the plane defined by the arm and up axes of the turtle, centered at the head axis. The length argument refers to the up axis, whereas width refers to the arm axis and height is associated to the head axis.

When move = true, the turtle will be moved forward by a distance equal to height.

The material object must inherit from Material (see ray tracing documentation for detail) and the color can be any type that inherits from Colorant (from ColorTypes.jl).

Return

Returns nothing but modifies the turtle as a side effect.

source

# VPL.Geom.HollowFrustumMethod.

HollowFrustum(;length = 1.0, width = 1.0, height = 1.0, n = 40)

Create a hollow frustum with dimensions given by length, width and height, discretized into n triangles (must be even) and standard location and orientation.

source

# VPL.Geom.HollowFrustum!Method.

HollowFrustum!(turtle; length = 1.0, width = 1.0, height = 1.0, n = 40, move = false,
material = nothing, color = nothing)

Generate a hollow frustum in front of the turtle and feed it to a turtle.

Arguments

  • turtle: The turtle that we feed the hollow frustum to.
  • length: Length of the ellipse at the base of the hollow frustum.
  • width: Width of the ellipse at the base of the hollow frustum.
  • height: Height of the hollow frustum.
  • n: Number of triangles in the mesh (must be even).
  • move: Whether to move the turtle forward or not (true or false).
  • material: The material object for the ray tracer (optional).
  • color: The color of the ellipse for rendering (optional).

Details

A mesh will be generated with n triangles that approximate the hollow frustum. The frustum will be generated in front of the turtle, with the base on the plane defined by the arm and up axes of the turtle, centered at the head axis. The length argument refers to the up axis, whereas width refers to the arm axis and height is associated to the head axis.

When move = true, the turtle will be moved forward by a distance equal to height.

The material object must inherit from Material (see ray tracing documentation for detail) and the color can be any type that inherits from Colorant (from ColorTypes.jl).

Return

Returns nothing but modifies the turtle as a side effect.

source

Bounding box

# VPL.Geom.BBoxMethod.

BBox(m::Mesh)

Build a tight axis-aligned bounding box around a Mesh object.

source

# VPL.Geom.BBoxMethod.

BBox(pmin::Vec, pmax::Vec)

Build an axis-aligned bounding box given the vector of minimum (pmin) and maximum (pmax) coordinates.

source

Generic mesh

# VPL.Geom.Mesh!Method.

Mesh!(turtle, m::Mesh; scale = Vec(1.0, 1.0, 1.0), move = false,
material = nothing, color = nothing)

Feed a pre-existing mesh to a turtle after scaling.

Arguments

  • turtle: The turtle that we feed the mesh to.
  • m: The pre-existing unscaled mesh in standard position and orientation.
  • scale: Vector with scaling factors for the x, y and z axes.
  • move: Whether to move the turtle forward or not (true or false).
  • material: The material object for the ray tracer (optional).
  • color: The color of the ellipse for rendering (optional).

Details

A pre-existing mesh will be scaled (acccording to scale), rotate so that it is oriented in the same direction as the turtle and translated so that the mesh is generated in front of the turtle. A deep copy of the original mesh is made prior to any transformation.

When move = true, the turtle will be moved forward by a distance equal to height.

The material object must inherit from Material (see ray tracing documentation for detail) and the color can be any type that inherits from Colorant (from ColorTypes.jl).

Return

Returns nothing but modifies the turtle as a side effect.

source

Rotations, scaling and translations

# VPL.Geom.scale!Method.

scale!(m::Mesh, Vec)

Scale a mesh m along the three axes provided by vec

source

# VPL.Geom.rotatex!Method.

rotatex!(m::Mesh, θ)

Rotate a mesh m around the x axis by θ rad.

source

# VPL.Geom.rotatey!Method.

rotatey!(m::Mesh, θ)

Rotate a mesh m around the y axis by θ rad.

source

# VPL.Geom.rotatez!Method.

rotatez!(m::Mesh, θ)

Rotate a mesh m around the z axis by θ rad.

source

# VPL.Geom.rotate!Method.

rotate!(m::Mesh; x::Vec, y::Vec, z::Vec)

Rotate a mesh m to a new coordinate system given by x, y and z

source

# VPL.Geom.translate!Method.

translate!(m::Mesh, v::Vec)

Translate the mesh m by vector v

source