Commit f609a883 authored by Adam Blank's avatar Adam Blank
Browse files

Add new file

parent 2727c49c
Showing with 39 additions and 0 deletions
+39 -0
from vpython import sphere, vec, vector, color, cylinder, rate, cos, cross, mag, sin, pi # type: ignore
sphere, vec, vector, color, cylinder, rate, cos, cross, mag, sin, pi # type: ignore
POSITION: vector = vec(0, 0, 0)
SIZE: vector = vec(5, 0.5, 0.5)
DIRS: list[int] = [0, 1, -1]
RADIUS: int = 1
def setup() -> dict[tuple[int, int, int], cylinder]:
ball: sphere = sphere(pos=POSITION, radius=RADIUS, color=color.yellow)
res = {}
return res
def rotate(v: vector, e: vector, angle: float) -> vector:
"""
See https://en.wikipedia.org/wiki/Rodrigues%27_rotation_formula#Statement
v + sin(theta) * (e x v) + (1 - cos(theta)) * (e x (e x v))
"""
return v
def scale(v: vector, by: float) -> vector:
return v
ANGLE: float = pi/64
CYLINDERS: dict[tuple[int, int, int], cylinder] = setup()
while True:
rate(10)
for i in DIRS:
for j in DIRS:
for k in DIRS:
pass
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment