*On 15/09/2017 at 11:39, xxxxxxxx wrote:*

Hi,

this is my first post in this forum and it is a help request, I hope that is fine...

I am trying to programatically (python) create a 3D composition (multiple objects) based on a data file containing a list of positions for individual objects (small spheres) and a list of connections between these objects. All the objects are distributed on top of a big sphere's surface (meaning they are all equidistant to the big sphere's center).

To pose the question simpler, please consider only two of these points (blue balls) and one connection (yellow curve), like this:

We can think about it as having two places (the blue balls) on the earth surface and I want to draw the shortest path to get from one to the other (the yellow curve).

I've been able to create the blue balls pretty easily just by instantiating oSphere's and moving them like to the right place (my input data is already 3D coordinates in the cartesian space) :

op = c4d.BaseObject(c4d.Osphere)

op.SetAbsPos( c4d.Vector( item["x"]*scaleFactor, item["y"]*scaleFactor, item["z"]*scaleFactor ) )

However I am having a hard time creating the connections between the small spheres.

I have considered two strategies:

- Create splines programatically and then, afterwards, give them volume by applying a sweep object with a circle bevel (I've already been able to do this but only with straight lines going through inside of the big sphere)
- Create a torus segment of the desired length and rotate it to make its end match the blue balls positions

Either case, I have no clue on how to do any of this, since my math knowledge is rather poor and I've started using C4D (and its python API) just a week ago.

One more thing to consider is that I will have quite a lot of these connections (2k-10k).

So, could anyone provide some guidance on how to deal with this problem?

Many thanks in advance!