svg 和 JavaScript
我是 javascript 的新手,我想实现一个滑轮,在其中我需要使用 SVG 绘制一个圆,并在该圆上附有 2 根绳子,接触其直径处的圆周。另外,我想在末尾显示连接到这些字符串的 2 个矩形块,它们将具有 2 个权重 w1 和 w2。将 w1 和 w2 作为用户的输入,我需要将绳子上的张力计算为 T1 = w1*g。另外,如果w1 > w2 块将随着字符串向下移动。如何使用 SVG 和 Javascript 来实现它?
I am new to javascript and I want to implement a pulley in which I need to draw a circle using SVG to which 2 strings are attached touching to its circumference at diameter. Also I want to show 2 rectangular blocks attached to these strings at the end which will have 2 weights w1 an w2. Taking w1 and w2 as inputs from the user, I need to calculate the tension on the string as T1 = w1*g. Also if w1 > w2 block will move downwards along with the string. How can I implement it using SVG and Javascript?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看看我引用的 Raphael JS :
Take a look at Raphael JS which I quote: