Creating replicas of structures

To create replicas of structures using SAMSON’s Python API, call their clone() function. You can then programatically edit these structures.

The example below shows how to start from a single nanotube to create a model of a nanotube “fabric” through a series of undoable steps.

Precisely, the scripts starts from a nanotube and performs the following steps:

  • replicate the nanotube in two directions to create a grid of nanotubes;
  • apply sine function to these nanotubes in the third direction to weave them with each other.

Visit the corresponding tutorial for the full explanation.

Press O to orbit.

Comments are closed.