利用傅里叶级数绘制纽结曲线

本文介绍了如何利用傅里叶级数参数化表示不同类型的纽结曲线,如平凡结、GrannyKnot、SquareKnot和Achterknot,并提供了对应的Matlab代码实现。
摘要由CSDN通过智能技术生成

傅里叶级数如下:

利用傅里叶级数可以得到多种纽结曲线的参数方程。

平凡结:(圆)

x(t) = cos(t)

y(t) = sin(t)

z(t) = 0

平凡结:(圆)

Matlab代码:

clc,clear,close all

t=linspace(0,2*pi,500);

x=cos(t);

y=sin(t);

z=0*t;

P=[x' y' z']*100;DrawMutiCylinder(P,40,10,40,10,linspace(0,1,500)'),set(gcf,'Color',[1 1 1]);axis off

Granny Knot

x(t) = - 22*cos(t) - 128*sin(t) - 44*cos(3*t) - 78*sin(3*t)

y(t) = - 10*cos(2*t) - 27*sin(2*t) + 38*cos(4*t) + 46*sin(4*t)

z(t) = 70*cos(3*t) - 40*sin(3*t)

Granny Knot

Matlab代码:

% Granny Knot

clc,clear,close all

t=linspace(0,2*pi,500);

x=- 22*cos(t) - 128*sin(t) - 44*cos(3*t) - 78*sin(3*t);

y=- 10*cos(2*t) - 27*sin(2*t) + 38*cos(4*t) + 46*sin(4*t);

z=70*cos(3*t) - 40*sin(3*t);

P=[x' y' z'];DrawMutiCylinder(P,40,10,40,10,linspace(0,1,500)'),set(gcf,'Color',[1 1 1]);axis off

Square Knot

x(t) = - 22*cos(t) - 128*sin(t) - 44*cos(3*t) - 78*sin(3*t)

y(t) = 11*cos(t) - 43*cos(3*t) + 34*cos(5*t) - 39*sin(5*t)

z(t) = 70*cos(3*t) - 40*sin(3*t) + 8*cos(5*t) - 9*sin(5*t)

Square Knot

Matlab代码:

% Square Knot

clc,clear,close all

t=linspace(0,2*pi,500);

x= - 22*cos(t) - 128*sin(t) - 44*cos(3*t) - 78*sin(3*t);

y= 11*cos(t) - 43*cos(3*t) + 34*cos(5*t) - 39*sin(5*t);

z= 70*cos(3*t) - 40*sin(3*t) + 8*cos(5*t) - 9*sin(5*t);

P=[x' y' z'];DrawMutiCylinder(P,40,10,40,10,linspace(0,1,500)'),set(gcf,'Color',[1 1 1]);axis off

Achter knot

x(t) = 10*cos(t) + 10*cos(3*t)

y(t) = 6*sin(t) + 10*sin(3*t)

z(t) = 4*sin(3*t) - 10*sin(6*t)

Achter knot

Matlab代码:

% Achter knot

clc,clear,close all

t=linspace(0,2*pi,500);

x= 10*cos(t) + 10*cos(3*t);

y= 6*sin(t) + 10*sin(3*t);

z= 4*sin(3*t) - 10*sin(6*t);

P=[x' y' z']*10;DrawMutiCylinder(P,40,10,40,10,linspace(0,1,500)'),set(gcf,'Color',[1 1 1]);axis off

  • 4
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

喜欢小黑屋的程序员

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值