|
![](/i/fill.gif) |
I have a problem which I need to solve to draw molecules with balls and
wooden sticks.
Each bond is defined as a cylinder whose endpoints are <x1,y1,z1> and
<x2,y2,z2>. Let's say it is of length r, which can be easily calculated,
as can phi and theta in polar space. If I want to apply a wooden texture
to all such bonds in a molecule, I need to orient the texture so that
the wood grain is parallel to the bond.
I think I should make this cylinder, since the grain of the texture is
in the X direction (or the appropriate version for whatever axis the
grain goes in, I don't have the datum in front of me):
cylinder{
<0,0,0>,<r,0,0>, whatever_radius
texture{A_Wood_Texture}
}
How should I get it to the right place and in the right orientation?
--
Heinz Hemken
San Diego, California
Post a reply to this message
|
![](/i/fill.gif) |