Skip to content

naghamsu/simulator

 
 

Repository files navigation

Add Camera System

A flexible camera system for a 2D renderer architecture built with Python and Matplotlib.


students: Nagham Sleman 476937 Salam Ali 503263

Features

  • Top view projection
  • Left view projection
  • Smooth camera following
  • Camera zoom in/out
  • Camera panning
  • World-to-screen transformation
  • Screen-to-world transformation
  • Dynamic grid rendering
  • Modular renderer architecture

Controls

Key Action
Mouse Wheel Zoom in/out
Arrow Keys Pan camera
F Toggle camera follow
V Switch camera view

Project Structure

camera-system/
│
├── camera.py
├── renderer.py
├── robot.py
├── world.py
│
├── docs/
│   ├── ticket20.jpg
│   └── ticket20.gif
│
├── main.py
├── README.md
└── requirements.txt

Architecture Diagram

Ticket 20

Demo GIF

Ticket 20 GIF

Coordinate Systems

World Space

3D coordinates inside the simulation world.

Example:

(100, 50, 20)

Screen Space

2D coordinates rendered on the screen.

Example:

(500, 300)

Projection Modes

Top View

Projects:

(X, Y)

The Z-axis is hidden.

Left View

Projects:

(X, Z)

The Y-axis is hidden.


Camera Features

  • Object following
  • Smooth movement
  • Zoom scaling
  • Coordinate transformations
  • Camera panning
  • Dynamic grid rendering
  • View switching

Installation

pip install -r requirements.txt

Run

python main.py

Requirements

  • Python 3.10+
  • NumPy
  • Matplotlib

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 100.0%