tft每日頭條

 > 生活

 > ug怎麼畫曲線公式

ug怎麼畫曲線公式

生活 更新时间:2024-09-27 06:00:49

在UG中利用【規律曲線】|【根據方程】繪制各種方程曲線:

1、極坐标(或柱坐标r,θ,z)與直角坐标系(x,y,z)的轉換關系:

x=r*cos(θ);y=r*sin(θ);z=z

2、球坐标系(r,θ,φ)與直角坐标系(x,y,z)的轉換關系:

x=rsinθcosφ;y=rsinθsinφ;z=rcosθ

在UG表達式中輸入的theta=θ;phi=φ;r=rho

【注:所有UG表達式中,必須先在名稱欄輸入t,公式欄輸入0,類型為恒定的,即無單位。t是UG自帶的系統變量,其取值為0~1之間的連續數】

1.直線

直線的數學方程為y-y0=tan(θ)*(x-x0),若直線經過點(10,20),傾角θ為30°,長度L為40,即UG表達式為:

theta=30

L=40

xt=10 L*cos(theta)*t

yt=20 L*sin(theta)*t

zt=0

效果如圖1

ug怎麼畫曲線公式(最全的UG方程曲線及詳細表達式)1

2.圓和圓弧

圓的數學方程為(x-x0)^2 (y-y0)^2=r^2,若圓心坐标為(50,40),半徑r為30,即UG表達式為:

r=30

theta=t*360

xt=50 r*cos(theta)

yt=40 r*sin(theta)

zt=0

效果如圖2

3.橢圓和橢圓弧

橢圓的數學方程為(x-x0)^2/a^2 (y-y0)^2/b^2=1,若橢圓中心坐标為(50,40),長半軸a為30(在X軸上),短半軸b為20,即UG表達式為:

a=30

b=20

theta=t*360

xt=50 a*cos(theta)

yt=40 b*sin(theta)

zt=0

效果如圖3

ug怎麼畫曲線公式(最全的UG方程曲線及詳細表達式)2

4.雙曲線 當你想學編程,找不到學習的方法?想是問題做才是答案,如果 你想學的話你可以私信作者回複“UG”免費獲取UG編程一套視頻資料。特意申請一個數控同行交流q群,免費解答難題,每天會更新資料,可自行下載,就是196217998 等待你的加入。

雙曲線的數學方程為x2/a2-y2/b2=1,若中心坐标為(0,0),實長半軸a為4(在x軸上),虛半軸b為3,y的取值範圍為-5~ 5内的一段,即UG表達式為:

a=4

b=3

yt=10*t-5

xt=a/b*sqrt(b^2 yt^2)或xt=-a/b*sqrt(b^2 yt^2)

zt=0

做出一半後進行鏡像複制,效果如圖4

5.抛物線

抛物線I的數學方程為y2=2px,若抛物線的頂點為(30,20)焦點到準線的距離p=8,y的取值範圍為-25~ 25,即UG表達式為:

p=8

yt=50*t-25 20

xt=(yt-20)^2/(2*p) 30

zt=0

效果如圖5-1

抛物線II數學參數方程:x=2pt2,y=2pt(其中t為參數)。UG表達式為:

p=8

tt=t*4-2

xt=2*p*tt^2

yt=2*p*tt

zt=0

效果如圖5-2

ug怎麼畫曲線公式(最全的UG方程曲線及詳細表達式)3

6.正弦曲線

若正弦曲線一個周期X方向長度為50,振幅為10,即UG表達式為:

theta=t*360

xt=50*t

yt=10*sin(theta)

zt=0

效果如圖6

7.餘弦曲線

若餘弦曲線一個周期X方向長度為50,振幅為10,即UG表達式為:

theta=t*360

xt=50*t

yt=10*cos(theta)

zt=0

效果如圖7

ug怎麼畫曲線公式(最全的UG方程曲線及詳細表達式)4

8.圓柱螺旋線

若圓柱螺旋線半徑r為20,螺距p為10,圈數n為5,即UG表達式為:

r=20

p=10

n=5

theta=t*360

xt=r*cos(theta*n)

yt=r*sin(theta*n)

zt=p*n*t或zt=cos(theta*n) p*n*t

效果如圖8

ug怎麼畫曲線公式(最全的UG方程曲線及詳細表達式)5

9.碟形彈簧

若碟形彈簧半徑r為20,螺距p為10,圈數n為5,即UG表達式為:

r=20

p=10

n=5

theta=t*360

xt=r*cos(theta*n)

yt=r*sin(theta*n)

zt=cos(theta*n^2) p*n*t或zt=cos(theta*n^2.4) p*n*t

效果如圖9

10.圓錐螺旋線和圓台螺旋線

若圓錐螺旋線底圓半徑r為20,螺距p為5,圈數n為10,即UG表達式為:

r=20*(1-t),若圓台上端半徑為5,則r=20*(1-t*0.75)

p=5

n=10

theta=t*360

xt=r*cos(theta*n)

yt=r*sin(theta*n)

