Skip to content

Terminal CPPlotter is a C++ program that creates a Cartesian coordinate system on the terminal and enables point and line plotting.

License

Notifications You must be signed in to change notification settings

saiyam-sandhir/Terminal-CPPlotter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Terminal CPPlotter

Project Description

The Terminal CPPlotter is a C++ program that creates a Cartesian coordinate system on the terminal, allowing users to plot both points and lines. The project is authored by Saiyam Jain and is distributed under the MIT License.

Preview

Screenshot 2023-11-04 084631

Screenshot 2023-11-04 084452

Screenshot 2023-11-04 084543

Screenshot 2023-11-09 092654

Screenshot 2023-11-09 092754

Features

1. Point Class
- The Point class represents a point in a Cartesian coordinate system with x and y coordinates. - It provides constructors to initialize points with default or specified coordinates. - The | operator overloading allows you to calculate the Euclidean distance between two points. - The ^ operator overloading calculates the midpoint between two points and returns a new Point.
2. Line Class
- The 'Line' class, enables users to define and work with lines in the Cartesian plane. - Constructors allow the creation of lines using two points. - The 'check_for_point' method determines if a given point lies on the line.
3. CartesianPlane Class
- The CartasianPlane class creates a Cartesian plane with user-defined dimensions in the terminal. - It includes a constructor that allows you to set the length of the x and y axes. - The plot function in this class can plot points on the Cartesian plane. - It can plot the Cartesian axes, points, and custom symbols for the origin, positive and negative x and y axes. - The overloaded plot function takes a Point object as input and plots it on the plane.

Usage

- Compile the code using a C++ compiler.
- Execute the compiled program.
- Create 'Point' and 'Line' objects with desired coordinates. - Uitlize the 'plot' functions to visualize points and lines on the cartesian plane.

License

This project is licensed under the MIT License, granting you the freedom to use, modify, and distribute the code as per the MIT License terms.

For more details on the MIT License, please refer to the provided LICENSE file or visit the MIT License website.

About

Terminal CPPlotter is a C++ program that creates a Cartesian coordinate system on the terminal and enables point and line plotting.

Topics

Resources

License

Stars

Watchers

Forks

Languages