数学图形(2.14)Spherical helix曲线

http://mathworld.wolfram.com/SphericalHelix.html上找到如下一些关于该曲线的说明,不过似乎他的公式和我的脚本完全是两个东西..

The tangent indicatrix of a curve of constant precession is a spherical helix. The equation of a spherical helix on a sphere with radius r making an angle theta with the z-axis is

x(psi) = 1/2r(1+costheta)cospsi-1/2r(1-costheta)cos((1+costheta)/(1-costheta)psi)
(1)
y(psi) = 1/2r(1+costheta)sinpsi-1/2r(1-costheta)sin((1+costheta)/(1-costheta)psi)
(2)
z(psi) = rsinthetacos((costheta)/(1-costheta)psi).
(3)

The projection on the xy-plane is an epicycloid with radii

a = rcostheta
(4)
b = rsin^2(1/2theta).
(5)

 

 
#http://www.mathcurve.com/courbes3d/helicespheric/helicespheric.shtml

vertices = 12000

t = from 0 to (80*PI)

k = rand2(0.0, 1)

s = sin(t)
c = cos(t)

a = sin(k*t)
b = cos(k*t)

r = 10

x = r*(k*c*b - s*a)
z = r*(k*s*b + c*a)
y = r*sqrt(1 - k*k)*b

原文地址:https://www.cnblogs.com/WhyEngine/p/3840966.html