zt=p*n*t

效果如圖10-1、10-2

ug怎麼畫曲線公式(最全的UG方程曲線及詳細表達式)6

11.三尖瓣線

三尖瓣線數學方程:x=r(2cosθ cos2θ);y=r(2sinθ-sin2θ)若将2變為n即擴展為n 1尖瓣線。若r=20,即UG表達式為:

r=20

n=2

theta=t*360

xt=r*(n*cos(theta) cos(n*theta))

yt=r*(n*sin(theta)-sin(n*theta))

zt=0

效果如圖11

ug怎麼畫曲線公式(最全的UG方程曲線及詳細表達式)7

12.星形線【四尖瓣線】

星形線的數學方程:x=r*cos3θ;y=r*sin3θ。【由n 1尖瓣線通式:x=r(n*cosθ cos(n*θ));y=r(n*sinθ-sin(n*θ))當n=3時的情況。三角函數公式:

sin3θ=3sinθ-4sin3θ;cos3θ=4cos3θ-3cosθ】若r=20,即UG表達式為:

r=20

theta=t*360

xt=r*(cos(theta))^3

yt=r*(sin(theta))^3

zt=0

效果如圖12

13.漸開線

漸開線的數學方程:x=r(cosθ θ*sinθ);y=r(sinθ-θ*cosθ)。假設漸開線的基圓半徑r為10,展開角度θ為360*2,即UG表達式為:

r=10

theta=360*2*t

s=r*rad(theta)=r*(2*pi()/360)*theta=2*pi()*r*t*2

xt=r*cos(theta) s*sin(theta)

yt=r*sin(theta)-s*cos(theta)

zt=0

效果如圖13

ug怎麼畫曲線公式(最全的UG方程曲線及詳細表達式)8

14.阿基米德螺線(等徑螺線)

阿基米德螺線(等徑螺線)數學方程:r=a*θ(極坐标),假設a=10,θ=360*2,即UG表達式為:

a=10

theta=t*360*2

r=a*theta

xt=r*cos(theta)

yt=r*sin(theta)

zt=0

效果如圖14

15.對數螺線(等角螺線)

對數螺線(等角螺線)數學方程:r=aemθ。對數螺線的定義和性質:運動方向始終與極徑保持定角λ的動點軌迹稱為對數螺線。假設a=0.005,即UG表達式為:

a=0.005

theta=t*360*2

r=exp(a*theta)

xt=r*cos(theta)

yt=r*sin(theta)

zt=0

效果如圖15

16.雙曲螺線

數學方程:r=a/θ。若a=10,即UG表達式為:

a=100

theta=t*360*2 1

r=a/theta

xt=r*cos(theta)

yt=r*sin(theta)

zt=0

效果如圖16

ug怎麼畫曲線公式(最全的UG方程曲線及詳細表達式)9

ug怎麼畫曲線公式(最全的UG方程曲線及詳細表達式)10

18.心髒線(腎形線)

心髒線數學方程:r=2a(1 cosθ);腎形線數學方程:r=a(1 2sin(θ/2))。

若a=10,θ=360°,即UG表達式為:

a=10

theta=360*t

r=2*a*(1 cos(theta))

【或r=a*(1 sin(theta))】

【或r=a*(1 2*sin(theta/2))】

xt=r*cos(theta)

yt=r*sin(theta)

zt=0

效果如圖18

19.雙弧外擺線

雙弧外擺線的數學方程:x=3b*cosθ a*cos3θ,y=3b*sinθ a*sin3θ。即UG表達式為:

a=10

b=10

theta=t*360

xt=3*b*cos(theta) a*cos(3* theta)

yt=3*b*sin(theta) a*sin(3* theta)

zt=0

效果如圖19

ug怎麼畫曲線公式(最全的UG方程曲線及詳細表達式)11

20.腎髒線

數學方程:x=a(3cost-cos3t);y=a(3sint-sin3t)

a=10

theta=360*t

xt=a*(3*cos(theta)-cos(3*theta))

yt=a*(3*sin(theta)-sin(3*theta))

zt=0

效果如圖20

21.Talbot曲線 【?x=(a2 f2 sin2t)cost/a,y=(a2 f2sin2t-2f2)sint/b】

Talbot曲線數學方程:x=(a2 f2sin2θ)cosθ/a,y=(a2 f2sin2θ-2f)sinθ/b。若a=1.1,b=0.666,θ=360°,f=1,即UG表達式為:

theta=360*t

a=1.1

b=0.666

c=sin(theta)

f=1

xt=(a^2 f^2*c^2)*cos(theta)/a

yt=(a^2-2*f f^2*c^2)*sin(theta)/b

zt=0

效果如圖21

ug怎麼畫曲線公式(最全的UG方程曲線及詳細表達式)12

,

更多精彩资讯请关注tft每日頭條,我们将持续为您更新最新资讯!

查看全部

相关生活资讯推荐

热门生活资讯推荐

网友关注

Copyright 2023-2024 - www.tftnews.com All Rights Reserved