Closed MidoriYakumo closed 7 years ago
Thanks. I wrote the 2d scripts a long time ago and now they are completely in a mess. I'll fix them as soon as possible.
@MidoriYakumo You can modify some files to run those examples.
For example, if you want to run run_mpm_snow.py
in taichi/python/misc/2d/levelset.py
add import taichi_core as tc
in taichi/python/misc/2d/run_mpm_snow.py
#from taichi.vfx import *
from mpm_simulator import *
from simulation_window import SimulationWindow
from color_schemes import *
in taichi/python/misc/2d/simulatio_window.py
#from taichi.misc.util import get_os_name
from taichi.misc.util import *
and change VIDEO_OUTPUT_ROOT
in get_os_name
function to the path you like.
in taichi/python/taichi/misc/util.py
@IteratorAdvance
On MacOSX, I
import taichi_core as tc # on my Arch Linux, this causes segmentation fault (core dumped)
import pyglet
so, on Arch Linux, I
import pyglet
and
def make_polygon(points, scale):
import taichi_core as tc # add here
polygon = tc.Vector2List()
def const_or_evaluate(f, u, v):
import taichi_core as tc # add here
if type(f) in [float, int, tuple, tc.Vector2, tc.Vector3]:
in ~/.bashrc
add $TAICHI_ROOT_DIR/taichi/build/
(for taichi_core.so)
and $TAICHI_ROOT_DIR/taichi/python/misc/2d/
to your PYTHONPATH
environment variable
I tried this method on MacOSX (10.11.6) and Arch Linux (4.8.13) and it works well.
This works for run_mpm_snow_smash.py
and run_mpm_snow_sticky.py
, too.
Hi @iamyoukou, It's like magic for me that you get these scripts working...I haven't touched them for more than one month, during which period Taichi was under drastic refactoring. Thank you very much.
I've fixed the 2D MPM examples (in a dirty way) and will fix fluid ones later, since they need dependency on ANN, which I would like to remove.
You are welcome to contribute on issues with tag 'contributions welcome', and I will probably deal with the rest myself - just because I'm more familiar with my own legacy (dirty) code and you don't have to waste your precious time on these historical problems.
Gotcha : )
I've fixed all the examples. Thanks.