gimli-org / gimli

Geophysical Inversion and Modeling Library :earth_africa:
https://www.pygimli.org
Other
384 stars 137 forks source link

How to create a rotated ellipse? #775

Closed ZhenluRen closed 1 month ago

ZhenluRen commented 1 month ago

Dear Developer Team,

I am currently working on forward modeling, and I would like to know if it is possible to create a rotated ellipse using code 'mt.createCircle'? Thank you very much.

Best regards, Zhenlu Ren

halbmy commented 1 month ago

Of course, you can first create a unit the circle, scale it with the main axes and then rotate it

circle = mt.createCircle()
circle.scale([10, 5])
circle.rotate([0, 0, np.pi/6])
ZhenluRen commented 1 month ago

Of course, you can first create a unit the circle, scale it with the main axes and then rotate it

circle = mt.createCircle()
circle.scale([10, 5])
circle.rotate([0, 0, np.pi/6])

Dear Thomas,

Thank you very much. It works very well.

Best regards, Zhenlu