A nanotube based device for guiding a beam of x-rays or neutrons, the device comprising: a beam source originating the beam, at least one self-assembling nanotube (10;20;30;90;94;100;110) having a central axial line along a length between two ends, an optical entrance at one of the two ends and an optical exit at the other one of the two ends, the at least one nanotube (10;20;30;90;94;100;110) positioned such that the optical entrance is oriented toward the beam source and the beam therefrom; the at least one nanotube (10;20;30;90;94;100;110) being configured to redirect the beam through external total reflection on inner surfaces of the at least one nanotube (10;20;30;90;94;100;110) and having a wall thickness that exceeds a defined radiation penetration depth of the beam of x-rays or neutrons at least in portions of the length; a zone in which the central axial line of the at least one nanotube (10;20;30;90;94;100;110) is positioned along a propagation direction of the incoming beam; and at least one zone along the nanotube length, the zone being one of: a zone (zone 4) in which the central axial line is straight and the at least one nanotube has an expanding internal diameter, wherein the at least one nanotube has a wall with a honeycomb pattern made of hexagons, wherein at least one heptagon is inserted around the circumference of the nanotube in the place of one of the hexagons of an otherwise cylindrical nanotube wall, leading to the conical expansion of the nanotube; and a zone (zone 2) of a plurality of nanotubes having an increasing tube wall thickness (T 1 -T 5) adjacent at least one of the two ends, wherein the plurality of nanotubes are multiwall nanotubes grown from a growth surface of a spherical growth plate normal to a respective ray direction of the beam of x-rays or neutrons with adjusted positions of subsequent outer layers (W 1 -W 5), wherein the wall thickness increases at a rate that compensates the increasing distances between the nanotubes as the nanotubes progress from the growth plate along radially extending central lines (x1, x2, x3), so that neighboring nanotubes touch each other in this zone (zone 2) with their outer layers (w i) at each added layer (w i) of wall thickness. a beam source originating the beam, at least one self-assembling nanotube (10;20;30;90;94;100;110) having a central axial line along a length between two ends, an optical entrance at one of the two ends and an optical exit at the other one of the two ends, the at least one nanotube (10;20;30;90;94;100;110) positioned such that the optical entrance is oriented toward the beam source and the beam therefrom; the at least one nanotube (10;20;30;90;94;100;110) being configured to redirect the beam through external total reflection on inner surfaces of the at least one nanotube (10;20;30;90;94;100;110) and having a wall thickness that exceeds a defined radiation penetration depth of the beam of x-rays or neutrons at least in portions of the length; a zone in which the central axial line of the at least one nanotube (10;20;30;90;94;100;110) is positioned along a propagation direction of the incoming beam; and at least one zone along the nanotube length, the zone being one of: a zone (zone 4) in which the central axial line is straight and the at least one nanotube has an expanding internal diameter, wherein the at least one nanotube has a wall with a honeycomb pattern made of hexagons, wherein at least one heptagon is inserted around the circumference of the nanotube in the place of one of the hexagons of an otherwise cylindrical nanotube wall, leading to the conical expansion of the nanotube; and a zone (zone 2) of a plurality of nanotubes having an increasing tube wall thickness (T 1 -T 5) adjacent at least one of the two ends, wherein the plurality of nanotubes are multiwall nanotubes grown from a growth surface of a spherical growth plate normal to a respective ray direction of the beam of x-rays or neutrons with adjusted positions of subsequent outer layers (W 1 -W 5), wherein the wall thickness increases at a rate that compensates the increasing distances between the nanotubes as the nanotubes progress from the growth plate along radially extending central lines (x1, x2, x3), so that neighboring nanotubes touch each other in this zone (zone 2) with their outer layers (w i) at each added layer (w i) of wall thickness. a zone (zone 4) in which the central axial line is straight and the at least one nanotube has an expanding internal diameter, wherein the at least one nanotube has a wall with a honeycomb pattern made of hexagons, wherein at least one heptagon is inserted around the circumference of the nanotube in the place of one of the hexagons of an otherwise cylindrical nanotube wall, leading to the conical expansion of the nanotube; and a zone (zone 2) of a plurality of nanotubes having an increasing tube wall thickness (T 1 -T 5) adjacent at least one of the two ends, wherein the plurality of nanotubes are multiwall nanotubes grown from a growth surface of a spherical growth plate normal to a respective ray direction of the beam of x-rays or neutrons with adjusted positions of subsequent outer layers (W 1 -W 5), wherein the wall thickness increases at a rate that compensates the increasing distances between the nanotubes as the nanotubes progress from the growth plate along radially extending central lines (x1, x2, x3), so that neighboring nanotubes touch each other in this zone (zone 2) with their outer layers (w i) at each added layer (w i) of wall thickness.