Code Monkey home page Code Monkey logo

math-sang's Introduction

수학(상)

고등학교 수학(상)의 일부 개념을 파이썬으로 구현한 한글 코딩 모듈입니다.

도형의 방정식

평면좌표

좌표평면 위의 점

from 수학_상.도형의_방정식.평면좌표 import *

() # <점 (0, 0)>
(이름='O') # <점 O(0, 0)>
p = (x=1, 이름='P') # <점 P(1, 0)>
q = (x=3, y=5, 이름='Q') # <점 Q(3, 5)>

x, y 좌표를 이용해서 평면 위의 점을 나타냅니다.

두 점 사이의 거리

from 수학_상.도형의_방정식.평면좌표 import *
p = (x=1, 이름='P') # <점 P(1, 0)>
q = (x=3, y=5, 이름='Q') # <점 Q(3, 5)>

p.점과의_거리(q) # 5.385164807134504

평면 위 두 점 사이의 거리를 구합니다.

직선의 방정식

주어진 조건으로 직선의 방정식 구하기

from 수학_상.도형의_방정식 import *

직선(기울기=1, y절편=2) # <직선 y=x+2>
직선(기울기=3, 한_점=(2, -6)) # <직선 y=3x-12>
직선(한_점=(-2, 4), 다른_점=(3, -1)) # <직선 y=-x+2>
직선(a=1, b=-1, c=2) # <직선 y=x+2>

주어진 조건으로 새로운 직선 객체를 만듭니다.

  • 기울기y절편이 주어졌을 때 직선의 방정식 구하기
  • 기울기와 직선이 지나는 한_점이 주어졌을 때 직선의 방정식 구하기
  • 직선이 지나는 한_점다른_점이 주어졌을 때 직선의 방정식 구하기
    • x절편y절편이 주어졌을 때 직선의 방정식 구하기
  • 직선의 일반형 ax+by+c=0이 주어졌을 때 직선의 방정식 구하기

두 직선의 위치 관계 구하기

from 수학_상.도형의_방정식 import *
a = 직선(기울기=2, y절편=-9) # <직선 y=2x-9>
b = 직선(기울기=-3, y절편=3) # <직선 y=-3x+3>

a.한_점에서_만남(b) # True
a.일치(b) # False
a.평행(b) # False
# a.직교(b) # False

위치_관계.한_점에서_만남(a, b) # True
위치_관계.일치(a, b) # False
위치_관계.평행(a, b) # False
# 위치_관계.직교(a, b) # False

평면에서 두 직선이 이루는 위치 관계를 구할 수 있습니다.

  • 두 직선이 한 점에서 만나는 경우
  • 두 직선이 평행한 경우
  • 두 직선이 일치하는 경우
  • 두 직선이 수직으로 만나는 경우 소수점 문제로 인해 보류

직선과 점 사이의 거리

from 수학_상.도형의_방정식 import *

p = (3, 4, 이름='P') # <점 P(3, 4)>
l = 직선(기울기=2, y절편=-9) # <직선 y=2x-9>

l.점과의_거리(p) # 3.1304951684997055

평면 위의 직선과 한 점 사이의 거리를 구합니다.

직선의 평행이동

from 수학_상.도형의_방정식.직선의_방정식 import *
a = 직선(기울기=2, y절편=-9) # <직선 y=2x-9>

a.평행이동(p=1, q=1) # <직선 y=2x-10>

현재 직선을 x축의 방향으로 p만큼, y축의 방향으로 q만큼 이동시킨 직선을 반환합니다.

math-sang's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

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.