Python package for simulation of grain-based system
Project description
butiran-py
Python package for simulation of grain-based system using molecular dynamics method and agent-based model
module
- vect3
Vect3()
Initialize with 3 arguments or nonestrval()
Get string value of Vect3 instanceadd()
Add two Vect3 instancessub()
Substract two Vect3 instancesdot()
Dot product of two Vect3 instancescross()
Cross product of two Vect3 instancesmul()
Multiply a scalar with a Vect3 instance (or vice versa)div()
Divide a Vect3 instance with a scalarlen()
Get length or magnitude of a Vect3 instanceunit()
Get unit vector of a Vect3 instanceneg()
Set a Vect3 instance to opposite direction
usage
from butiran.vect3 import Vect3
a = Vect3(100.001, -0.5, 2021)
print("a = " + a.strval())
b = a.neg()
print("b = " + b.strval())
a = (100.001, -0.5, 2021)
b = (-100.001, 0.5, -2021)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
butiran-0.0.9.tar.gz
(4.3 kB
view hashes)