Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commite8beb5604c

README.md

mesh.cone

A cone with its apex along +Y, centred on the origin: 32 segments round, smooth slanted normals and a flat base. Use it for spikes, roofs and markers.

The base sits at y = -height / 2 and the apex at +height / 2. The side holds 32 triangles meeting at the apex and the base a fan of 32 triangles, 64 in all. uv runs 0 to 1 round the side and from apex to base; on the base it is the disc mapped onto the unit square.

Inputs

  • radius (Float, default 0.5, at least 0). The radius of its base, in metres.
  • height (Float, default 1, at least 0). From the base to the apex along Y, in metres.

Outputs

  • geometry (Geometry). Triangles with P, N and uv on their points; primitives carry vstart and vcount.
local spike = g.mesh.cone({ radius = 0.2, height = 1 })