Learn R Programming

textures (version 0.1.0)

break_mesh: Break mesh, expand vertex instances

Description

Break the topology of a mesh by expanding all vertices.

Usage

break_mesh(x)

Value

mesh3d

Arguments

x

mesh3d, from e.g. quad()

Details

Data in a mesh and in rgl is inherently topological, but we can have primitives that independent, out of an original mesh. Expanding every vertex makes primitives geometrically independent, so attributes (colours, texture coordinates) can be constant per face rather than interpolated between shared vertices - the discrete rendering of a continuous mesh, at the cost of four times the vertices. This is the dquadmesh idea from quadmesh package.

See Also

Other textures: quad(), quad_spec()

Examples

Run this code
(mesh <- quad(c(3, 3)))
## same number of primitives, more vertices (every coordinate)
break_mesh(mesh)

Run the code above in your browser using DataLab