yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #26530
[Question #699279]: How to set two concentric circles with the same center and different radius?
New question #699279 on Yade:
https://answers.launchpad.net/yade/+question/699279
How to set two concentric circles with the same center and different radius? I want to use these two circles to simulate the shield tail gap.
My code is as follows:
circleRadius=2
circleCenter = Vector3(30,40,0.1)
for b in O.bodies:
d = (b.state.pos - circleCenter).norm() # distance of circleCenter and center of "b"
if d < circleRadius:
O.bodies.erase(b.id)
for a in O.bodies:
s = (a.state.pos - circleCenter).norm() # distance of circleCenter and center of "a"
if s = circleRadius:
O.bodies.append(a.id)
What's wrong with my code?
--
You received this question notification because your team yade-users is
an answer contact for Yade.