计算化学公社

标题: How to draw a cone correctly to form an arrow in VMD ? [打印本页]

作者
Author:
vitalys    时间: 2023-9-14 01:18
标题: How to draw a cone correctly to form an arrow in VMD ?
If you please, i would like to know if there is a rule to draw a cone along with a cylinder to draw an arrow, because i draw the cylinder and the cone easily using the following commands: draw cylinder {xyz} {x'
y ' z'} <radius> value resolution <value>
draw cone {xyz} {x' y' z'} <radius> value resolution <value>
But i always get a distorted arrow (please see attached image). The cylinder is fine to draw, but i failed to draw the cone directly Adhesive to cylinder.

(, 下载次数 Times of downloads: 10)








作者
Author:
sobereva    时间: 2023-9-14 02:51
This is my script defining "drawarrow" command, you can consult its content

(, 下载次数 Times of downloads: 2)

This command is used by an example of Multiwfn program manual to draw dipole moment vector of two molecules and the whole system:

(, 下载次数 Times of downloads: 14)

作者
Author:
vitalys    时间: 2023-9-14 20:07
sobereva 发表于 2023-9-14 02:51
This is my script defining "drawarrow" command, you can consult its content

Thank you very much, but what i don't understand is how to determine the coordinates (endx2 endy2 endz2) ? I know that (endx1 endy1 endz1) are the same for the cylinder and the cone.

(, 下载次数 Times of downloads: 9)



作者
Author:
sobereva    时间: 2023-9-14 20:36
vitalys 发表于 2023-9-14 20:07
Thank you very much, but what i don't understand is how to determine the coordinates (endx2 endy2  ...

Assume that unit vector of the cylinder is u and the cylinder has length of k, and the beginning point of the cone is a, then the ending point of the cone should be a+0.1*k*u




欢迎光临 计算化学公社 (http://bbs.keinsci.com/) Powered by Discuz! X3.3