Skip to content
View Robertshivam's full-sized avatar

Block or report Robertshivam

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Maximum 250 characters. Please don't include any personal information such as legal names or email addresses. Markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
Robertshivam/README.md

import pygame import math # Initialize Pygame pygame.init() # Set up display width, height = 800, 600 screen = pygame.display.set_mode((width, height)) pygame.display.set_caption("Live Atom Structure Model") # Colors background_color = (255, 255, 255) electron_color = (0, 0, 255) nucleus_color = (255, 0, 0) # Atomic structure parameters nucleus_radius = 20 electron_radius = 5 orbit_radius = 100 num_electrons = 8 # Calculate electron positions electron_positions = [] for i in range(num_electrons): angle = 2 * math.pi * i / num_electrons x = width // 2 + orbit_radius * math.cos(angle) y = height // 2 + orbit_radius * math.sin(angle) electron_positions.append((x, y)) # Main loop running = True while running: for event in pygame.event.get(): if event.type == pygame.QUIT: running = False # Clear the screen screen.fill(background_color) # Draw nucleus pygame.draw.circle(screen, nucleus_color, (width // 2, height // 2), nucleus_radius) # Draw electrons for pos in electron_positions: pygame.draw.circle(screen, electron_color, pos, electron_radius) pygame.display.flip() # Quit Pygame pygame.quit()- 👋 Hi, I’m @Robertshivam

  • 👀 I’m interested in ...
  • 🌱 I’m currently learning ...
  • 💞️ I’m looking to collaborate on ...
  • 📫 How to reach me ...

Popular repositories Loading

  1. Robertshivam Robertshivam Public

    Config files for my GitHub profile.

  2. packaging.python.org packaging.python.org Public

    Forked from pypa/packaging.python.org

    Python Packaging User Guide

    Python