Thank you for your helpful contribution.
Sorry I do not have a sketch but I will try and describe my target in a little more detail.
I feel you are pointing in the right direction for my purposes because the models do lend themselves to mathematical description. However when the model is fully described it needs to be converted into a reasonably fine mesh.
Toroidal object is, in their basic form can be described as a continuous circular tunnel - rather like a bagel (which is in reality not normally a circular but an elptical. The toroidal objects that I want to build are continuous solids or tunnels which maintain an open space around them! If you could get inside the “tunnel” there would be no way out. You can only go round and round within the continuous walls.
So the basic model is a tube following a path that loops back upon itself where the end joins back onto the beginning! In its most simple form the path of the toroid is defined by changes to its x & y axes whilst the z axis remains constant (e.g. a bagel). However for my purposes I also need to be able to change the z dimension. So the first step is to define a path (the toroidal path) in xyz dimensions and deduce a linear path index which can provide a reference for the second step.
In its most simple form “the tube” has the same diameter for its whole length and its outer shape is circular. However one may want the outer shape to take some other geometric form e.g. an ovoid (bagel like) when its outer shape is described by an eliptical path at an angle to the path of the toroid, or triangular where the outer shape might be described by three other paths each of which is defined by an angle and distance from the path of the toroid. However these dimensions will need to change along the toroidal path.
This leads me to the second step which is to be able to define the outer shape relative to the toroidal path and modify those dimensions by reference to a linear path index.
The third step would be to create a mesh and then manipulate that mesh to create additional features.
I then see the linear path index being used to control lighting and other tools.
At some stage I need to map photographic images to the surfaces.
I hope this explains what I want to achieve in a little more detail.