Drawing a cylinder from A to B


Re: Drawing a cylinder from A to B
#2
Hi Wolstan,

Define
RX=X2-X1
RY=Y2-Y1
RZ=Z2-Z1

R1=sqrt(RX*RX+RZ*RZ);
R3=sqrt(RX*RX+RY*RY+RZ*RZ)

V1X=-RZ/R1
V1Y=0
V1Z=RX/R1

V2X=RX*RY/R1/R3
V2Y=-R1/R3
V2Z=RY*RZ/R1/R3

V3X=RX
V3Y=RY
V3Z=RZ

Now you can define

1 16 X1 Y1 Z1 V1X V2X V3X V1Y V2Y V3Y V1Z V2Z V3Z cyli.dat

which should (I hope) work.

All the best,

Tim
Reply
« Next Oldest | Next Newest »



Messages In This Thread
Re: Drawing a cylinder from A to B - by Tim Gould - 2014-11-27, 22:13

Forum Jump:


Users browsing this thread: 1 Guest(s)