This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from vpython import * # 7.6.2 | |
from math import * | |
#------------------------------------------------------------------ | |
# 그래픽 그려주는 코드 | |
#------------------------------------------------------------------ | |
# 그래픽창을 생성합니다 | |
scene.center = vector(0,0,0) | |
scene.width = 800 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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)) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# code from https://youtu.be/H8CzQtx9vds | |
from vpython import * # 7.6.2 | |
from math import * | |
#------------------------------------------------------------------ | |
# 그래픽 그려주는 코드 | |
#------------------------------------------------------------------ | |
# 그래픽창을 생성합니다 | |
scene.center = vector(0,0,0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from vpython import * # 7.6.2 | |
from math import * | |
#------------------------------------------------------------------ | |
# 그래픽 그려주는 코드 | |
#------------------------------------------------------------------ | |
# 그래픽창을 설정하는 코드 | |
scene.center = vector(0,-1,0) | |
scene.width = 400 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# code from https://youtu.be/UoN70GjnBTI | |
from vpython import * # 7.6.2 | |
#------------------------------------------------------------------ | |
# 그래픽 그려주는 코드 | |
#------------------------------------------------------------------ | |
m = 0.5 # 질량 | |
k = 20.0 # 강성 | |
v0 = 4.0 # 초기속도 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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) | |
NewerOlder