Please advise about connection of cylindrical objects

I made a cylinder as shown in the picture below.

test

Without transparency, it looks pretty, but what I want is transparency, and the connection point between the cylinders looks bad.

I’ve tried putting a sphere between them.
Likewise, it does not look good if there is transparency.

The source looks like this

            Vector3f cen = ArCalcUtils.calcCenterPoint(pt1, pt2);
            float dist = pt1.distance(pt2);
            float ang2d = ArCalcUtils.calcAngleXY(pt1, pt2);
            float ang3d = ArCalcUtils.calc3DAngleFrom2D(ang2d);

            Cylinder cylinder = new Cylinder(2, 10, style.r / 2, dist, false, false);
            Geometry geomC = new Geometry("Cylinder", cylinder);

            geomC.setMaterial(style.material);

            Quaternion qx = new Quaternion();
            qx.fromAngleAxis(FastMath.HALF_PI, Vector3f.UNIT_X);

            Quaternion qy = new Quaternion();
            qy.fromAngleAxis(ang3d, Vector3f.UNIT_Y); // 3차원

            geomC.setLocalRotation(qx.mult(qy));
            geomC.setLocalTranslation(cen);

            this.attachChild(geomC);

Is there a way I can try?

Generate custom meshes that don’t overlap.

Else there really isn’t anything you can do about it.

See: Alpha/Transparency Sorting, Your Z-buffer, and You