精華區beta MATLAB 關於我們 聯絡資訊
: ※ 引述《smallorlando (習慣每件事)》之銘言: : : 平面螺旋線怎樣畫 : : 參數如何定義阿 : R = linspace( 0 , 100 , 1000 ) ; : theta = linspace( 0 , 10*pi , 1000 ) ; : x = R .* cos( theta ) ; : y = R .* sin( theta ) ; : plot( x , y ) : axis equal : 是想要這樣畫嗎? : 使用圓的參數式 : 讓半徑也跟著變大 : 同時角度多轉個幾圈就是了 : 推 smallorlando:R不用變大...可是我要沿著X或Y方向前進 04/27 22:20 原來是要畫擺線啊 這樣子也很好解決 要沿著x前進就在x方向處再加一個變大的參數就可以了 t = linspace( 0 , 100 , 1000 ) ; theta = linspace( 0 , 10*pi , 1000 ) ; R = 10 ; x = t + R * cos( theta ) ; y = R * sin( theta ) ; plot( x , y ) axis equal 至於起始點的位置以及斜率就看你自己再調整參屬就可以了 -- Deserves death! I daresay he does. Many that live deserve death. And some die that deserve life. Can you give that to them? Then be not too eager to deal out death in the name of justice, fearing for your own safty. Even the wise cannot see all ends. Gandalf to Frodo -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 125.233.246.36
smallorlando: 謝謝啦..真是太感謝了 04/27 22:38