Please I want to draw a 3D graph using JavaFX 8 (3D). I already know some basics of 3D like draw sphere, firstly coloring the sphere and add shadow, then some light and initialisation of the sphere. My problem is I want to join the spheres by using a cylinder, but if there are for example 2 cylinders between two spheres it must be an arc or curved cylinder (I don't know if this is possible). I already tried that but nothing appears, even if something appears it's just a cylinder (not like a line just small).

Another problem, I want to know how the rotation can help in such a situation.

And last question, is it possible to make a scrollbar or just using event of Zoom? Thanks.

![](https://i.stack.imgur.com/7wcxt.png)

the picture taken from : [Here](https://stackoverflow.com/questions/16975412/3d-rotations-to-connect-balls-and-cylinders)

This is my code: 

```
import java.util.ArrayList;
import java.util.Random;
import javafx.application.Application;
import javafx.scene.Group;
import javafx.scene.PerspectiveCamera;
import javafx.scene.PointLight;
import javafx.scene.Scene;
import javafx.scene.paint.Color;
import javafx.scene.paint.PhongMaterial;
import javafx.scene.shape.CullFace;
import javafx.scene.shape.DrawMode;
import javafx.scene.shape.Sphere;
import javafx.stage.Stage;

public class Graphe3D extends Application {
    Group root;
    PhongMaterial material;
    ArrayList<Sphere> sphere;
    @Override
    public void start(Stage primaryStage) {
        sphere=new ArrayList<>();
        root=new Group();
        material= new PhongMaterial();
        for(int i=0;i<3;i++){
            sphere.add(new Sphere(50));
        //Sphere Color
        material.setDiffuseColor(Color.RED);
        //Shadow Color
        material.setSpecularColor(Color.rgb(30, 30, 30));
        //Init Sphere
        sphere.get(i).setMaterial(material); 
        sphere.get(i).setTranslateX(new Random().nextInt(600));//set location X,Y and Z
        sphere.get(i).setTranslateY(new Random().nextInt(600));
        sphere.get(i).setTranslateZ(50); // ? 
        sphere.get(i).setDrawMode(DrawMode.FILL);
        sphere.get(i).setCullFace(CullFace.BACK);// ?
        //Create Light
        PointLight pointLight = new PointLight(Color.ANTIQUEWHITE);
        pointLight.setTranslateX(800);
        pointLight.setTranslateY(-100);
        pointLight.setTranslateZ(-1000); 
        root.getChildren().add(pointLight); //ajout de lumiere
        root.getChildren().add(sphere.get(i)); //ajout des spheres au scene(root)
        }
        //Display
         Scene scene = new Scene(root);
        scene.setFill(Color.rgb(10, 10, 40));
        scene.setCamera(new PerspectiveCamera(false));
        primaryStage.setScene(scene);
        primaryStage.show();

    }

    public static void main(String[] args) {
        launch(args);
    }

}

```