Commit 40eb6d94 authored by Ahmad Reza Cheraghi's avatar Ahmad Reza Cheraghi
Browse files

Upload New File

parent f72f2652
"""
A world is created that has particles formated in a ring structure that is up to 5 hops big
"""
def create_world(world):
# 1st ring
world.add_particle(1.000000, 0.000000, color=1)
world.add_particle(-1.000000, 0.000000, color=1)
world.add_particle(0.500000, 1.000000, color=1)
world.add_particle(0.500000, -1.000000, color=1)
world.add_particle(-0.500000, 1.000000, color=1)
world.add_particle(-0.500000, -1.000000, color=1)
# 2nd ring
world.add_particle(2.000000, 0.000000, color=2)
world.add_particle(-2.000000, 0.000000, color=2)
world.add_particle(1.500000, 1.000000, color=2)
world.add_particle(1.500000, -1.000000, color=2)
world.add_particle(-1.500000, 1.000000, color=2)
world.add_particle(-1.500000, -1.000000, color=2)
world.add_particle(1.000000, 2.000000, color=2)
world.add_particle(1.000000, -2.000000, color=2)
world.add_particle(0.000000, 2.000000, color=2)
world.add_particle(0.000000, -2.000000, color=2)
world.add_particle(-1.000000, 2.000000, color=2)
world.add_particle(-1.000000, -2.000000, color=2)
# 3rd ring
world.add_particle(3.000000, 0.000000, color=3)
world.add_particle(-3.000000, 0.000000, color=3)
world.add_particle(2.500000, 1.000000, color=3)
world.add_particle(2.500000, -1.000000, color=3)
world.add_particle(-2.500000, 1.000000, color=3)
world.add_particle(-2.500000, -1.000000, color=3)
world.add_particle(2.000000, 2.000000, color=3)
world.add_particle(2.000000, -2.000000, color=3)
world.add_particle(-2.000000, 2.000000, color=3)
world.add_particle(-2.000000, -2.000000, color=3)
world.add_particle(1.500000, 3.000000, color=3)
world.add_particle(1.500000, -3.000000, color=3)
world.add_particle(0.500000, 3.000000, color=3)
world.add_particle(0.500000, -3.000000, color=3)
world.add_particle(-0.500000, 3.000000, color=3)
world.add_particle(-0.500000, -3.000000, color=3)
world.add_particle(-1.500000, 3.000000, color=3)
world.add_particle(-1.500000, -3.000000, color=3)
world.add_tile(0, 0, color=3)
# 1st ring
world.add_tile(0, 10, color=3)
world.add_tile(1.000000, 10.000000, color=1)
world.add_tile(-1.000000, 10.000000, color=1)
world.add_tile(0.500000, 11.000000, color=1)
world.add_tile(-0.500000, 11.000000, color=1)
world.add_particle(4.00000, 10.000000, color=3)
world.add_particle(-4.00000, 10.000000, color=3)
world.add_particle(0, 9.000000, color=2)
world.add_particle(9.500000, 9.000000, color=2)
world.add_particle(8.500000, 9.000000, color=2)
world.add_particle(7.500000, 9.000000, color=2)
world.add_particle(6.500000, 9.000000, color=2)
world.add_particle(5.500000, 9.000000, color=2)
world.add_particle(4.500000, 9.000000, color=2)
world.add_particle(-0.500000, 9.000000, color=2)
world.add_particle(1.500000, 9.000000, color=2)
world.add_particle(-1.500000, 9.000000, color=2)
world.add_particle(2.500000, 9.000000, color=2)
world.add_particle(-2.500000, 9.000000, color=2)
world.add_particle(3.500000, 9.000000, color=2)
world.add_particle(-3.500000, 9.000000, color=2)
# 2nd ring
world.add_tile(2.000000, 10.000000, color=2)
world.add_tile(-2.000000, 10.000000, color=2)
world.add_tile(1.500000, 11.000000, color=2)
world.add_tile(-1.500000, 11.000000, color=2)
world.add_particle(3.500000, 11.000000, color=2)
world.add_particle(-3.500000, 11.000000, color=2)
world.add_particle(3.000000, 12.000000, color=2)
world.add_particle(-3.000000, 12.000000, color=2)
world.add_tile(-1.000000, 12.000000, color=2)
world.add_tile(1.000000, 12.000000, color=2)
world.add_tile(0.000000, 12.000000, color=2)
world.add_tile(-1.000000, 12.000000, color=2)
# 3rd ring
world.add_tile(3.000000, 10.000000, color=3)
world.add_tile(-3.000000, 10.000000, color=3)
world.add_tile(2.500000, 11.000000, color=3)
world.add_tile(-2.500000, 11.000000, color=3)
world.add_tile(2.000000, 12.000000, color=3)
world.add_tile(-2.000000, 12.000000, color=3)
world.add_tile(1.500000, 13.000000, color=3)
world.add_tile(0.500000, 13.000000, color=3)
world.add_tile(-0.500000, 13.000000, color=3)
world.add_tile(-1.500000, 13.000000, color=3)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment