Advertisement

07.17.2008 at 05:28AM PDT, ID: 23572898
[x]
Attachment Details

VRML rotations : how to draw a cylinder between 2 spheres

Asked by romarin12 in 3D Game Programming, Math & Science Questions, 3D Graphics Software

Dear All,

I am looking for math formulae (or Java code) that could help me draw a cylinder between 2 spheres.

I am using Java to create a WRL file. The world is composed of several spheres (known x,y,z locations). I would like to draw cylinders between spheres, but I am struggling with the VRML rotation function.

So I would need a function that returns:
   translation Ax Ay Az
   rotation Bx By Bz Th
given 2 locations (x1,y1,z1) (x2,y2,z2)

Thanks,

Olivier

===========================

#VRML V2.0 utf8

Group {
  children [
      Transform {
         translation 1 2 3
         children Shape {
            appearance DEF xapp Appearance {
               material Material { }
            }
            geometry Sphere { radius 0.2 }
         }
      }
      Transform {
         translation 3 2 1
         children Shape {
            appearance USE xapp
            geometry Sphere { radius 0.2 }
         }
      }
      Transform {
         translation 1 2 3
         rotation 1 0 0 1.57
         children Shape {
            appearance USE xapp
            geometry Cylinder {
               radius 0.1
               height 4
            }
         }
      }

  ]
}


Start Free Trial
[+][-]07.17.2008 at 07:02AM PDT, ID: 22025534

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: 3D Game Programming, Math & Science Questions, 3D Graphics Software
Sign Up Now!
Solution Provided By: jgordos
Participating Experts: 1
Solution Grade: A
 
 
[+][-]07.17.2008 at 07:12AM PDT, ID: 22025649

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.17.2008 at 11:00AM PDT, ID: 22028151

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.17.2008 at 01:29PM PDT, ID: 22029912

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.24.2008 at 05:52AM PDT, ID: 22078518

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.24.2008 at 10:22AM PDT, ID: 22081429

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.24.2008 at 04:29PM PDT, ID: 22084661

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]07.26.2008 at 05:27AM PDT, ID: 22094822

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]07.28.2008 at 06:13AM PDT, ID: 22102747

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.28.2008 at 06:36AM PDT, ID: 22102941

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]07.28.2008 at 08:24AM PDT, ID: 22104050

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.28.2008 at 08:55AM PDT, ID: 22104295

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]07.28.2008 at 09:20AM PDT, ID: 22104513

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.28.2008 at 10:54AM PDT, ID: 22105287

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]07.29.2008 at 02:47AM PDT, ID: 22109836

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628