Skip to content

Instantly share code, notes, and snippets.

@ahmedazizkhelifi
Last active August 19, 2020 00:59
Show Gist options
  • Save ahmedazizkhelifi/98f4deb5338a9c4b9742c07fcc32ef67 to your computer and use it in GitHub Desktop.
Save ahmedazizkhelifi/98f4deb5338a9c4b9742c07fcc32ef67 to your computer and use it in GitHub Desktop.
star = vp.sphere(pos=vp.vector(0,0,0), radius=0.2, color=vp.color.yellow,
mass = 1000, momentum=vp.vector(0,0,0), make_trail=True)
planet1 = vp.sphere(pos=vp.vector(1,0,0), radius=0.05, color=vp.color.green,
mass = 1, momentum=vp.vector(0,30,0), make_trail=True)
planet2 = vp.sphere(pos=vp.vector(0,3,0), radius=0.075, color=vp.vector(0.0,0.82,0.33),#RGB color
mass = 2, momentum=vp.vector(-35,0,0), make_trail=True)
planet3 = vp.sphere(pos=vp.vector(0,-4,0), radius=0.1, color=vp.vector(0.58,0.153,0.68),
mass = 10, momentum=vp.vector(160,0,0), make_trail=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment