| arrow_mesh | R Documentation | 
Arrow 3D Model
arrow_mesh(
  start = c(0, 0, 0),
  end = c(0, 1, 0),
  radius_top = 0.5,
  radius_tail = 0.25,
  tail_proportion = 0.5,
  direction = NA,
  from_center = TRUE,
  material = material_list()
)
| start | Default  | 
| end | Default  | 
| radius_top | Default  | 
| radius_tail | Default  | 
| tail_proportion | Default  | 
| direction | Default  | 
| from_center | Default  | 
| material | Default  | 
List describing the mesh.
if(run_documentation()) {
#Generate an arrow
generate_cornell_mesh() |>
  add_shape(arrow_mesh(start = c(555/2, 20, 555/2), end = c(555/2, 300, 555/2), radius_tail=50,
                       radius_top = 100,
                      material = material_list(diffuse="dodgerblue"))) |>
  rasterize_scene(light_info = directional_light(c(0.5,0.5,-1)))
}
if(run_documentation()) {
#Generate a blue arrow with a wide tail
generate_cornell_mesh() |>
  add_shape(arrow_mesh(start = c(555/2, 20, 555/2), end = c(555/2, 300, 555/2), radius_tail=100,
                       radius_top = 150,
                      material = material_list(diffuse="dodgerblue"))) |>
  rasterize_scene(light_info = directional_light(c(0.5,0.5,-1)))
  }
if(run_documentation()) {
#Generate a long, thin arrow and change the proportions
generate_cornell_mesh() |>
  add_shape(arrow_mesh(start = c(555/2, 20, 555/2), end = c(555/2, 400, 555/2), radius_top=30,
                       radius_tail = 10, tail_proportion = 0.8,
                      material = material_list(diffuse="dodgerblue"))) |>
  rasterize_scene(light_info = directional_light(c(0.5,0.5,-1)))
}
if(run_documentation()) {
#Change the start and end points
generate_cornell_mesh() |>
  add_shape(arrow_mesh(start = c(500, 20, 555/2), end = c(50, 500, 555/2), radius_top=30,
                       radius_tail = 10, tail_proportion = 0.8,
                      material = material_list(diffuse="dodgerblue"))) |>
  add_shape(arrow_mesh(start = c(500, 500, 500), end = c(50, 50, 50), radius_top=30,
                       radius_tail = 10, tail_proportion = 0.8,
                      material = material_list(diffuse="red"))) |>
  add_shape(arrow_mesh(start = c(555/2, 50, 500), end = c(555/2, 50, 50), radius_top=30,
                       radius_tail = 10, tail_proportion = 0.8,
                      material = material_list(diffuse="green"))) |>
  rasterize_scene(light_info = directional_light(c(0.5,0.5,-1)))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.