How to create a simple circular arc?

Hello,

I put 3D objects (data nodes of a connected graph) on the surface of an imaginary sphere. This works well. I create Boxes and position them in space such that they sit on the surface of the sphere. Now I try to connect some of the Boxes with circular arcs sitting on the surface of the imaginary sphere. The connections represent the edges of the graph mentioned above.

I couldn’t figure out how to set the control points of a Curve such that the resulting spline is a circular arc (sector of a circle). Is there any simple way to create an arc between two points in space with a given central point?

example:
I have a Box at (1,0,0) as well as a Box at (0.866, 0.5, 0) and I would like to create an arc between the Boxes with the central point of the arc at (0, 0, 0). Thus, the radius of the circular arc is 1.

How can I do that? A solution forming the arc as a sector of a Ring or of a Torus would also be ok.

Any help is appreciated, thanks in advance,
Thomas

Math

Just create the vertices yourself using the formula for a sphere and create a custom mesh for them.

<cite>@zarch said:</cite> Math :)

Just create the vertices yourself using the formula for a sphere and create a custom mesh for them.

Thanks for the reply. Of course I could build it from line segments. Nonetheless, I am looking for something, that isn’t decomposed into line segments when zooming in (there sit several thousand boxes on the sphere). I was hoping there exists someting like

new Arc(new Vector3f(1, 0, 0), …)

or

myTorus.subtract(new Box(…))

Anyway, thanks for the help.
Thomas

Thats unavoidable - there is no such thing as a curve in this sort of graphics engine. All you can do is build one out of an appropriate number of sections and then use smooth shading techniques to make it look curved.

Does the curve need to be a 3D object ? Meaning do you need it to be viewable from all angles ?
If it is only viewed from certain angles you could just draw a curve and put it on a quad as a texture, scaling it so it has the correct start,end point and angle.
This will look fine from many angles, just looks strange from steep angles on the quad.