GithubHelp home page GithubHelp logo

peternielsen112 / mathematical-transformations Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 22 KB

A python repository containing math scripts.

License: GNU General Public License v3.0

Python 100.00%

mathematical-transformations's Introduction

Mathematical Transformations in Python

Github All Releases GitHub release GitHub Release Date GitHub license GitHub stars

Contents


Overview

This repository contains four programs: dilations.py, reflections.py, rotations-singlepoint.py, and translations-singlepoint.py. Each one is meant to reproduce a form of transformation within algebraic geometry. Two of the programs enable transformations applying to a three-point shape - a triangle - and the other two enable transformations applying to a single point. None of these programs show a coordinate plane. I am currently working on turning these functions into a Python module for ease of access.


Requirements

These four programs require Python 3.7 or higher. No modules are required for the use of these programs.


Multiple Point Translations

The program dilations.py is used for three points (often in the form of a triangular shape).

Dilation

The program dilations.py is run from the command line using python3 dilations.py. You will be prompted for a scale factor of the dilation (which should be nonnegative). You will also be prompted for the x and y values of three points. The program will return the dilation of those points with the given scale factor.


Single Point Transformations

The three programs reflections.py, rotations-singlepoint.py, and translations-singlepoint.py are used for one point.

Reflection

The program reflections.py is run from the command line using python3 reflections.py. You will be prompted for the axis of reflection - x or y - and the coordinates of the point. The program will return the reflected point's coordinates.

Rotation

The program rotations-singlepoint.py is run from the command line using python3 rotations-singlepoint.py. You will be prompted for the degree value of the rotation: 90, 180, or 270 (the angle of 360 would be the original point). Then you will be asked to input the x- and y-coordinates of the point. The rotation will then occur at the angle specified around the origin.

Translation

The program translations-singlepoint.py is run from the command line using python3 translations-singlepoint.py. You will be prompted to enter the current coordinates of the point and then the direction of change for x (left/right) and the number of units right or left. Then you will be prompted to enter the direction of change for y (up or down) and the number of units up or down. The program will return the coordinates of the point after the specified translation.

About the Creator

I create programs in a variety of languages, from Python to JavaScript to CSS and more. I'm on GitHub: @peternielsen112 and also Replit.com by the same username. Please email any problems or suggestions to me at [email protected].

mathematical-transformations's People

Contributors

peternielsen112 avatar

Watchers

 avatar

mathematical-transformations's Issues

Depfu Error: No dependency files found

Hello,

We've tried to activate or update your repository on Depfu and couldn't find any supported dependency files. If we were to guess, we would say that this is not actually a project Depfu supports and has probably been activated by error.

Monorepos

Please note that Depfu currently only searches for your dependency files in the root folder. We do support monorepos and non-root files, but don't auto-detect them. If that's the case with this repo, please send us a quick email with the folder you want Depfu to work on and we'll set it up right away!

How to deactivate the project

  • Go to the Settings page of either your own account or the organization you've used
  • Go to "Installed Integrations"
  • Click the "Configure" button on the Depfu integration
  • Remove this repo (peternielsen112/mathematical-transformations) from the list of accessible repos.

Please note that using the "All Repositories" setting doesn't make a lot of sense with Depfu.

If you think that this is a mistake

Please let us know by sending an email to [email protected].


This is an automated issue by Depfu. You're getting it because someone configured Depfu to automatically update dependencies on this project.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.