))fnrotatessitap1p2=(_an_=(Patan2p2p1)+sita_r_=Lsp1p2_NX_=cos(_an_)*_r_+p2[1]_NY_=sin(_an_)*_r_+p2[2]return#(_NX_,_NY_))fnPatan2p1p2=atan2(p1[2]-p2[2])(p1[1]-p2[1])fnL3p1p2=((p2[3]-p1[3])*(p2[3]-p1[3])+(p2[2]-p1[2])*(p2[2]-p1[2])+(p2[1]-p1[1])*(p2[1]-p1[1]))forman=0to90by15do(s=splineShape()--createasplineshapesnum=1forian=0to360by20do(mm=tanman*cosianmn=tanman*sinianaddNewSplines--oitforjan=0to360by5do(yuanx=cos(jan)/sqrt(1+mm*mm+mn*mn)yuany=sin(jan)/sqrt(1+mm*mm+mn*mn)yuanz=yuanx*mm-yuany*mnyuant=yuany*mm+yuanx*mnp0=gl4_P#(yuanx,yuany,yuanz,yuant)addKnotssnum#smooth#curve[p0[1],p0[2],p0[3]])snum=snum+1)updateShapes--updatetheshape)参阅:1.《维度:数学漫步》(Dimensions:AWalkThroughMathematics)官方网站:/Dim_ZH_si.htm2.顶点数据来自:四维之美uwen/archive/2009/11/12/tesseract.html3.《维度:数学漫步》详细说明第七、八章:/Dim_CH7_ZH_si.htm