Skip to content

Commit

Permalink
[Doc] Add documentation for gui system and install trouble shooting. (#…
Browse files Browse the repository at this point in the history
…2985)

* [doc] Complete outline of docs in gui system

* Add links to apis

* Complete simple apis with links

* added examples to gui drawing apis

* More examples of gui API, added static/asset for example images storage

* delete libtinfo trouble shoot

* Added apis for single circle, line, and triangle

* resolve conversation

* fix typos

* Auto Format

* Resolve conversations

* resolve conversation

Co-authored-by: Taichi Gardener <taichigardener@gmail.com>
  • Loading branch information
Leonz5288 and taichi-gardener authored Oct 8, 2021
1 parent 7c0ee45 commit 225dbb2
Show file tree
Hide file tree
Showing 12 changed files with 289 additions and 47 deletions.
2 changes: 1 addition & 1 deletion docs/lang/articles/get-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ python3 -m pip install taichi
```

:::note
Currently, Taichi only supports Python 3.6/3.7/3.8 (64-bit).
Currently, Taichi only supports Python 3.6/3.7/3.8/3.9 (64-bit).
:::

import Tabs from '@theme/Tabs';
Expand Down
310 changes: 283 additions & 27 deletions docs/lang/articles/misc/gui.md

Large diffs are not rendered by default.

20 changes: 3 additions & 17 deletions docs/lang/articles/misc/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,6 @@ sidebar_position: 0

### Linux issues

- If Taichi crashes and reports `libtinfo.so.5 not found`:

- On Ubuntu, execute `sudo apt install libtinfo-dev`.

- On Arch Linux, first edit `/etc/pacman.conf`, and append these
lines:

```
[archlinuxcn]
Server = https://mirrors.tuna.tsinghua.edu.cn/archlinuxcn/$arch
```

Then execute `sudo pacman -Syy ncurses5-compat-libs`.

- If Taichi crashes and reports
`` /usr/lib/libstdc++.so.6: version `CXXABI_1.3.11' not found ``:

Expand Down Expand Up @@ -49,11 +35,11 @@ sidebar_position: 0
ERROR: No matching distribution found for taichi
```

- Make sure you're using Python version 3.6/3.7/3.8:
- Make sure you're using Python version 3.6/3.7/3.8/3.9:
```bash
python3 -c "print(__import__('sys').version[:3])"
# 3.6, 3.7 or 3.8
# 3.6, 3.7, 3.8 or 3.9
```
- Make sure your Python executable is 64-bit:
Expand All @@ -74,7 +60,7 @@ sidebar_position: 0
[E 05/14/20 10:46:49.911] Received signal 7 (Bus error)
```
This might be because that your NVIDIA GPU is pre-Pascal and it
This might be because that your NVIDIA GPU is pre-Pascal, and it
has limited support for [Unified
Memory](https://www.nextplatform.com/2019/01/24/unified-memory-the-final-piece-of-the-gpu-programming-puzzle/).
Expand Down
Binary file added docs/lang/articles/static/assets/arrow_field.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/lang/articles/static/assets/arrows.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/lang/articles/static/assets/circles.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/lang/articles/static/assets/lines.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/lang/articles/static/assets/point_field.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/lang/articles/static/assets/rect.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/lang/articles/static/assets/triangles.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions python/taichi/misc/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ class GUI:
name (str, optional): The name of the GUI to be constructed.
Default is 'Taichi'.
res (Union[int, List[int]], optional): The resolution of created
GUI. Default is 512*512.
background_color (int, optional): The background color of creted GUI.
GUI. Default is 512*512. If `res` is scalar, then width will be equal to height.
background_color (int, optional): The background color of created GUI.
Default is 0x000000.
show_gui (bool, optional): Specify whether to render the GUI. Default is True.
fullscreen (bool, optional): Specify whether to render the GUI in
Expand Down

0 comments on commit 225dbb2

Please sign in to comment.