taichi-dev / taichi

Productive, portable, and performant GPU programming in Python.
https://taichi-lang.org
Apache License 2.0
25.57k stars 2.29k forks source link

Browser viewer #18

Closed yuanming-hu closed 7 years ago

yuanming-hu commented 7 years ago

It would be good to have an additional browser viewer for rendering/simulation process visualization. Python itself has good HTTP server support and it will help in case people use Taichi for some task via ssh and do not want to enable X11 forwarding.

chenxiaoqino commented 7 years ago

I was thinking about this.

yuanming-hu commented 7 years ago

I discussed with Yucheng(@yczhang89) about the possibility of using a fully web-based GUI, probably using lovecat. Here I briefly summarize the discussion.

Pros:

Cons:

yczhang89 commented 7 years ago

To link my previous rational: https://github.com/IteratorAdvance/taichi/pull/11#issuecomment-274252255. IMO an important pro missing here is that, lovecat can do more things than a hard-coded UI. With lovecat, we could tune so many scene parameters (among others), which are unknown to taichi beforehand.

yczhang89 commented 7 years ago

Two alternative approaches to handle scene parameters are:

  1. Disallow ad hoc scene generation in Python, and requires all 3D scenes to be constructed from a set of predefined 'graph node'. Each predefined node gets a GUI. This is too restrictive IMO.
  2. Provide an API gui.request_parameter('parameter_name'). This is essentially lovecat, and we could leverage lovecat to do this.
yuanming-hu commented 7 years ago

I'm building a Flask based one. Please refer to #66.