Skip to content

Instantly share code, notes, and snippets.

View gyubeomim's full-sized avatar
🌐
ALIDA

Gyubeom Im gyubeomim

🌐
ALIDA
View GitHub Profile
@gyubeomim
gyubeomim / vpython10.py
Created December 31, 2021 06:24
VPython example 10
from vpython import * # 7.6.2
from math import *
#------------------------------------------------------------------
# 그래픽 그려주는 코드
#------------------------------------------------------------------
# 그래픽창을 생성합니다
scene.center = vector(0,0,0)
scene.width = 800
@gyubeomim
gyubeomim / vpython9.py
Created December 31, 2021 06:22
VPython example 9
# code from https://www.youtube.com/watch?v=c3tX_qReGIM
from vpython import * # 7.6.2
#-----------------------------------------------------------------
# 그래픽 그려주는 코드
#------------------------------------------------------------------
# 화면 객체를 생성합니다. background 색과 카메라 center 포인트를 설정한다
scene = canvas(background = vector(0,0,0), center = vector(0, -5, 0))
@gyubeomim
gyubeomim / vpython8.py
Created December 31, 2021 06:18
VPython example 8
# code from https://youtu.be/H8CzQtx9vds
from vpython import * # 7.6.2
from math import *
#------------------------------------------------------------------
# 그래픽 그려주는 코드
#------------------------------------------------------------------
# 그래픽창을 생성합니다
scene.center = vector(0,0,0)
@gyubeomim
gyubeomim / vpython7.py
Created December 30, 2021 22:50
VPython example 7
# code from http://tcjd71.wixsite.com/vpython/blank-1
from vpython import * # 7.6.2
#------------------------------------------------------------------
# 그래픽 그려주는 코드
#------------------------------------------------------------------
# 그래픽창을 설정하는 코드
# scene.range = (5,5,5)
scene.center = vector(0,1,0)
@gyubeomim
gyubeomim / vpython6.py
Created December 30, 2021 22:35
VPython example 6
from vpython import * # 7.6.2
from math import *
#------------------------------------------------------------------
# 그래픽 그려주는 코드
#------------------------------------------------------------------
# 그래픽창을 설정하는 코드
scene.center = vector(0,-1,0)
scene.width = 400
@gyubeomim
gyubeomim / vpython5.py
Created December 29, 2021 22:52
VPython example 5
# code from https://youtu.be/oMBohUQz3NI
from vpython import * # 7.6.2
from math import *
#------------------------------------------------------------------
# 그래픽 그려주는 코드
#------------------------------------------------------------------
# 그래픽창을 생성합니다
scene = canvas(width=800, height=300, center=vector(0,0,0))
@gyubeomim
gyubeomim / vpython4.py
Created December 29, 2021 22:43
VPython example 4
# code from http://tcjd71.wixsite.com/vpython/blank-1
from vpython import * # 7.6.2
#------------------------------------------------------------------
# 그래픽 그려주는 코드
#------------------------------------------------------------------
# 그래픽창과 그래프창을 생성합니다
scene = canvas(width=600, height=600, fov = 0.01*pi)
@gyubeomim
gyubeomim / vpython3.py
Created December 28, 2021 22:49
VPython example 3
# code from https://youtu.be/UoN70GjnBTI
from vpython import * # 7.6.2
#------------------------------------------------------------------
# 그래픽 그려주는 코드
#------------------------------------------------------------------
m = 0.5 # 질량
k = 20.0 # 강성
v0 = 4.0 # 초기속도
@gyubeomim
gyubeomim / vpython2.py
Last active December 28, 2021 22:39
VPython example 2
# code from https://youtu.be/H8CzQtx9vds
from vpython import * # 7.6.2
from math import *
# 공과 바닥을 생성합니다. 공의 위치는 지면으로부터 18 + 9 = 27m 위에 있습니다. (vpython은 y축이 위아래방향입니다)
ball = sphere(pos=vector(-5,18,0), radius=1, color=color.green)
bottom = box(pos=vector(0,-9,0), size=vector(25,0.5,25))
# 초기속도는 x방향으로 0.7 m/s
v = vector(0.7, 0,0)
@gyubeomim
gyubeomim / vpython1.py
Created December 28, 2021 14:47
Vpython example
# code from https://www.youtube.com/watch?v=c3tX_qReGIM
from vpython import * # 7.6.2
g = 9.81 # 중력가속도 9.81 m/s^2
# 화면 객체를 생성합니다. backgroun 색과 카메라 center 포인트를 설정한다
scene = canvas(background = vector(0.36, 0.47, 0.23), center = vector(0, -0.7, -0.5))
# 천장의 물체를 생성합니다. 재질은 wood이고 색깔은 orange입니다.
ceiling = box(length = 1, width = 1, height = 0.01, color = color.orange)