yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #30000
Re: [Question #707885]: Create arbitrary ellipsoid using level set
Question #707885 on Yade changed:
https://answers.launchpad.net/yade/+question/707885
Status: Open => Answered
Karol Brzezinski proposed the following answer:
Hi,
Quaternion is composed of axis direction (three components) followed by
angle of rotation:
###
lsb1 = levelSetBody(
'superellipsoid', center=(0, 0, 0), extents=(0.05, 0.05, 0.15), epsilons=(1.1, 0.2), spacing=0.01, nSurfNodes=2502, nodesPath=1, dynamic=False,
orientation=Quaternion((1, 0, 0), 0),
)
lsb2 = levelSetBody(
'superellipsoid', center=(0, 0, 0.25), extents=(0.05, 0.05, 0.15), epsilons=(1.1, 0.2), spacing=0.01, nSurfNodes=2502, nodesPath=1, dynamic=False,
orientation=Quaternion((1, 0, 0), pi/2),# rotated 90 degrees around x-axis
)
lsb3 = levelSetBody(
'superellipsoid', center=(0, 0, 0.5), extents=(0.05, 0.05, 0.15), epsilons=(1.1, 0.2), spacing=0.01, nSurfNodes=2502, nodesPath=1, dynamic=False,
orientation=Quaternion((0, 1, 0), pi/2),# rotated 90 degrees around y-axis
)
O.bodies.append([lsb1,lsb2,lsb3])
####
Cheers,
Karol
--
You received this question notification because your team yade-users is
an answer contact for Yade.