Monday, March 11, 2013

3D sample: The Borrromean Rings




In the collection of samples I used for tomography, there is the so-called "Borromean Rings" composed of three interleaved tori [Link].


The script is composed of two parts:
First, a unit sphere is created and stored in a small volume (function newSpĥere(...) in the script).
Second, each torus is created as a tubular shape − according to the formula described here [Link] − composed of many merged sphere probes translated along the torus path.

Two parameters can be modified:
  • The volume size (by default 128). I tried a size of 256 however, I couldn't render it in Volume Viewer.
  • The step parameter (by default 0.1) used to build one torus. See Fig.2 to look at the influence of this parameter.

+++ IJ JavaScript snippet: borromeanRings.js +++ +++ End of IJ JavaScript snippet: borromeanRings.js +++

Download the script above and open it as a JavaScript macro/script. The execution of this script allows the creation of a 128x128x128 stack with three interleaved tori (Fig. 1).

Fig.1: 128x128x128 8-bit volume rotated by RY=45° and RX=45° with the plugin TransformJ. The rendering was done with the plugin Volume Viewer 2.01.

By default, the step parameter is set to 0.1 allowing smooth torus surface. By modifying this step parameter to "0.3" for example, the probe used for the computation is, in this case, clearly visible (Fig. 2).

Fig.2: Rings obtained with a step parameter of 0.3 instead of 0.1 (Fig. 1).

Further reading

  • Learning Tomography Series  [Link]
  • 2D and 3D samples Series  [Link]
  • Image Processing TOC [Link]
  •  

No comments:

Post a Comment