I'm trying to write a program that will take two sets of coordinates
in space A = [x1, y1, z1] and B = [x2, y2, z2] and then draw a
cylinder between the two of them.
I am having a surprisingly hard time of expressing this calculation in
Renderman.
For example, I made a sphere that is at [0, 0, 0] and another at [1,
1, 1].
If a horizontal line were drawn through the [0, 0, 0] sphere and a
vector drawn to [1, 1, 1] then the angle would be around 35 degrees,
while the angle between the line and the x-axis is 45 degrees.
I guess I'm not sure how to make Renderman render this configuration.
I've tried the following:
TransformBegin
Rotate -35 1 0 0
Rotate -45 0 1 0
Rotate 0 0 0 1
Translate 0 0 0
Cylinder 0.2 0 5 360
TransformEnd
Of course, this does not work. Any help would be greatly appreciated.
-Kazem