Algorithm 如何假定螺旋参数?
有人能帮我理解什么样的准物质会有这样的螺旋吗 我不理解这个参数:旋转-螺旋的整体旋转。('0'=无旋转,'1'=360度,'180/360'=180度)如果有人编写一些参数集(边、线圈、旋转)以获得螺旋,我将不胜感激 这是Matlab中的代码:Algorithm 如何假定螺旋参数?,algorithm,spiral,Algorithm,Spiral,有人能帮我理解什么样的准物质会有这样的螺旋吗 我不理解这个参数:旋转-螺旋的整体旋转。('0'=无旋转,'1'=360度,'180/360'=180度)如果有人编写一些参数集(边、线圈、旋转)以获得螺旋,我将不胜感激 这是Matlab中的代码: clc clear all centerX = 0 centerY = 0 radius = 10 coils = 30 rotation = 360 chord = 2 delta = 1 thetaMax = coils * 2 * pi
clc
clear all
centerX = 0
centerY = 0
radius = 10
coils = 30
rotation = 360
chord = 2
delta = 1
thetaMax = coils * 2 * pi;
awayStep = radius / thetaMax;
i = 1
for theta = (chord / awayStep):thetaMax;
away = awayStep * theta;
around = theta + rotation;
x(i) = centerX + cos ( around ) * away;
y(i) = centerY + sin ( around ) * away;
i = i + 1
theta = theta + (chord / away);
theta2 = theta + delta
away2 = away + awayStep * delta
delta = 2 * chord / ( away + away2 )
delta = 2 * chord / ( 2*away + awayStep * delta )
2*(away + awayStep * delta ) * delta == 2 * chord
awayStep * delta * 2 + 2*away * delta - 2 * chord == 0
a= awayStep; b = 2*away; c = -2*chord
delta = ( -2 * away + sqrt ( 4 * away * away + 8 * awayStep * chord ) ) / ( 2 * awayStep );
theta = theta + delta;
end
v = [0 x]
w = [0 y]
scatter(v,w)
提前谢谢你你有没有试过玩被接受的答案链接到的小提琴?我在Matlab中尝试了这个链接的算法,但我没有得到真正的答案