<reponame>misspellted/enlightened


from measurements import Measurement
from units.time import Second
from units.prefixes.large import Kilo
from units.prefixes.small import Milli


seconds = Measurement(1.2, Second())
print(f"seconds: {seconds}")

milliseconds = seconds.convertTo(Milli())
print(f"{seconds} = {milliseconds}")
seconds = milliseconds.inBaseUnits()
print(f"{milliseconds} = {seconds}")

kiloseconds = seconds.convertTo(Kilo())
print(f"{seconds} = {kiloseconds}")
seconds = kiloseconds.inBaseUnits()
print(f"{kiloseconds} = {seconds}")

milliseconds = kiloseconds.convertTo(Milli())
print(f"{kiloseconds} = {milliseconds}")

kiloseconds = milliseconds.convertTo(Kilo())
print(f"{milliseconds} = {kiloseconds}")


from geometry.circles import Circle
from geometry.rectangles import Rectangle, Square

cameraSensor = Rectangle(720, 720)
circumscribed = Circle.circumscribe(cameraSensor.length, cameraSensor.height)

print(f"Circumscribing cameraSensor [{cameraSensor.length}x{cameraSensor.height}]: circumscribed radius: {circumscribed.radius}")

inscribed = Square.inscribe(circumscribed.radius)

print(f"Inscribing circumscribed radius: [{circumscribed.radius}]: inscribed dimensions: [{inscribed.length}x{inscribed.height}]")


from camera.mount.circular import CircularMount

cameraMount = CircularMount(circumscribed.radius)

print(f"Circumscribed cameraSensor radius: [{circumscribed.radius}]: cameraMount diameter: {cameraMount.diameter}")


from utilities import millisecondsPerFrame

print(f"msPf: {millisecondsPerFrame(60)}")

from physics.vectors import Vector

linear = Vector(3)
print(f"Magnitude of {linear}: {linear.magnitude()}")
uLinear = linear.unit()
print(f"Unit vector of {linear}: {uLinear}")
print(f"Magnitude of unit vector of {linear}: {uLinear.magnitude()}")

planar = Vector(3, 4)
print(f"Magnitude of {planar}: {planar.magnitude()}")
uPlanar = planar.unit()
print(f"Unit vector of {planar}: {uPlanar}")
print(f"Magnitude of unit vector of {planar}: {uPlanar.magnitude()}")

volumetric = Vector(3, 4, 5)
print(f"Magnitude of {volumetric}: {volumetric.magnitude()}")
uVolumetric = volumetric.unit()
print(f"Unit vector of {volumetric}: {uVolumetric}")
print(f"Magnitude of unit vector of {volumetric}: {uVolumetric.magnitude()}")

from physics.forces.gravitational import Gravitational

print(f"Universal gravitational force: {Gravitational.G}")


from measurements import Measurement
from units.time import Second
from units.prefixes.large import Kilo
from units.prefixes.small import Milli


seconds = Measurement(1.2, Second())
print(f"seconds: {seconds}")

milliseconds = seconds.convertTo(Milli())
print(f"{seconds} = {milliseconds}")
seconds = milliseconds.inBaseUnits()
print(f"{milliseconds} = {seconds}")

kiloseconds = seconds.convertTo(Kilo())
print(f"{seconds} = {kiloseconds}")
seconds = kiloseconds.inBaseUnits()
print(f"{kiloseconds} = {seconds}")

milliseconds = kiloseconds.convertTo(Milli())
print(f"{kiloseconds} = {milliseconds}")

kiloseconds = milliseconds.convertTo(Kilo())
print(f"{milliseconds} = {kiloseconds}")


from geometry.circles import Circle
from geometry.rectangles import Rectangle, Square

cameraSensor = Rectangle(720, 720)
circumscribed = Circle.circumscribe(cameraSensor.length, cameraSensor.height)

print(f"Circumscribing cameraSensor [{cameraSensor.length}x{cameraSensor.height}]: circumscribed radius: {circumscribed.radius}")

inscribed = Square.inscribe(circumscribed.radius)

print(f"Inscribing circumscribed radius: [{circumscribed.radius}]: inscribed dimensions: [{inscribed.length}x{inscribed.height}]")


from camera.mount.circular import CircularMount

cameraMount = CircularMount(circumscribed.radius)

print(f"Circumscribed cameraSensor radius: [{circumscribed.radius}]: cameraMount diameter: {cameraMount.diameter}")


from utilities import millisecondsPerFrame

print(f"msPf: {millisecondsPerFrame(60)}")

from physics.vectors import Vector

linear = Vector(3)
print(f"Magnitude of {linear}: {linear.magnitude()}")
uLinear = linear.unit()
print(f"Unit vector of {linear}: {uLinear}")
print(f"Magnitude of unit vector of {linear}: {uLinear.magnitude()}")

planar = Vector(3, 4)
print(f"Magnitude of {planar}: {planar.magnitude()}")
uPlanar = planar.unit()
print(f"Unit vector of {planar}: {uPlanar}")
print(f"Magnitude of unit vector of {planar}: {uPlanar.magnitude()}")

volumetric = Vector(3, 4, 5)
print(f"Magnitude of {volumetric}: {volumetric.magnitude()}")
uVolumetric = volumetric.unit()
print(f"Unit vector of {volumetric}: {uVolumetric}")
print(f"Magnitude of unit vector of {volumetric}: {uVolumetric.magnitude()}")

from physics.forces.gravitational import Gravitational

print(f"Universal gravitational force: {Gravitational.G}")